summaryrefslogtreecommitdiffstats
path: root/src/Client/CommandManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Client/CommandManager.cpp')
-rw-r--r--src/Client/CommandManager.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/Client/CommandManager.cpp b/src/Client/CommandManager.cpp
index 8a82a82..2a20b29 100644
--- a/src/Client/CommandManager.cpp
+++ b/src/Client/CommandManager.cpp
@@ -106,46 +106,6 @@ void CommandManager::daemonCommandRequestFinished(const Common::Request<> &reque
requestFinished();
}
-void CommandManager::daemonListRequestFinished(const Common::Request<Net::Packets::HostListPacket> &request, bool all) {
- try {
- const std::vector<Common::HostInfo>& hosts = request.getResult().getHostInfo();
-
- if(hosts.empty()) {
- std::cout << "The host list is empty." << std::endl << std::endl;
- }
- else {
- bool output = false;
-
- for(std::vector<Common::HostInfo>::const_iterator host = hosts.begin(); host != hosts.end(); ++host) {
- if(host->getStatus() == Common::HostInfo::INACTIVE && !all)
- continue;
-
- if(!output) {
- std::cout << (all ? "Host list:" : "Active hosts:") << std::endl;
- output = true;
- }
-
- std::cout << " " << host->getName();
-
- if(all)
- std::cout << " (" << (host->getStatus() == Common::HostInfo::RUNNING ? "running" : "inactive") << ")";
-
- std::cout << std::endl;
- }
-
- if(!output)
- std::cout << "No active hosts." << std::endl;
-
- std::cout << std::endl;
- }
- }
- catch(Common::Exception &exception) {
- Common::Logger::logf(Common::Logger::ERROR, "An error occurred during your request: %s.", exception.strerror().c_str());
- }
-
- requestFinished();
-}
-
void CommandManager::daemonStatusRequestFinished(const Common::Request<Net::Packets::HostStatusPacket> &request) {
try {
const Net::Packets::HostStatusPacket &packet = request.getResult();