diff options
Diffstat (limited to 'src/Client/CommandParser.cpp')
-rw-r--r-- | src/Client/CommandParser.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/Client/CommandParser.cpp b/src/Client/CommandParser.cpp index 1b40046..78b3570 100644 --- a/src/Client/CommandParser.cpp +++ b/src/Client/CommandParser.cpp @@ -33,7 +33,8 @@ #include <iostream> #include <cstdio> -#include <sigc++/bind.h> + +#include <boost/bind.hpp> namespace Mad { namespace Client { @@ -111,9 +112,9 @@ std::map<std::string, Common::HostInfo> CommandParser::parseHostList(const std:: void CommandParser::fsinfoCommand(const std::vector<std::string> &args) { if(args.size() == 1) - Common::RequestManager::get()->sendRequest<Common::Requests::FSInfoRequest>(connection, sigc::mem_fun(CommandManager::get(), &CommandManager::fsInfoRequestFinished)); + Common::RequestManager::get()->sendRequest<Common::Requests::FSInfoRequest>(connection, boost::bind(&CommandManager::fsInfoRequestFinished, CommandManager::get(), _1)); else if(args.size() == 2) - Common::RequestManager::get()->sendRequest<Requests::DaemonFSInfoRequest>(connection, sigc::mem_fun(CommandManager::get(), &CommandManager::daemonFSInfoRequestFinished), args[1]); + Common::RequestManager::get()->sendRequest<Requests::DaemonFSInfoRequest>(connection, boost::bind(&CommandManager::daemonFSInfoRequestFinished, CommandManager::get(), _1), args[1]); else { Common::Logger::logf(Common::Logger::ERROR, "%s: Too many arguments.", args[0].c_str()); printUsage("fsinfo"); @@ -215,7 +216,7 @@ void CommandParser::rebootCommand(const std::vector<std::string> &args) { for(std::map<std::string, Common::HostInfo>::iterator host = hosts.begin(); host != hosts.end(); ++host) { Common::RequestManager::get()->sendRequest<Requests::DaemonCommandRequest>(connection, - sigc::mem_fun(CommandManager::get(), &CommandManager::daemonCommandRequestFinished), host->first, true + boost::bind(&CommandManager::daemonCommandRequestFinished, CommandManager::get(), _1), host->first, true ); ++CommandManager::get()->activeRequests; @@ -233,7 +234,7 @@ void CommandParser::shutdownCommand(const std::vector<std::string> &args) { for(std::map<std::string, Common::HostInfo>::iterator host = hosts.begin(); host != hosts.end(); ++host) { Common::RequestManager::get()->sendRequest<Requests::DaemonCommandRequest>(connection, - sigc::mem_fun(CommandManager::get(), &CommandManager::daemonCommandRequestFinished), host->first, false + boost::bind(&CommandManager::daemonCommandRequestFinished, CommandManager::get(), _1), host->first, false ); ++CommandManager::get()->activeRequests; @@ -243,10 +244,10 @@ void CommandParser::shutdownCommand(const std::vector<std::string> &args) { void CommandParser::statusCommand(const std::vector<std::string> &args) { if(args.size() == 1) Common::RequestManager::get()->sendRequest<Common::Requests::StatusRequest>(connection, - sigc::mem_fun(CommandManager::get(), &CommandManager::statusRequestFinished)); + boost::bind(&CommandManager::statusRequestFinished, CommandManager::get(), _1)); else if(args.size() == 2) Common::RequestManager::get()->sendRequest<Requests::DaemonStatusRequest>(connection, - sigc::mem_fun(CommandManager::get(), &CommandManager::daemonStatusRequestFinished), args[1]); + boost::bind(&CommandManager::daemonStatusRequestFinished, CommandManager::get(), _1), args[1]); else { Common::Logger::logf(Common::Logger::ERROR, "%s: Too many arguments.", args[0].c_str()); printUsage("status"); @@ -279,21 +280,21 @@ void CommandParser::userInfoCommand(const std::vector<std::string> &args) { ++CommandManager::get()->activeRequests; Common::RequestManager::get()->sendRequest<Common::Requests::UserInfoRequest>(connection, - sigc::mem_fun(CommandManager::get(), &CommandManager::userInfoRequestFinished), uid); + boost::bind(&CommandManager::userInfoRequestFinished, CommandManager::get(), _1), uid); } void CommandParser::listUsersCommand(const std::vector<std::string>&) { ++CommandManager::get()->activeRequests; Common::RequestManager::get()->sendRequest<Common::Requests::UserListRequest>(connection, - sigc::mem_fun(CommandManager::get(), &CommandManager::userListRequestFinished)); + boost::bind(&CommandManager::userListRequestFinished, CommandManager::get(), _1)); } void CommandParser::exitCommand(const std::vector<std::string>&) { ++CommandManager::get()->activeRequests; Common::RequestManager::get()->sendRequest<Common::Requests::DisconnectRequest>(connection, - sigc::mem_fun(CommandManager::get(), &CommandManager::disconnectRequestFinished)); + boost::bind(&CommandManager::disconnectRequestFinished, CommandManager::get(), _1)); } bool CommandParser::parse(const std::string &cmd) { |