diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-10-03 01:30:27 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-10-03 01:30:27 +0200 |
commit | 426d60a6992259ca80431c59e916073cc31f5261 (patch) | |
tree | ce88e01006e91ce4c159afc645777f9b458110b3 /src/Common/Backends/SystemBackendPosix.h | |
parent | 2f5eba3ce1bddf30b23444042f955adc10d84855 (diff) | |
download | mad-426d60a6992259ca80431c59e916073cc31f5261.tar mad-426d60a6992259ca80431c59e916073cc31f5261.zip |
Callback-basierte SystemBackends f?r h?here Flexibilit?t
Diffstat (limited to 'src/Common/Backends/SystemBackendPosix.h')
-rw-r--r-- | src/Common/Backends/SystemBackendPosix.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Common/Backends/SystemBackendPosix.h b/src/Common/Backends/SystemBackendPosix.h index 9efd59f..4a2c572 100644 --- a/src/Common/Backends/SystemBackendPosix.h +++ b/src/Common/Backends/SystemBackendPosix.h @@ -28,6 +28,7 @@ #include <sys/types.h> #include <sigc++/signal.h> +#include <sigc++/hide.h> namespace Mad { namespace Common { @@ -47,8 +48,8 @@ class SystemBackendPosix : public SystemBackend { } protected: - virtual bool doShutdown() {return exec(sigc::slot<void, int>(), "/sbin/halt");} - virtual bool doReboot() {return exec(sigc::slot<void, int>(), "/sbin/reboot");} + virtual bool doShutdown(const sigc::slot<void> &callback) {return exec(sigc::hide(callback), "/sbin/halt");} + virtual bool doReboot(const sigc::slot<void> &callback) {return exec(sigc::hide(callback), "/sbin/reboot");} public: ~SystemBackendPosix(); @@ -61,7 +62,7 @@ class SystemBackendPosix : public SystemBackend { SystemBackend::unregisterBackend(&backend); } - static bool exec(sigc::slot<void, int> resultHandler, const std::string &filename, const std::vector<std::string> &argv = std::vector<std::string>(), + static bool exec(const sigc::slot<void, int> &resultHandler, const std::string &filename, const std::vector<std::string> &argv = std::vector<std::string>(), const std::vector<std::string> &env = std::vector<std::string>()); }; |