21#ifndef G_SMTP_NEW_MESSAGE_H
22#define G_SMTP_NEW_MESSAGE_H
29 class MessageStoreImp ;
40 virtual void addTo(
const std::string & to ,
bool local ) = 0 ;
43 virtual bool addText(
const char * , std::size_t ) = 0 ;
47 virtual bool prepare(
const std::string & session_auth_id ,
48 const std::string & peer_socket_address ,
const std::string & peer_certificate ) = 0 ;
53 virtual void commit(
bool strict ) = 0 ;
A somewhat opaque identifer for a MessageStore message.
An abstract class to allow the creation of a new message in the message store.
virtual bool prepare(const std::string &session_auth_id, const std::string &peer_socket_address, const std::string &peer_certificate)=0
Prepares to store the message in the message store.
virtual void addTo(const std::string &to, bool local)=0
Adds a 'to' address.
virtual bool addText(const char *, std::size_t)=0
Adds a line of content, typically ending with CR-LF.
virtual void commit(bool strict)=0
Commits the prepare()d message to the store.
virtual ~NewMessage()=default
Destructor.
virtual std::string location() const =0
Returns the message's unique location.
bool addTextLine(const std::string &)
A convenience function that calls addText() taking a string parameter and adding CR-LF.
virtual MessageId id() const =0
Returns the message's unique identifier.
SMTP and message-store classes.