From 854421e2c144ab6454d67beb6640579ad13f1a1f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 19 Nov 2008 16:15:17 +0100 Subject: Kurze statische get()-Methoden --- src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp | 4 ++-- src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp | 4 ++-- src/Core/RequestHandlers/DaemonListRequestHandler.cpp | 2 +- src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp | 4 ++-- src/Core/RequestHandlers/IdentifyRequestHandler.cpp | 2 +- src/Core/RequestHandlers/LogRequestHandler.cpp | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/Core/RequestHandlers') diff --git a/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp b/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp index 9ae0bdd..6782b8d 100644 --- a/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp +++ b/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp @@ -44,8 +44,8 @@ void DaemonCommandRequestHandler::handlePacket(Net::Connection *connection, cons std::string daemonName((char*)packet.getData(), packet.getLength()); try { - Net::Connection *daemonCon = ConnectionManager::getConnectionManager()->getDaemonConnection(daemonName); - Common::RequestManager::getRequestManager()->sendRequest(daemonCon, std::auto_ptr( + Net::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName); + Common::RequestManager::get()->sendRequest(daemonCon, std::auto_ptr( new Requests::CommandRequest(packet.getType() == Net::Packet::DAEMON_COMMAND_REBOOT, sigc::mem_fun(this, &DaemonCommandRequestHandler::requestFinished)) )); } diff --git a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp b/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp index 1267520..3d371a9 100644 --- a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp +++ b/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp @@ -46,8 +46,8 @@ void DaemonFSInfoRequestHandler::handlePacket(Net::Connection *connection, const std::string daemonName((char*)packet.getData(), packet.getLength()); try { - Net::Connection *daemonCon = ConnectionManager::getConnectionManager()->getDaemonConnection(daemonName); - Common::RequestManager::getRequestManager()->sendRequest(daemonCon, std::auto_ptr(new Common::Requests::FSInfoRequest(sigc::mem_fun(this, &DaemonFSInfoRequestHandler::requestFinished)))); + Net::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName); + Common::RequestManager::get()->sendRequest(daemonCon, std::auto_ptr(new Common::Requests::FSInfoRequest(sigc::mem_fun(this, &DaemonFSInfoRequestHandler::requestFinished)))); } catch(Common::Exception &e) { connection->send(Net::Packets::ErrorPacket(Net::Packet::ERROR, packet.getRequestId(), e)); diff --git a/src/Core/RequestHandlers/DaemonListRequestHandler.cpp b/src/Core/RequestHandlers/DaemonListRequestHandler.cpp index cec1c5a..dcf9f53 100644 --- a/src/Core/RequestHandlers/DaemonListRequestHandler.cpp +++ b/src/Core/RequestHandlers/DaemonListRequestHandler.cpp @@ -39,7 +39,7 @@ void DaemonListRequestHandler::handlePacket(Net::Connection *connection, const N // TODO Require authentication - connection->send(Net::Packets::HostListPacket(Net::Packet::OK, packet.getRequestId(), ConnectionManager::getConnectionManager()->getDaemonList())); + connection->send(Net::Packets::HostListPacket(Net::Packet::OK, packet.getRequestId(), ConnectionManager::get()->getDaemonList())); signalFinished().emit(); } diff --git a/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp b/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp index 4add098..80b61ba 100644 --- a/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp +++ b/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp @@ -46,8 +46,8 @@ void DaemonStatusRequestHandler::handlePacket(Net::Connection *connection, const std::string daemonName((char*)packet.getData(), packet.getLength()); try { - Net::Connection *daemonCon = ConnectionManager::getConnectionManager()->getDaemonConnection(daemonName); - Common::RequestManager::getRequestManager()->sendRequest(daemonCon, std::auto_ptr(new Common::Requests::StatusRequest(sigc::mem_fun(this, &DaemonStatusRequestHandler::requestFinished)))); + Net::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName); + Common::RequestManager::get()->sendRequest(daemonCon, std::auto_ptr(new Common::Requests::StatusRequest(sigc::mem_fun(this, &DaemonStatusRequestHandler::requestFinished)))); } catch(Common::Exception &e) { connection->send(Net::Packets::ErrorPacket(Net::Packet::ERROR, packet.getRequestId(), e)); diff --git a/src/Core/RequestHandlers/IdentifyRequestHandler.cpp b/src/Core/RequestHandlers/IdentifyRequestHandler.cpp index 0d4f25d..9666f7e 100644 --- a/src/Core/RequestHandlers/IdentifyRequestHandler.cpp +++ b/src/Core/RequestHandlers/IdentifyRequestHandler.cpp @@ -39,7 +39,7 @@ void IdentifyRequestHandler::handlePacket(Net::Connection *connection, const Net // TODO Require authentication try { - ConnectionManager::getConnectionManager()->identifyDaemonConnection(connection, std::string((const char*)packet.getData(), packet.getLength())); + ConnectionManager::get()->identifyDaemonConnection(connection, std::string((const char*)packet.getData(), packet.getLength())); connection->send(Net::Packet(Net::Packet::OK, packet.getRequestId())); } diff --git a/src/Core/RequestHandlers/LogRequestHandler.cpp b/src/Core/RequestHandlers/LogRequestHandler.cpp index c2b2fde..e28ac8e 100644 --- a/src/Core/RequestHandlers/LogRequestHandler.cpp +++ b/src/Core/RequestHandlers/LogRequestHandler.cpp @@ -43,8 +43,8 @@ void LogRequestHandler::handlePacket(Net::Connection *connection, const Net::Pac Net::Packets::LogPacket logPacket(packet); try { - Common::LogManager::getLogManager()->log(logPacket.getCategory(), logPacket.getLevel(), logPacket.getTimestamp(), logPacket.getMessage().c_str(), - ConnectionManager::getConnectionManager()->getDaemonName(connection)); + Common::LogManager::get()->log(logPacket.getCategory(), logPacket.getLevel(), logPacket.getTimestamp(), logPacket.getMessage().c_str(), + ConnectionManager::get()->getDaemonName(connection)); } catch(Common::Exception &e) { Common::Logger::logf(Common::Logger::ERROR, "Can't determine daemon name: %s", e.strerror().c_str()); -- cgit v1.2.3