diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-29 19:26:02 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-29 19:26:02 +0200 |
commit | d803fa64b8ecc94425043b4551c79273b6fee11e (patch) | |
tree | 09ab81d9e259f6c962090d0c45fb83aa276dc440 /src/Client/CommandManager.cpp | |
parent | 3086f10f53ced17ab4a237ab57da62395d259f0a (diff) | |
download | mad-d803fa64b8ecc94425043b4551c79273b6fee11e.tar mad-d803fa64b8ecc94425043b4551c79273b6fee11e.zip |
Benutzte InformationManager zur Auflistung der Hosts
Diffstat (limited to 'src/Client/CommandManager.cpp')
-rw-r--r-- | src/Client/CommandManager.cpp | 40 |
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(); |