E-MailRelay

Public Member Functions | Protected 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:

## Public Member Functions
| ProtocolMessageForward (GNet::ExceptionSink, MessageStore &store, FilterFactory &, std::unique_ptr< ProtocolMessage > pm, const GSmtp::Client::Config &client_config, const GAuth::SaslClientSecrets &client_secrets, const std::string &remote_server_address)
| Constructor. More...
| ~ProtocolMessageForward () override
| Destructor. More...
| ProtocolMessageForward (const ProtocolMessageForward &)=delete
| ProtocolMessageForward (ProtocolMessageForward &&)=delete
void | operator= (const ProtocolMessageForward &)=delete
void | operator= (ProtocolMessageForward &&)=delete
Public Member Functions inherited from GSmtp::ProtocolMessage
virtual | ~ProtocolMessage ()=default
| Destructor.
virtual DoneSignal & | doneSignal ()=0
| Returns a signal which is raised once process() has completed. More...
virtual void | reset ()=0
| Resets the object state as if just constructed. More...
virtual void | clear ()=0
| Clears the message state and terminates any asynchronous message processing. More...
virtual MessageId | setFrom (const std::string &from_user, const std::string &from_auth)=0
| Sets the message envelope 'from'. More...
virtual bool | addTo (VerifierStatus to_status)=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 bool | addText (const char *, std::size_t)=0
| Adds text. More...
bool | addTextLine (const std::string &)
| A convenience function that calls addText() taking a string parameter and adding CR-LF. More...
virtual std::string | from () const =0
| Returns the setFrom() string. More...
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...

## Protected Member Functions
ProtocolMessage::DoneSignal & | storageDoneSignal ()
| Returns the signal which is used to signal that the storage is complete. More...
void | processDone (bool, const MessageId &, const std::string &, const std::string &)
| Called by derived classes that have intercepted the storageDoneSignal() when their own post-storage processing is complete. More...

## Additional Inherited Members
Public Types inherited from GSmtp::ProtocolMessage
using | DoneSignal = G::Slot::Signal< bool, const MessageId &, const std::string &, const std::string & >

## 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::Client 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::ExceptionSink | es,
|  | MessageStore & | store,
|  | FilterFactory & | ff,
|  | std::unique_ptr< ProtocolMessage > | pm,
|  | const GSmtp::Client::Config & | client_config,
|  | const GAuth::SaslClientSecrets & | client_secrets,
|  | const std::string & | remote_server_address
| ) |  |

Constructor.

The 'store' and 'client-secrets' references are kept.

Definition at line 30 of file gprotocolmessageforward.cpp.

## ◆ ~ProtocolMessageForward()

GSmtp::ProtocolMessageForward::~ProtocolMessageForward | ( |  | ) |
| override

Destructor.

Definition at line 49 of file gprotocolmessageforward.cpp.

## Member Function Documentation

## ◆ processDone()

void GSmtp::ProtocolMessageForward::processDone | ( | bool | success,
|  | const MessageId & | id,
|  | const std::string & | response,
|  | const std::string & | reason
| ) |  |
| protected

Called by derived classes that have intercepted the storageDoneSignal() when their own post-storage processing is complete.

Definition at line 110 of file gprotocolmessageforward.cpp.

## ◆ storageDoneSignal()

GSmtp::ProtocolMessage::DoneSignal & GSmtp::ProtocolMessageForward::storageDoneSignal | ( |  | ) |
| protected

Returns the signal which is used to signal that the storage is complete.

Derived classes can use this to intercept the storage-done signal emit()ed by the ProtocolMessageStore object.

Definition at line 57 of file gprotocolmessageforward.cpp.

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

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/gprotocolmessageforward.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/gprotocolmessageforward.cpp