GPop::ServerProtocol Class Reference

Implements the POP server-side protocol. More...

#include <gpopserverprotocol.h>

List of all members.

Public Member Functions

 ServerProtocol (Sender &sender, Store &store, const Secrets &secrets, const Text &text, GNet::Address peer_address, Config config)
 Constructor.
virtual ~ServerProtocol ()
 Destructor.
void init ()
 Starts the protocol.
void apply (const std::string &line)
 Called on receipt of a string from the client.
void resume ()
 Called when the Sender can send again.

Classes

struct  Config
 A structure containing configuration parameters for ServerProtocol. NOT USED. More...
class  Sender
 An interface used by ServerProtocol to send protocol replies. More...
class  Text
 An interface used by ServerProtocol to provide response text strings. More...


Detailed Description

Implements the POP server-side protocol.

Uses the ServerProtocol::Sender as its "sideways" interface to talk back to the client.

See also:
RFC1939

Definition at line 50 of file gpopserverprotocol.h.


Constructor & Destructor Documentation

GPop::ServerProtocol::ServerProtocol ( Sender sender,
Store store,
const Secrets secrets,
const Text text,
GNet::Address  peer_address,
Config  config 
)

Constructor.

The Sender interface is used to send protocol replies back to the client.

The Text interface is used to get informational text for returning to the client.

All references are kept.

Definition at line 31 of file gpopserverprotocol.cpp.

References G::StateMachine< T, State, Event, Arg >::addTransition().

GPop::ServerProtocol::~ServerProtocol (  )  [virtual]

Destructor.

Definition at line 71 of file gpopserverprotocol.cpp.


Member Function Documentation

void GPop::ServerProtocol::init (  ) 

Starts the protocol.

Definition at line 66 of file gpopserverprotocol.cpp.

Referenced by GPop::ServerPeer::ServerPeer().

void GPop::ServerProtocol::apply ( const std::string &  line  ) 

Called on receipt of a string from the client.

The string is expected to be CR-LF terminated. Throws ProtocolDone if done.

Definition at line 97 of file gpopserverprotocol.cpp.

References G::StateMachine< T, State, Event, Arg >::apply(), G_LOG, G::Str::printable(), and G::StateMachine< T, State, Event, Arg >::state().

void GPop::ServerProtocol::resume (  ) 

Called when the Sender can send again.

The Sender returns false from protocolSend() when blocked, and calls resume() when unblocked.

Definition at line 137 of file gpopserverprotocol.cpp.

References G_DEBUG, and G::StateMachine< T, State, Event, Arg >::state().

Referenced by GPop::ServerPeer::onSendComplete().


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