E-MailRelay

Public Member Functions | List of all members
GSmtp::StoredFile Class Reference

A concete derived class implementing the StoredMessage interface. More...

`#include <gstoredfile.h>`

Inheritance diagram for GSmtp::StoredFile:

## Public Member Functions
| StoredFile (FileStore &store, const G::Path &envelope_path)
| Constructor. More...
| ~StoredFile () override
| Destructor. More...
bool | lock ()
| Locks the file by renaming the envelope file. More...
bool | readEnvelope (std::string &reason, bool check_for_no_remote_recipients)
| Reads the envelope. More...
bool | openContent (std::string &reason)
| Opens the content file. More...
MessageId | id () const override
| Override from GSmtp::StoredMessage. More...
void | edit (const G::StringArray &) override
| Override from GSmtp::StoredMessage. More...
void | fail (const std::string &reason, int reason_code) override
| Override from GSmtp::StoredMessage. More...
| StoredFile (const StoredFile &)=delete
| StoredFile (StoredFile &&)=delete
void | operator= (const StoredFile &)=delete
void | operator= (StoredFile &&)=delete
Public Member Functions inherited from GSmtp::StoredMessage
virtual MessageId | id () const =0
| Returns the message identifier. More...
virtual std::string | location () const =0
| Returns the message location.
virtual std::string | from () const =0
| Returns the envelope 'from' field.
virtual std::string | to (std::size_t) const =0
| Returns the requested envelope non-local recipient or the empty string if out of range.
virtual std::size_t | toCount () const =0
| Returns the number of non-local recipients.
virtual std::istream & | contentStream ()=0
| Returns a reference to the content stream.
virtual void | close ()=0
| Releases the message to allow external editing.
virtual std::string | reopen ()=0
| Reverses a close(), returning the empty string on success or an error reason.
virtual void | destroy ()=0
| Deletes the message within the store.
virtual void | edit (const G::StringArray &new_to_list)=0
| Edits the message by updating the list of non-local recipients to the given non-empty list. More...
virtual void | fail (const std::string &reason, int reason_code)=0
| Marks the message as failed within the store. More...
virtual void | unfail ()=0
| Marks the message as unfailed within the store.
virtual int | eightBit () const =0
| Returns 1 if the message content (header+body) contains a character with the most significant bit set, or 0 if no such characters, or -1 if unknown.
virtual std::string | authentication () const =0
| Returns the original session authentication id.
virtual std::string | fromAuthIn () const =0
| Returns the incoming "mail from" auth parameter, either empty, xtext-encoded or "<>".
virtual std::string | fromAuthOut () const =0
| Returns the outgoing "mail from" auth parameter, either empty, xtext-encoded or "<>".
virtual | ~StoredMessage ()=default
| Destructor.

## Detailed Description

A concete derived class implementing the StoredMessage interface.

Definition at line 43 of file gstoredfile.h.

## Constructor & Destructor Documentation

## ◆ StoredFile()

GSmtp::StoredFile::StoredFile | ( | FileStore & | store,
|  | const G::Path & | envelope_path
| ) |  |

Constructor.

Definition at line 31 of file gstoredfile.cpp.

## ◆ ~StoredFile()

GSmtp::StoredFile::~StoredFile | ( |  | ) |
| override

Destructor.

Unlocks the file if it has been lock()ed but not destroy()ed or fail()ed.

Definition at line 50 of file gstoredfile.cpp.

## Member Function Documentation

## ◆ edit()

void GSmtp::StoredFile::edit | ( | const G::StringArray & | rejectees | ) |
| override virtual

Override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 194 of file gstoredfile.cpp.

## ◆ fail()

void GSmtp::StoredFile::fail | ( | const std::string & | reason,
|  | int | reason_code
| ) |  |
| override virtual

Override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 260 of file gstoredfile.cpp.

## ◆ id()

GSmtp::MessageId GSmtp::StoredFile::id | ( |  | ) | const
| override virtual

Override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 66 of file gstoredfile.cpp.

## ◆ lock()

bool GSmtp::StoredFile::lock | ( |  | ) |

Locks the file by renaming the envelope file.

Used by FileStore and FileIterator.

Definition at line 176 of file gstoredfile.cpp.

## ◆ openContent()

bool GSmtp::StoredFile::openContent | ( | std::string & | reason | ) |

Opens the content file.

Returns false on error. Used by FileStore and FileIterator.

Definition at line 142 of file gstoredfile.cpp.

## ◆ readEnvelope()

bool GSmtp::StoredFile::readEnvelope | ( | std::string & | reason,
|  | bool | check_for_no_remote_recipients
| ) |  |

Reads the envelope.

Returns false on error. Used by FileStore and FileIterator.

Definition at line 109 of file gstoredfile.cpp.

The documentation for this class was generated from the following files:

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/gstoredfile.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/gstoredfile.cpp