summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-10-17 12:53:07 +0000
committerChris Wilson <chris+github@qwirx.com>2007-10-17 12:53:07 +0000
commit10d5c119ea513a17ad9fad2c65942d482aa317dd (patch)
tree94b95faf550c06a7e355cfd871714064b524f9ab /lib
parentd4f5a3d2818414041fec547211f85ac83dd4adb7 (diff)
Make Main(), GetOptionString() and ProcessOption virtual so that they
can actually be overridden. (merges [1852])
Diffstat (limited to 'lib')
-rw-r--r--lib/server/Daemon.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/server/Daemon.h b/lib/server/Daemon.h
index 0f6d0c73..26bf6ff3 100644
--- a/lib/server/Daemon.h
+++ b/lib/server/Daemon.h
@@ -41,7 +41,9 @@ private:
public:
int Main(const char *DefaultConfigFile, int argc, const char *argv[]);
- int Main(const std::string &rConfigFile);
+
+ /* override this Main() if you want custom option processing: */
+ virtual int Main(const std::string &rConfigFile);
virtual void Run();
const Configuration &GetConfiguration() const;
@@ -67,8 +69,8 @@ public:
protected:
box_time_t GetLoadedConfigModifiedTime() const;
bool IsSingleProcess() { return mSingleProcess; }
- std::string GetOptionString();
- int ProcessOption(signed int option);
+ virtual std::string GetOptionString();
+ virtual int ProcessOption(signed int option);
private:
static void SignalHandler(int sigraised);