- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
GSmtp::ProtocolMessageForward Class Reference

A concrete implementation of the ProtocolMessage interface which 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 (MessageStore &store, std::auto_ptr< ProtocolMessage > pm, const GSmtp::Client::Config &client_config, const GAuth::Secrets &client_secrets, const std::string &server_address, unsigned int connection_timeout)
| Constructor. More...
virtual | ~ProtocolMessageForward ()
| Destructor. More...
virtual G::Signal3< bool, unsigned long, std::string > & | doneSignal ()
| Final override from GSmtp::ProtocolMessage. More...
virtual void | reset ()
| Final override from GSmtp::ProtocolMessage. More...
virtual void | clear ()
| Final override from GSmtp::ProtocolMessage. More...
virtual bool | setFrom (const std::string &from_user)
| Final override from GSmtp::ProtocolMessage. More...
virtual bool | addTo (const std::string &to_user, VerifierStatus to_status)
| Final override from GSmtp::ProtocolMessage. More...
virtual void | addReceived (const std::string &)
| Final override from GSmtp::ProtocolMessage. More...
virtual bool | addText (const std::string &)
| Final override from GSmtp::ProtocolMessage. More...
virtual std::string | from () const
| Final override from GSmtp::ProtocolMessage. More...
virtual void | process (const std::string &auth_id, const std::string &peer_socket_address, const std::string &peer_socket_name, const std::string &peer_certificate)
| Final override from GSmtp::ProtocolMessage. More...
Public Member Functions inherited from GSmtp::ProtocolMessage
virtual | ~ProtocolMessage ()
| Destructor. More...

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

## Detailed Description

A concrete implementation of the ProtocolMessage interface which 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 56 of file gprotocolmessageforward.h.

## Constructor & Destructor Documentation

GSmtp::ProtocolMessageForward::ProtocolMessageForward | ( | MessageStore & | store,
|  | std::auto_ptr< ProtocolMessage > | pm,
|  | const GSmtp::Client::Config & | client_config,
|  | const GAuth::Secrets & | client_secrets,
|  | const std::string & | server_address,
|  | unsigned int | connection_timeout
| ) |  |

Constructor.

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

Definition at line 33 of file gprotocolmessageforward.cpp.

References G::Signal2< P1, P2 >::connect(), GNet::ClientPtr< TClient >::doneSignal(), processDone(), and G::slot().

GSmtp::ProtocolMessageForward::~ProtocolMessageForward | ( |  | ) |
| virtual

Destructor.

Definition at line 53 of file gprotocolmessageforward.cpp.

## Member Function Documentation

void GSmtp::ProtocolMessageForward::addReceived | ( | const std::string & | line | ) |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 92 of file gprotocolmessageforward.cpp.

bool GSmtp::ProtocolMessageForward::addText | ( | const std::string & | line | ) |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 97 of file gprotocolmessageforward.cpp.

bool GSmtp::ProtocolMessageForward::addTo | ( | const std::string & | to_user,
|  | VerifierStatus | to_status
| ) |  |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 87 of file gprotocolmessageforward.cpp.

void GSmtp::ProtocolMessageForward::clear | ( |  | ) |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 77 of file gprotocolmessageforward.cpp.

G::Signal3< bool, unsigned long, std::string > & GSmtp::ProtocolMessageForward::doneSignal | ( |  | ) |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 66 of file gprotocolmessageforward.cpp.

std::string GSmtp::ProtocolMessageForward::from | ( |  | ) | const
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 102 of file gprotocolmessageforward.cpp.

void GSmtp::ProtocolMessageForward::process | ( | const std::string & | auth_id,
|  | const std::string & | peer_socket_address,
|  | const std::string & | peer_socket_name,
|  | const std::string & | peer_certificate
| ) |  |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 107 of file gprotocolmessageforward.cpp.

void GSmtp::ProtocolMessageForward::processDone | ( | bool | success,
|  | unsigned long | id,
|  | std::string | reason
| ) |  |
| protected

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

Definition at line 114 of file gprotocolmessageforward.cpp.

References G_DEBUG.

Referenced by ProtocolMessageForward().

void GSmtp::ProtocolMessageForward::reset | ( |  | ) |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 71 of file gprotocolmessageforward.cpp.

bool GSmtp::ProtocolMessageForward::setFrom | ( | const std::string & | from_user | ) |
| virtual

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 82 of file gprotocolmessageforward.cpp.

G::Signal3< bool, unsigned long, std::string > & 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 61 of file gprotocolmessageforward.cpp.

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

- gprotocolmessageforward.h
- gprotocolmessageforward.cpp