E-MailRelay

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Static Public Member Functions | List of all members
GSmtp::MessageStore Class Referenceabstract

A class which allows SMTP messages to be stored and retrieved. More...

`#include <gmessagestore.h>`

Inheritance diagram for GSmtp::MessageStore:

## Classes
class | Iterator
| An iterator class for GSmtp::MessageStore. More...
class | IteratorImp
| A base class for MessageStore::Iterator implementations. More...

## Public Member Functions
virtual | ~MessageStore ()
| Destructor.
virtual unique_ptr< NewMessage > | newMessage (const std::string &from, const std::string &from_auth_in, const std::string &from_auth_out)=0
| Creates a new message.
virtual bool | empty () const =0
| Returns true if the message store is empty.
virtual unique_ptr< StoredMessage > | get (unsigned long id)=0
| Pulls the specified message out of the store. More...
virtual Iterator | iterator (bool lock)=0
| Returns an iterator for stored messages. More...
virtual Iterator | failures ()=0
| Returns an iterator for failed messages.
virtual void | unfailAll ()=0
| Causes messages marked as failed to be unmarked.
virtual void | rescan ()=0
| Requests that a messageStoreRescanSignal() is emitted.
virtual void | updated ()=0
| Called by associated classes to indicate that the store has changed. More...
virtual G::Slot::Signal0 & | messageStoreUpdateSignal ()=0
| Provides a signal which is when something might have changed in the store. More...
virtual G::Slot::Signal0 & | messageStoreRescanSignal ()=0
| Provides a signal which is emitted when iteration finishes and rescan() has been called. More...

## Static Public Member Functions
static G::Path | defaultDirectory ()
| Returns a default spool directory, such as "/var/spool/emailrelay". More...

## Detailed Description

A class which allows SMTP messages to be stored and retrieved.

See also
  GSmtp::NewMessage, GSmtp::StoredMessage, GSmtp::ProtocolMessage

Definition at line 43 of file gmessagestore.h.

## Member Function Documentation

G::Path GSmtp::MessageStore::defaultDirectory | ( |  | ) |
| static

Returns a default spool directory, such as "/var/spool/emailrelay".

(Typically with an os-specific implementation.)

Definition at line 31 of file gmessagestore_unix.cpp.

virtual unique_ptr<StoredMessage> GSmtp::MessageStore::get | ( | unsigned long | id | ) |
| pure virtual

Pulls the specified message out of the store.

Throws execptions on error.

See also NewMessage::id().

As a side effect some stored messages may be marked as bad, or deleted (if they have no recipients).

Implemented in GSmtp::FileStore.

virtual Iterator GSmtp::MessageStore::iterator | ( | bool | lock | ) |
| pure virtual

Returns an iterator for stored messages.

(Note that copies of iterators share state. For independent iterators call iterator() for each.)

If 'lock' is true then stored messages returned by the iterator are locked. Normally they are then processed (using StoredMessage::extractContentStream()) and then deleted (by StoredMessage::destroy()).

As a side effect of iteration when 'lock' is true some stored messages may be marked as bad, or get deleted (if they have no recipients).

Implemented in GSmtp::FileStore.

virtual G::Slot::Signal0& GSmtp::MessageStore::messageStoreRescanSignal | ( |  | ) |
| pure virtual

Provides a signal which is emitted when iteration finishes and rescan() has been called.

Implemented in GSmtp::FileStore.

virtual G::Slot::Signal0& GSmtp::MessageStore::messageStoreUpdateSignal | ( |  | ) |
| pure virtual

Provides a signal which is when something might have changed in the store.

Implemented in GSmtp::FileStore.

virtual void GSmtp::MessageStore::updated | ( |  | ) |
| pure virtual

Called by associated classes to indicate that the store has changed.

Implementations must cause the messageStoreUpdateSignal() signal to be emitted.

Implemented in GSmtp::FileStore.

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

- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/gsmtp/gmessagestore.h
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/gsmtp/gmessagestore.cpp
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/gsmtp/gmessagestore_unix.cpp