diff options
Diffstat (limited to 'src/Client/CommandParser.cpp')
-rw-r--r-- | src/Client/CommandParser.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Client/CommandParser.cpp b/src/Client/CommandParser.cpp index 526f434..27aac78 100644 --- a/src/Client/CommandParser.cpp +++ b/src/Client/CommandParser.cpp @@ -110,9 +110,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(connection, std::auto_ptr<Common::XmlRequest>(new Common::Requests::FSInfoRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::fsInfoRequestFinished)))); + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>(new Common::Requests::FSInfoRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::fsInfoRequestFinished)))); else if(args.size() == 2) - Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::XmlRequest>(new Requests::DaemonFSInfoRequest(args[1], sigc::mem_fun(CommandManager::get(), &CommandManager::daemonFSInfoRequestFinished)))); + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>(new Requests::DaemonFSInfoRequest(args[1], sigc::mem_fun(CommandManager::get(), &CommandManager::daemonFSInfoRequestFinished)))); else { Common::Logger::logf(Common::Logger::ERROR, "%s: Too many arguments.", args[0].c_str()); printUsage("fsinfo"); @@ -213,7 +213,7 @@ void CommandParser::rebootCommand(const std::vector<std::string> &args) { std::map<std::string, Common::HostInfo> hosts = parseHostList(std::vector<std::string>(args.begin()+1, args.end()), true); for(std::map<std::string, Common::HostInfo>::iterator host = hosts.begin(); host != hosts.end(); ++host) { - Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::XmlRequest>( + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>( new Requests::DaemonCommandRequest(host->first, true, sigc::mem_fun(CommandManager::get(), &CommandManager::daemonCommandRequestFinished)) )); @@ -231,7 +231,7 @@ void CommandParser::shutdownCommand(const std::vector<std::string> &args) { std::map<std::string, Common::HostInfo> hosts = parseHostList(std::vector<std::string>(args.begin()+1, args.end()), true); for(std::map<std::string, Common::HostInfo>::iterator host = hosts.begin(); host != hosts.end(); ++host) { - Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::XmlRequest>( + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>( new Requests::DaemonCommandRequest(host->first, false, sigc::mem_fun(CommandManager::get(), &CommandManager::daemonCommandRequestFinished)) )); @@ -241,9 +241,9 @@ 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(connection, std::auto_ptr<Common::XmlRequest>(new Common::Requests::StatusRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::statusRequestFinished)))); + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>(new Common::Requests::StatusRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::statusRequestFinished)))); else if(args.size() == 2) - Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::XmlRequest>(new Requests::DaemonStatusRequest(args[1], sigc::mem_fun(CommandManager::get(), &CommandManager::daemonStatusRequestFinished)))); + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>(new Requests::DaemonStatusRequest(args[1], sigc::mem_fun(CommandManager::get(), &CommandManager::daemonStatusRequestFinished)))); else { Common::Logger::logf(Common::Logger::ERROR, "%s: Too many arguments.", args[0].c_str()); printUsage("status"); @@ -256,13 +256,13 @@ void CommandParser::statusCommand(const std::vector<std::string> &args) { void CommandParser::listUsersCommand(const std::vector<std::string>&) { ++CommandManager::get()->activeRequests; - Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::XmlRequest>(new Common::Requests::UserListRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::userListRequestFinished)))); + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>(new Common::Requests::UserListRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::userListRequestFinished)))); } void CommandParser::exitCommand(const std::vector<std::string>&) { ++CommandManager::get()->activeRequests; - Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::XmlRequest>(new Common::Requests::DisconnectRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::disconnectRequestFinished)))); + Common::RequestManager::get()->sendRequest(connection, std::auto_ptr<Common::Request>(new Common::Requests::DisconnectRequest(sigc::mem_fun(CommandManager::get(), &CommandManager::disconnectRequestFinished)))); } bool CommandParser::parse(const std::string &cmd) { |