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

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

#include <gadminserver.h>

Classes

struct  Config
 A configuration structure for GSmtp::AdminServer. More...
 

Public Types

enum class  Command { forward , dnsbl , smtp_enable }
 

Public Member Functions

 AdminServer (GNet::EventState, GStore::MessageStore &store, FilterFactoryBase &, const GAuth::SaslClientSecrets &client_secrets, const G::StringArray &interfaces, const Config &config)
 Constructor. More...
 
 ~AdminServer ()
 Destructor.
 
G::Slot::Signal< Command, unsigned int > & commandSignal ()
 Returns a reference to a signal that is emit()ted when the remote user makes a request. More...
 
void report (const std::string &group={}) const
 Generates helpful diagnostics. More...
 
GStore::MessageStorestore ()
 Returns a reference to the message store, as passed in to the constructor. More...
 
FilterFactoryBaseff ()
 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...
 
void emitCommand (Command, unsigned int)
 Emits an asynchronous event on the commandSignal(). 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
 
AdminServeroperator= (const AdminServer &)=delete
 
AdminServeroperator= (AdminServer &&)=delete
 

Static Public Member Functions

static bool enabled ()
 Returns true if the server is enabled. More...
 

Detailed Description

A server class which implements the emailrelay administration interface.

Definition at line 121 of file gadminserver.h.

Member Enumeration Documentation

◆ Command

enum class GSmtp::AdminServer::Command
strong

Definition at line 145 of file gadminserver.h.

Constructor & Destructor Documentation

◆ AdminServer()

GSmtp::AdminServer::AdminServer ( GNet::EventState  es,
GStore::MessageStore store,
FilterFactoryBase ff,
const GAuth::SaslClientSecrets client_secrets,
const G::StringArray interfaces,
const Config config 
)

Constructor.

Definition at line 33 of file gadminserver_disabled.cpp.

Member Function Documentation

◆ 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 69 of file gadminserver_disabled.cpp.

◆ commandSignal()

G::Slot::Signal< GSmtp::AdminServer::Command, unsigned int > & GSmtp::AdminServer::commandSignal ( )

Returns a reference to a signal that is emit()ted when the remote user makes a request.

Definition at line 46 of file gadminserver_disabled.cpp.

◆ emitCommand()

void GSmtp::AdminServer::emitCommand ( Command  command,
unsigned int  arg 
)

Emits an asynchronous event on the commandSignal().

Used by AdminServerPeer.

Definition at line 42 of file gadminserver_disabled.cpp.

◆ enabled()

bool GSmtp::AdminServer::enabled ( )
static

Returns true if the server is enabled.

Definition at line 28 of file gadminserver_disabled.cpp.

◆ ff()

GSmtp::FilterFactoryBase & GSmtp::AdminServer::ff ( )

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

Definition at line 64 of file gadminserver_disabled.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 55 of file gadminserver_disabled.cpp.

◆ notifying()

bool GSmtp::AdminServer::notifying ( ) const

Returns true if the remote user has asked for notifications.

Definition at line 74 of file gadminserver_disabled.cpp.

◆ report()

void GSmtp::AdminServer::report ( const std::string &  group = {}) const

Generates helpful diagnostics.

Definition at line 51 of file gadminserver_disabled.cpp.

◆ store()

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

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

Definition at line 59 of file gadminserver_disabled.cpp.


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