GSmtp::AdminServer Class Reference

A server class which implements the emailrelay administration interface. More...

#include <gadminserver.h>

Inheritance diagram for GSmtp::AdminServer:

GNet::MultiServer

List of all members.

Public Member Functions

 AdminServer (MessageStore &store, const GSmtp::Client::Config &client_config, const Secrets &client_secrets, const GNet::Address &listening_address, bool allow_remote, const GNet::Address &local_address, const std::string &remote_address, unsigned int connection_timeout, const G::StringMap &extra_commands, bool with_terminate)
 Constructor.
virtual ~AdminServer ()
 Destructor.
void report () const
 Generates helpful diagnostics.
MessageStorestore ()
 Returns a reference to the message store, as passed in to the constructor.
const Secretssecrets () const
 Returns a reference to the secrets object, as passed in to the constructor.
GSmtp::Client::Config clientConfig () const
 Returns the client configuration.
unsigned int connectionTimeout () const
 Returns the connection timeout, as passed in to the constructor.
void notify (const std::string &s0, const std::string &s1, const std::string &s2)
 Called when something happens which the admin user might be interested in.
void unregister (AdminServerPeer *)
 Called from the AdminServerPeer destructor.

Protected Member Functions

virtual GNet::ServerPeernewPeer (GNet::Server::PeerInfo)
 Final override from GNet::MultiServer.


Detailed Description

A server class which implements the emailrelay administration interface.

Definition at line 108 of file gadminserver.h.


Constructor & Destructor Documentation

GSmtp::AdminServer::AdminServer ( MessageStore store,
const GSmtp::Client::Config client_config,
const Secrets client_secrets,
const GNet::Address listening_address,
bool  allow_remote,
const GNet::Address local_address,
const std::string &  remote_address,
unsigned int  connection_timeout,
const G::StringMap extra_commands,
bool  with_terminate 
)

Constructor.

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

Definition at line 261 of file gadminserver.cpp.

References GNet::Address::displayString(), and G_DEBUG.

GSmtp::AdminServer::~AdminServer (  )  [virtual]

Destructor.

Definition at line 279 of file gadminserver.cpp.

References GNet::MultiServer::serverCleanup().


Member Function Documentation

void GSmtp::AdminServer::report (  )  const

Generates helpful diagnostics.

Definition at line 308 of file gadminserver.cpp.

References GNet::MultiServer::serverReport().

Referenced by Main::Admin::report().

GSmtp::MessageStore & GSmtp::AdminServer::store (  ) 

Returns a reference to the message store, as passed in to the constructor.

Definition at line 330 of file gadminserver.cpp.

const GSmtp::Secrets & GSmtp::AdminServer::secrets (  )  const

Returns a reference to the secrets object, as passed in to the constructor.

Note that this is a "client-side" secrets file, used to authenticate ourselves with a remote server.

Definition at line 335 of file gadminserver.cpp.

GSmtp::Client::Config GSmtp::AdminServer::clientConfig (  )  const

Returns the client configuration.

Definition at line 345 of file gadminserver.cpp.

unsigned int GSmtp::AdminServer::connectionTimeout (  )  const

Returns the connection timeout, as passed in to the constructor.

Definition at line 340 of file gadminserver.cpp.

void GSmtp::AdminServer::notify ( const std::string &  s0,
const std::string &  s1,
const std::string &  s2 
)

Called when something happens which the admin user might be interested in.

Definition at line 313 of file gadminserver.cpp.

References G_DEBUG.

Referenced by Main::Admin::notify().

void GSmtp::AdminServer::unregister ( AdminServerPeer peer  ) 

Called from the AdminServerPeer destructor.

Definition at line 322 of file gadminserver.cpp.

References G_DEBUG.

Referenced by GSmtp::AdminServerPeer::~AdminServerPeer().

GNet::ServerPeer * GSmtp::AdminServer::newPeer ( GNet::Server::PeerInfo  peer_info  )  [protected, virtual]

Final override from GNet::MultiServer.

Implements GNet::MultiServer.

Definition at line 285 of file gadminserver.cpp.

References G_WARNING, GNet::Local::isLocal(), and GNet::Server::PeerInfo::m_address.


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