E-MailRelay
|
A class which allows SMTP messages to be stored and retrieved. More...
#include <gmessagestore.h>
Classes | |
struct | Iterator |
A base class for GStore::MessageStore iterators. More... | |
struct | SmtpInfo |
Information on the SMTP options used when submitted. More... | |
Public Types | |
enum class | AddressStyle { Invalid , Ascii , Utf8Mailbox , Utf8Domain , Utf8Both } |
enum class | BodyType { Unknown = -1 , SevenBit , EightBitMime , BinaryMime } |
Public Member Functions | |
virtual | ~MessageStore ()=default |
Destructor. | |
virtual std::unique_ptr< NewMessage > | newMessage (const std::string &from, const SmtpInfo &smtp_info, 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 std::string | location (const MessageId &) const =0 |
Returns the location of the given message. | |
virtual std::unique_ptr< StoredMessage > | get (const MessageId &id)=0 |
Pulls the specified message out of the store. More... | |
virtual std::unique_ptr< Iterator > | iterator (bool lock)=0 |
Returns an iterator for stored messages. More... | |
virtual std::vector< MessageId > | ids ()=0 |
Returns a list of spooled message ids (excluding new or locked messages). | |
virtual std::vector< MessageId > | failures ()=0 |
Returns a list of failed message ids. | |
virtual void | unfailAll ()=0 |
Unfails all failed messages. | |
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::Signal & | messageStoreUpdateSignal () noexcept=0 |
Provides a signal which is emitted when something might have changed in the store. | |
virtual G::Slot::Signal & | messageStoreRescanSignal () noexcept=0 |
Provides a signal which is emitted when rescan() is called. | |
Static Public Member Functions | |
static AddressStyle | addressStyle (std::string_view address) |
Parses an address to determine whether it has ASCII or UTF-8 parts. More... | |
A class which allows SMTP messages to be stored and retrieved.
Definition at line 72 of file gmessagestore.h.
|
strong |
Definition at line 75 of file gmessagestore.h.
|
strong |
Definition at line 89 of file gmessagestore.h.
|
static |
Parses an address to determine whether it has ASCII or UTF-8 parts.
See also RFC-5198.
Definition at line 33 of file gmessagestore.cpp.
|
pure virtual |
Pulls the specified message out of the store.
Throws execptions on error.
|
pure virtual |
Returns an iterator for stored messages.
If 'lock' is true then stored messages returned by the iterator are locked. They can then be deleted by StoredMessage::destroy() once they have been fully processed.
|
pure virtual |
Called by associated classes to indicate that the store has changed.
Implementations must cause the messageStoreUpdateSignal() signal to be emitted.