From fc3c50063f659584b2145addab8236a479a031b7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 18 May 2009 19:53:51 +0200 Subject: Von sigc++ auf boost-signals migriert --- src/modules/SystemBackendPosix.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/modules/SystemBackendPosix.h') diff --git a/src/modules/SystemBackendPosix.h b/src/modules/SystemBackendPosix.h index b12af6b..6d9b65f 100644 --- a/src/modules/SystemBackendPosix.h +++ b/src/modules/SystemBackendPosix.h @@ -27,18 +27,20 @@ #include #include -#include -#include + +#include namespace Mad { namespace Modules { +// TODO SystemBackendPosix doesn't work !!! + class SystemBackendPosix : private Common::SystemBackend { private: static SystemBackendPosix *backend; - static std::map > processes; + static std::map > processes; - static std::map > processesWithOutput; + static std::map > processesWithOutput; static std::map processesWOHandles; static std::map processesWOOutput; @@ -55,13 +57,13 @@ class SystemBackendPosix : private Common::SystemBackend { setChildHandler(); } - void fsInfoCallback(int, const std::string &output, const sigc::slot& > &callback); + void fsInfoCallback(int, const std::string &output, const boost::function1& > &callback); protected: - virtual bool getFSInfo(const sigc::slot& > &callback); + virtual bool getFSInfo(const boost::function1& > &callback); - virtual bool shutdown(const sigc::slot &callback) {return exec(sigc::hide(callback), "/sbin/halt");} - virtual bool reboot(const sigc::slot &callback) {return exec(sigc::hide(callback), "/sbin/reboot");} + virtual bool shutdown(const boost::function0 &callback) {return exec(boost::bind(callback), "/sbin/halt");} + virtual bool reboot(const boost::function0 &callback) {return exec(boost::bind(callback), "/sbin/reboot");} public: ~SystemBackendPosix(); @@ -83,10 +85,10 @@ class SystemBackendPosix : private Common::SystemBackend { backend = 0; } - static bool exec(const sigc::slot &resultHandler, const std::string &filename, const std::vector &argv = std::vector(), + static bool exec(const boost::function1 &resultHandler, const std::string &filename, const std::vector &argv = std::vector(), const std::vector &env = std::vector()); - static bool execWithOutput(const sigc::slot &resultHandler, const std::string &filename, const std::vector &argv = std::vector(), + static bool execWithOutput(const boost::function2 &resultHandler, const std::string &filename, const std::vector &argv = std::vector(), const std::vector &env = std::vector()); }; -- cgit v1.2.3