summaryrefslogtreecommitdiffstats
path: root/src/modules/SystemBackendPosix.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/SystemBackendPosix.h')
-rw-r--r--src/modules/SystemBackendPosix.h22
1 files changed, 12 insertions, 10 deletions
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 <vector>
#include <sys/types.h>
-#include <sigc++/slot.h>
-#include <sigc++/adaptors/hide.h>
+
+#include <boost/bind.hpp>
namespace Mad {
namespace Modules {
+// TODO SystemBackendPosix doesn't work !!!
+
class SystemBackendPosix : private Common::SystemBackend {
private:
static SystemBackendPosix *backend;
- static std::map<pid_t, sigc::slot<void, int> > processes;
+ static std::map<pid_t, boost::function1<void, int> > processes;
- static std::map<pid_t, sigc::slot<void, int, const std::string&> > processesWithOutput;
+ static std::map<pid_t, boost::function2<void, int, const std::string&> > processesWithOutput;
static std::map<pid_t, int> processesWOHandles;
static std::map<pid_t, std::string > processesWOOutput;
@@ -55,13 +57,13 @@ class SystemBackendPosix : private Common::SystemBackend {
setChildHandler();
}
- void fsInfoCallback(int, const std::string &output, const sigc::slot<void, const std::vector<Common::SystemManager::FSInfo>& > &callback);
+ void fsInfoCallback(int, const std::string &output, const boost::function1<void, const std::vector<Common::SystemManager::FSInfo>& > &callback);
protected:
- virtual bool getFSInfo(const sigc::slot<void, const std::vector<Common::SystemManager::FSInfo>& > &callback);
+ virtual bool getFSInfo(const boost::function1<void, const std::vector<Common::SystemManager::FSInfo>& > &callback);
- virtual bool shutdown(const sigc::slot<void> &callback) {return exec(sigc::hide(callback), "/sbin/halt");}
- virtual bool reboot(const sigc::slot<void> &callback) {return exec(sigc::hide(callback), "/sbin/reboot");}
+ virtual bool shutdown(const boost::function0<void> &callback) {return exec(boost::bind(callback), "/sbin/halt");}
+ virtual bool reboot(const boost::function0<void> &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<void, int> &resultHandler, const std::string &filename, const std::vector<std::string> &argv = std::vector<std::string>(),
+ static bool exec(const boost::function1<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>());
- static bool execWithOutput(const sigc::slot<void, int, const std::string&> &resultHandler, const std::string &filename, const std::vector<std::string> &argv = std::vector<std::string>(),
+ static bool execWithOutput(const boost::function2<void, int, const std::string&> &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>());
};