diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-11-20 00:33:28 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-11-20 00:33:28 +0100 |
commit | 0a1df98c0420e9ac097622f2bddcd73a6488ed52 (patch) | |
tree | 65f5eaa940bcf5d8c38b88b4fd369cfee43a4a7f /src/Core/ConnectionManager.h | |
parent | 854421e2c144ab6454d67beb6640579ad13f1a1f (diff) | |
download | mad-0a1df98c0420e9ac097622f2bddcd73a6488ed52.tar mad-0a1df98c0420e9ac097622f2bddcd73a6488ed52.zip |
SingletonPtr hinzugefuegt
Diffstat (limited to 'src/Core/ConnectionManager.h')
-rw-r--r-- | src/Core/ConnectionManager.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Core/ConnectionManager.h b/src/Core/ConnectionManager.h index c17bae5..86c342c 100644 --- a/src/Core/ConnectionManager.h +++ b/src/Core/ConnectionManager.h @@ -27,8 +27,8 @@ #include <Common/Configurable.h> #include <Common/Exception.h> #include <Common/HostInfo.h> -#include <Common/Initializable.h> #include <Common/RequestManager.h> +#include <Common/SingletonPtr.h> #include <Net/IPAddress.h> @@ -45,7 +45,7 @@ namespace Core { class ConnectionManager : public Common::Configurable { private: - static ConnectionManager connectionManager; + static Common::SingletonPtr<ConnectionManager> connectionManager; std::string x509TrustFile, x509CrlFile, x509CertFile, x509KeyFile; @@ -62,22 +62,20 @@ class ConnectionManager : public Common::Configurable { ConnectionManager(const ConnectionManager &o); ConnectionManager& operator=(const ConnectionManager &o); - ConnectionManager() {} - void handleConnections(std::list<Net::ServerConnection*> &connections); void updateState(const std::string &name, Common::HostInfo::State state); protected: - virtual void doInit(); - virtual void doDeinit(); - virtual bool handleConfigEntry(const Common::ConfigEntry &entry, bool handled); virtual void configFinished(); public: + ConnectionManager(); + virtual ~ConnectionManager(); + static ConnectionManager* get() { - return &connectionManager; + return connectionManager.get(); } void run(); |