21#ifndef G_SMTP_PROTOCOL_MESSAGE_H
22#define G_SMTP_PROTOCOL_MESSAGE_H
34 class ProtocolMessage ;
87 virtual MessageId setFrom(
const std::string & from_user ,
const std::string & from_auth ) = 0 ;
100 virtual bool addText(
const char * , std::size_t ) = 0 ;
110 virtual std::string
from()
const = 0 ;
113 virtual void process(
const std::string & session_auth_id ,
const std::string & peer_socket_address ,
114 const std::string & peer_certificate ) = 0 ;
A somewhat opaque identifer for a MessageStore message.
An interface used by the ServerProtocol class to assemble and process an incoming message.
virtual void clear()=0
Clears the message state and terminates any asynchronous message processing.
virtual ~ProtocolMessage()=default
Destructor.
virtual void reset()=0
Resets the object state as if just constructed.
virtual bool addTo(VerifierStatus to_status)=0
Adds an envelope 'to'.
bool addTextLine(const std::string &)
A convenience function that calls addText() taking a string parameter and adding CR-LF.
virtual DoneSignal & doneSignal()=0
Returns a signal which is raised once process() has completed.
virtual std::string from() const =0
Returns the setFrom() string.
virtual MessageId setFrom(const std::string &from_user, const std::string &from_auth)=0
Sets the message envelope 'from'.
virtual void addReceived(const std::string &)=0
Adds a 'received' line to the start of the content.
virtual void process(const std::string &session_auth_id, const std::string &peer_socket_address, const std::string &peer_certificate)=0
Starts asynchronous processing of the message.
virtual bool addText(const char *, std::size_t)=0
Adds text.
A structure returned by GSmtp::Verifier to describe the status of a 'rcpt-to' or 'vrfy' recipient.
SMTP and message-store classes.