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::ExceptionSink, MessageStore &store, FilterFactory &ff, G::Slot::Signal< const std::string & > &forward_request, const GNet::ServerPeerConfig &server_peer_config, const GNet::ServerConfig &server_config, const GSmtp::Client::Config &client_config, const GAuth::SaslClientSecrets &client_secrets, const G::StringArray &interfaces, unsigned int port, 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. More...
 
 ~AdminServer () override
 Destructor. More...
 
void report () const
 Generates helpful diagnostics. More...
 
MessageStorestore ()
 Returns a reference to the message store, as passed in to the constructor. More...
 
FilterFactoryff ()
 Returns a reference to the filter factory, as passed in to the constructor. More...
 
const GAuth::SaslClientSecretsclientSecrets () const
 Returns a reference to the client secrets object, as passed in to the constructor. More...
 
GSmtp::Client::Config clientConfig () const
 Returns the client configuration. More...
 
unsigned int connectionTimeout () const
 Returns the connection timeout, as passed in to the constructor. More...
 
void forward ()
 Called to trigger asynchronous forwarding. More...
 
bool notifying () const
 Returns true if the remote user has asked for notifications. More...
 
void notify (const std::string &s0, const std::string &s1, const std::string &s2, const std::string &s3)
 Called when something happens which the admin users might be interested in. More...
 
 AdminServer (const AdminServer &)=delete
 
 AdminServer (AdminServer &&)=delete
 
void operator= (const AdminServer &)=delete
 
void operator= (AdminServer &&)=delete
 
- Public Member Functions inherited from GNet::MultiServer
 MultiServer (ExceptionSink listener_exception_sink, const G::StringArray &addresses, unsigned int port, const std::string &server_type, ServerPeerConfig server_peer_config, ServerConfig server_config)
 Constructor. More...
 
 ~MultiServer () override
 Destructor. More...
 
bool hasPeers () const
 Returns true if peers() is not empty. More...
 
std::vector< std::weak_ptr< ServerPeer > > peers ()
 Returns the list of ServerPeer-derived objects. More...
 
std::unique_ptr< ServerPeerdoNewPeer (ExceptionSinkUnbound, const ServerPeerInfo &, const ServerInfo &)
 Pseudo-private method used by the pimple class. More...
 
 MultiServer (const MultiServer &)=delete
 
 MultiServer (MultiServer &&)=delete
 
void operator= (const MultiServer &)=delete
 
void operator= (MultiServer &&)=delete
 

Protected Member Functions

std::unique_ptr< GNet::ServerPeernewPeer (GNet::ExceptionSinkUnbound, GNet::ServerPeerInfo, GNet::MultiServer::ServerInfo) override
 Override from GNet::MultiServer. More...
 
- Protected Member Functions inherited from GNet::MultiServer
virtual std::unique_ptr< ServerPeernewPeer (ExceptionSinkUnbound, ServerPeerInfo, ServerInfo)=0
 A factory method which new()s a ServerPeer-derived object. More...
 
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
 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
using AddressList = std::vector< Address >
 
- Static Public Member Functions inherited from GNet::MultiServer
static bool canBind (const AddressList &listening_address_list, bool do_throw)
 Checks that all the specified addresses can be bound. More...
 

Detailed Description

A server class which implements the emailrelay administration interface.

Definition at line 119 of file gadminserver.h.

Constructor & Destructor Documentation

◆ AdminServer()

GSmtp::AdminServer::AdminServer ( GNet::ExceptionSink  es,
MessageStore store,
FilterFactory ff,
G::Slot::Signal< const std::string & > &  forward_request,
const GNet::ServerPeerConfig server_peer_config,
const GNet::ServerConfig server_config,
const GSmtp::Client::Config client_config,
const GAuth::SaslClientSecrets client_secrets,
const G::StringArray interfaces,
unsigned int  port,
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.

Definition at line 342 of file gadminserver.cpp.

◆ ~AdminServer()

GSmtp::AdminServer::~AdminServer ( )
override

Destructor.

Definition at line 366 of file gadminserver.cpp.

Member Function Documentation

◆ clientConfig()

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

Returns the client configuration.

Definition at line 455 of file gadminserver.cpp.

◆ clientSecrets()

const GAuth::SaslClientSecrets & GSmtp::AdminServer::clientSecrets ( ) const

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

This is a client-side secrets file, used to authenticate ourselves with a remote server.

Definition at line 445 of file gadminserver.cpp.

◆ connectionTimeout()

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

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

Definition at line 450 of file gadminserver.cpp.

◆ ff()

GSmtp::FilterFactory & GSmtp::AdminServer::ff ( )

Returns a reference to the filter factory, as passed in to the constructor.

Definition at line 440 of file gadminserver.cpp.

◆ forward()

void GSmtp::AdminServer::forward ( )

Called to trigger asynchronous forwarding.

Definition at line 394 of file gadminserver.cpp.

◆ newPeer()

std::unique_ptr< GNet::ServerPeer > GSmtp::AdminServer::newPeer ( GNet::ExceptionSinkUnbound  esu,
GNet::ServerPeerInfo  peer_info,
GNet::MultiServer::ServerInfo   
)
overrideprotectedvirtual

Override from GNet::MultiServer.

Implements GNet::MultiServer.

Definition at line 371 of file gadminserver.cpp.

◆ notify()

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

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

Definition at line 417 of file gadminserver.cpp.

◆ notifying()

bool GSmtp::AdminServer::notifying ( ) const

Returns true if the remote user has asked for notifications.

Definition at line 460 of file gadminserver.cpp.

◆ report()

void GSmtp::AdminServer::report ( ) const

Generates helpful diagnostics.

Definition at line 412 of file gadminserver.cpp.

◆ store()

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

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

Definition at line 435 of file gadminserver.cpp.


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