diff options
Diffstat (limited to 'src/Client/SystemCommands.cpp')
-rw-r--r-- | src/Client/SystemCommands.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Client/SystemCommands.cpp b/src/Client/SystemCommands.cpp index f1bcbbd..ff14cc5 100644 --- a/src/Client/SystemCommands.cpp +++ b/src/Client/SystemCommands.cpp @@ -35,15 +35,15 @@ namespace Mad { namespace Client { -void SystemCommands::printFSInfo(boost::shared_ptr<const Common::XmlPacket> &packet) { +void SystemCommands::printFSInfo(boost::shared_ptr<const Common::XmlData> &packet) { const std::string units[] = { "kB", "MB", "GB", "TB", "" }; - const Common::XmlPacket::List *list = packet->getList("filesystems"); + const Common::XmlData::List *list = packet->getList("filesystems"); if(list) { - for(Common::XmlPacket::List::const_iterator fs = list->begin(); fs != list->end(); ++fs) { + for(Common::XmlData::List::const_iterator fs = list->begin(); fs != list->end(); ++fs) { unsigned usedUnit = 0, totalUnit = 0; float used = fs->get<float>("usedSize"); @@ -86,7 +86,7 @@ void SystemCommands::printFSInfo(boost::shared_ptr<const Common::XmlPacket> &pac std::printf("\n"); } -void SystemCommands::printHostStatus(boost::shared_ptr<const Common::XmlPacket> &packet) { +void SystemCommands::printHostStatus(boost::shared_ptr<const Common::XmlData> &packet) { unsigned long uptime = packet->get<unsigned long>("uptime"); if(uptime) { @@ -165,7 +165,7 @@ void SystemCommands::fsinfoCommand(CommandParser *commandParser, const std::vect commandParser->application->getRequestManager()->sendRequest(commandParser->connection, request); request->wait(); - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult(); if(!result.first || result.second) { std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; @@ -202,7 +202,7 @@ void SystemCommands::rebootCommand(CommandParser *commandParser, const std::vect (*request)->wait(); for(std::vector<boost::shared_ptr<Requests::DaemonCommandRequest> >::iterator request = requests.begin(); request != requests.end(); ++request) { - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = (*request)->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = (*request)->getResult(); if(result.second) std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; @@ -231,7 +231,7 @@ void SystemCommands::shutdownCommand(CommandParser *commandParser, const std::ve (*request)->wait(); for(std::vector<boost::shared_ptr<Requests::DaemonCommandRequest> >::iterator request = requests.begin(); request != requests.end(); ++request) { - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = (*request)->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = (*request)->getResult(); if(result.second) std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; @@ -254,7 +254,7 @@ void SystemCommands::statusCommand(CommandParser *commandParser, const std::vect commandParser->application->getRequestManager()->sendRequest(commandParser->connection, request); request->wait(); - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult(); if(!result.first || result.second) { std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; |