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:

GSmtp::ProtocolMessage

List of all members.

Public Member Functions

 ProtocolMessageForward (MessageStore &store, std::auto_ptr< ProtocolMessage > pm, const GSmtp::Client::Config &client_config, const Secrets &client_secrets, const std::string &server_address, unsigned int connection_timeout)
 Constructor.
virtual ~ProtocolMessageForward ()
 Destructor.
virtual G::Signal3< bool,
unsigned long, std::string > & 
doneSignal ()
 Final override from GSmtp::ProtocolMessage.
virtual void reset ()
 Final override from GSmtp::ProtocolMessage.
virtual void clear ()
 Final override from GSmtp::ProtocolMessage.
virtual bool setFrom (const std::string &from_user)
 Final override from GSmtp::ProtocolMessage.
virtual bool addTo (const std::string &to_user, VerifierStatus to_status)
 Final override from GSmtp::ProtocolMessage.
virtual void addReceived (const std::string &)
 Final override from GSmtp::ProtocolMessage.
virtual bool addText (const std::string &)
 Final override from GSmtp::ProtocolMessage.
virtual std::string from () const
 Final override from GSmtp::ProtocolMessage.
virtual void process (const std::string &auth_id, const std::string &client_ip)
 Final override from GSmtp::ProtocolMessage.

Protected Member Functions

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


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 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]


Member Function Documentation

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.

void GSmtp::ProtocolMessageForward::reset (  )  [virtual]

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 71 of file gprotocolmessageforward.cpp.

References GNet::ClientPtr< TClient >::reset().

void GSmtp::ProtocolMessageForward::clear (  )  [virtual]

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 77 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.

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::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.

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 &  client_ip 
) [virtual]

Final override from GSmtp::ProtocolMessage.

Implements GSmtp::ProtocolMessage.

Definition at line 107 of file gprotocolmessageforward.cpp.

References G::Signal3< P1, P2, P3 >::reset().

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.

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 113 of file gprotocolmessageforward.cpp.

References G::Signal3< P1, P2, P3 >::emit(), and G_DEBUG.

Referenced by ProtocolMessageForward().


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

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5