summaryrefslogtreecommitdiff
path: root/lib/server/Daemon.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-08-21 11:02:24 +0000
committerChris Wilson <chris+github@qwirx.com>2008-08-21 11:02:24 +0000
commitd68ebb825e12bf7e3a99be456f0e02e5e374b7e3 (patch)
tree6da05f5b7d99ae83694d8226d77e6956fa2ce951 /lib/server/Daemon.h
parent9a18ee94ab13ede233930c59d5d958d94fb5d256 (diff)
Only set spDaemon in Daemon::Main, to allow Boxi to have a BackupDaemon
and a BackupStoreDaemon in the same process in separate threads. Separate out Configure(filename) and Configure(Configuration) for Boxi. Use a std::auto_ptr to hold the Configuration so that we don't have to worry about releasing it ourselves. Remove some #ifdef WIN32.
Diffstat (limited to 'lib/server/Daemon.h')
-rw-r--r--lib/server/Daemon.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/server/Daemon.h b/lib/server/Daemon.h
index e399a0ef..52faf38b 100644
--- a/lib/server/Daemon.h
+++ b/lib/server/Daemon.h
@@ -56,6 +56,7 @@ public:
virtual void Usage();
virtual bool Configure(const std::string& rConfigFileName);
+ virtual bool Configure(const Configuration& rConfig);
bool StopRun() {return mReloadConfigWanted | mTerminateWanted;}
bool IsReloadConfigWanted() {return mReloadConfigWanted;}
@@ -72,6 +73,10 @@ public:
{
mRunInForeground = foreground;
}
+ void SetSingleProcess(bool value)
+ {
+ mSingleProcess = value;
+ }
protected:
virtual void SetupInInitialProcess();
@@ -85,7 +90,7 @@ private:
box_time_t GetConfigFileModifiedTime() const;
std::string mConfigFileName;
- Configuration *mpConfiguration;
+ std::auto_ptr<Configuration> mapConfiguration;
box_time_t mLoadedConfigModifiedTime;
bool mReloadConfigWanted;
bool mTerminateWanted;