E-MailRelay
Public Member Functions | Protected Member Functions | List of all members
GSmtp::AdminServer Class Reference

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

#include <gadminserver.h>

+ Inheritance diagram for GSmtp::AdminServer:

Public Member Functions

 AdminServer (GNet::ExceptionHandler &, MessageStore &store, const GSmtp::Client::Config &client_config, const GAuth::Secrets &client_secrets, const GNet::MultiServer::AddressList &listening_addresses, bool allow_remote, const std::string &remote_address, unsigned int connection_timeout, const G::StringMap &info_commands, const G::StringMap &config_commands, bool with_terminate)
 Constructor.
 
virtual ~AdminServer ()
 Destructor.
 
void report () const
 Generates helpful diagnostics.
 
MessageStore & store ()
 Returns a reference to the message store, as passed in to the constructor. More...
 
const GAuth::Secrets & secrets () const
 Returns a reference to the secrets object, as passed in to the constructor. More...
 
GSmtp::Client::Config clientConfig () const
 Returns the client configuration.
 
unsigned int connectionTimeout () const
 Returns the connection timeout, as passed in to the constructor. More...
 
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. More...
 
void unregister (AdminServerPeer *)
 Called from the AdminServerPeer destructor.
 
- Public Member Functions inherited from GNet::MultiServer
 MultiServer (ExceptionHandler &, const AddressList &address_list)
 Constructor. More...
 
 MultiServer (ExceptionHandler &)
 Default constructor. Initialise with init().
 
void init (const AddressList &address_list)
 Initilisation after default construction. More...
 
virtual ~MultiServer ()
 Destructor.
 
std::pair< bool, Address > firstAddress () const
 Returns the first listening address. More...
 

Protected Member Functions

virtual GNet::ServerPeer * newPeer (GNet::Server::PeerInfo, GNet::MultiServer::ServerInfo) g__final override
 Override from GNet::MultiServer.
 
- Protected Member Functions inherited from GNet::MultiServer
void serverCleanup ()
 Should be called from all derived classes' destructors so that peer objects can use their Server objects safely during their own destruction. More...
 
void serverReport (const std::string &server_type) const
 Writes to the system log a summary of the underlying server objects and their addresses. More...
 

Additional Inherited Members

- Public Types inherited from GNet::MultiServer
typedef std::vector< Address > AddressList
 
typedef Server::PeerInfo PeerInfo
 
- Static Public Member Functions inherited from GNet::MultiServer
static bool canBind (const AddressList &listening_address_list, bool do_throw)
 Checks that the specified addresses can be bound. More...
 
static AddressList addressList (const Address &)
 A trivial convenience fuction that returns the given address as a single-element list. More...
 
static AddressList addressList (const AddressList &, unsigned int port)
 Returns the given list of addresses with the port set correctly. More...
 
static AddressList addressList (const G::StringArray &, unsigned int port)
 A convenience function that returns a list of listening addresses given a list of listening interfaces and a port number. More...
 

Detailed Description

A server class which implements the emailrelay administration interface.

Definition at line 112 of file gadminserver.h.

Member Function Documentation

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

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

Definition at line 392 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 365 of file gadminserver.cpp.

const GAuth::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 387 of file gadminserver.cpp.

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

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

Definition at line 382 of file gadminserver.cpp.


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