E-MailRelay
Public Member Functions | List of all members
GSmtp::ProtocolMessageForward Class Reference

A concrete implementation of the ProtocolMessage interface that stores incoming messages in the message store and then immediately forwards them on to the downstream server. More...

#include <gprotocolmessageforward.h>

+ Inheritance diagram for GSmtp::ProtocolMessageForward:
+ Collaboration diagram for GSmtp::ProtocolMessageForward:

Public Member Functions

 ProtocolMessageForward (GNet::EventState, GStore::MessageStore &store, FilterFactoryBase &, std::unique_ptr< ProtocolMessage > pm, const GSmtp::Client::Config &client_config, const GAuth::SaslClientSecrets &client_secrets, const std::string &forward_to, int forward_to_family)
 Constructor. More...
 
 ~ProtocolMessageForward () override
 Destructor. More...
 
 ProtocolMessageForward (const ProtocolMessageForward &)=delete
 
 ProtocolMessageForward (ProtocolMessageForward &&)=delete
 
ProtocolMessageForwardoperator= (const ProtocolMessageForward &)=delete
 
ProtocolMessageForwardoperator= (ProtocolMessageForward &&)=delete
 
- Public Member Functions inherited from GSmtp::ProtocolMessage
virtual ~ProtocolMessage ()=default
 Destructor.
 
virtual ProcessedSignalprocessedSignal ()=0
 Returns a signal which is raised once process() has completed.
 
virtual void reset ()=0
 Clears the message state, terminates any asynchronous message processing and resets the object as if just constructed. More...
 
virtual void clear ()=0
 Clears the message state and terminates any asynchronous message processing.
 
virtual GStore::MessageId setFrom (const std::string &from_user, const FromInfo &)=0
 Sets the message envelope 'from' address etc. More...
 
virtual bool addTo (const ToInfo &to)=0
 Adds an envelope 'to'. More...
 
virtual void addReceived (const std::string &)=0
 Adds a 'received' line to the start of the content. More...
 
virtual GStore::NewMessage::Status addContent (const char *, std::size_t)=0
 Adds content. More...
 
void addContentLine (const std::string &)
 A convenience function that calls addContent() taking a string parameter and adding CR-LF. More...
 
virtual std::size_t contentSize () const =0
 Returns the current content size. More...
 
virtual std::string from () const =0
 Returns the setFrom() user string.
 
virtual FromInfo fromInfo () const =0
 Returns the setFrom() extra info.
 
virtual std::string bodyType () const =0
 Returns the setFrom() body type, fromInfo().body.
 
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. More...
 

Additional Inherited Members

- Public Types inherited from GSmtp::ProtocolMessage
using ProcessedSignal = G::Slot::Signal< const ProcessedInfo & >
 
using AddressStyle = GStore::MessageStore::AddressStyle
 

Detailed Description

A concrete implementation of the ProtocolMessage interface that stores incoming messages in the message store and then immediately forwards them on to the downstream server.

The implementation delegates to an instance of the ProtocolMessageStore class (ie. its sibling class) to do the storage, and to an instance of the GSmtp::Forward class to do the forwarding.

See also
GSmtp::ProtocolMessageStore

Definition at line 55 of file gprotocolmessageforward.h.

Constructor & Destructor Documentation

◆ ProtocolMessageForward()

GSmtp::ProtocolMessageForward::ProtocolMessageForward ( GNet::EventState  es,
GStore::MessageStore store,
FilterFactoryBase ff,
std::unique_ptr< ProtocolMessage pm,
const GSmtp::Client::Config client_config,
const GAuth::SaslClientSecrets client_secrets,
const std::string &  forward_to,
int  forward_to_family 
)

Constructor.

Definition at line 28 of file gprotocolmessageforward.cpp.

◆ ~ProtocolMessageForward()

GSmtp::ProtocolMessageForward::~ProtocolMessageForward ( )
override

Destructor.

Definition at line 48 of file gprotocolmessageforward.cpp.


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