- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

admin.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2001-2013 Graeme Walker <graeme_walker@users.sourceforge.net>
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 // ===
20
21 #ifndef G_MAIN_ADMIN_H
22 #define G_MAIN_ADMIN_H
23
24 #include "gdef.h"
25 #include "gsmtp.h"
26 #include "gsmtpclient.h"
27 #include "gsecrets.h"
28 #include "gadminserver.h"
29 #include "configuration.h"
30 #include <memory>
31 #include <string>
32
34 namespace Main
35 {
36 class Admin ;
37 }
38
42 class Main::Admin
43 {
44 public:
45 static bool enabled() ;
47
48 static std::auto_ptr<GSmtp::AdminServer> newServer( const Configuration & ,
49 GSmtp::MessageStore & store , const GSmtp::Client::Config & ,
50 const GAuth::Secrets & client_secrets , const std::string & version_number ) ;
53
54 static void notify( GSmtp::AdminServer & server , const std::string & , const std::string & , const std::string & );
56
57 static void report( const GSmtp::AdminServer & server ) ;
59
60 private:
61 Admin() ; // not implemented
62 } ;
63
64 #endif
Main
Application-level classes.
GSmtp::AdminServer
A server class which implements the emailrelay administration interface.
Definition: gadminserver.h:112
gadminserver.h
Main::Admin::enabled
static bool enabled()
Returns true if newServer() is fully implemented.
Definition: admin_enabled.cpp:27
Main::Admin
A factory class for creating GSmtp::AdminServer objects.
Definition: admin.h:42
configuration.h
gsecrets.h
GSmtp::MessageStore
A class which allows SMTP messages (envelope+content) to be stored and retrieved. ...
Definition: gmessagestore.h:45
GAuth::Secrets
A simple interface to a store of secrets as used in authentication.
Definition: gsecrets.h:44
Main::Admin::newServer
static std::auto_ptr< GSmtp::AdminServer > newServer(const Configuration &, GSmtp::MessageStore &store, const GSmtp::Client::Config &, const GAuth::Secrets &client_secrets, const std::string &version_number)
A factory function for creating a new GSmtp::AdminServer instance on the heap.
Definition: admin_enabled.cpp:32
GSmtp::Client::Config
A structure containing GSmtp::Client configuration parameters.
Definition: gsmtpclient.h:61
Main::Admin::report
static void report(const GSmtp::AdminServer &server)
Calls report() on the given server.
Definition: admin_enabled.cpp:71
gsmtp.h
gsmtpclient.h
Main::Configuration
An interface for returning application configuration information.
Definition: configuration.h:45
Main::Admin::notify
static void notify(GSmtp::AdminServer &server, const std::string &, const std::string &, const std::string &)
Calls notify() on the given server.
Definition: admin_enabled.cpp:65