From dcf66f3cc133bf600190b844ab9c0da764e5e82b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 1 Jun 2009 23:03:29 +0200 Subject: ?berarbeitung der Request-Klasse begonnen --- src/Server/ConnectionManager.cpp | 2 +- src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp | 6 +++--- src/Server/RequestHandlers/DaemonCommandRequestHandler.h | 2 +- src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp | 4 ++-- src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h | 2 +- src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp | 4 ++-- src/Server/RequestHandlers/DaemonStatusRequestHandler.h | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/Server') diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp index 37e04d2..cd02d21 100644 --- a/src/Server/ConnectionManager.cpp +++ b/src/Server/ConnectionManager.cpp @@ -86,7 +86,7 @@ void ConnectionManager::updateState(Common::HostInfo *hostInfo, Common::HostInfo for(std::set >::iterator con = connections.begin(); con != connections.end(); ++con) { if((*con)->getConnectionType() == ServerConnection::CLIENT) - Common::RequestManager::get()->sendRequest(con->get(), boost::bind(&ConnectionManager::updateStateFinished, this, _1), hostInfo->getName(), state); + Common::RequestManager::get()->sendRequest2(con->get(), hostInfo->getName(), state, boost::bind(&ConnectionManager::updateStateFinished, this, _1)); } } diff --git a/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp index 3a09de7..0a7bd39 100644 --- a/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp @@ -47,8 +47,8 @@ void DaemonCommandRequestHandler::handlePacket(const Common::XmlPacket &packet) try { boost::shared_ptr daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]); - Common::RequestManager::get()->sendRequest(daemonCon.get(), - boost::bind(&DaemonCommandRequestHandler::requestFinished, this, _1), command == "reboot"); + Common::RequestManager::get()->sendRequest1(daemonCon.get(), + command == "reboot", boost::bind(&DaemonCommandRequestHandler::requestFinished, this, _1)); } catch(Net::Exception &e) { Common::XmlPacket ret; @@ -62,7 +62,7 @@ void DaemonCommandRequestHandler::handlePacket(const Common::XmlPacket &packet) } } -void DaemonCommandRequestHandler::requestFinished(const Common::Request &request) { +void DaemonCommandRequestHandler::requestFinished(Common::Request &request) { try { sendPacket(request.getResult()); } diff --git a/src/Server/RequestHandlers/DaemonCommandRequestHandler.h b/src/Server/RequestHandlers/DaemonCommandRequestHandler.h index 6bd1278..b0b49df 100644 --- a/src/Server/RequestHandlers/DaemonCommandRequestHandler.h +++ b/src/Server/RequestHandlers/DaemonCommandRequestHandler.h @@ -30,7 +30,7 @@ namespace RequestHandlers { class DaemonCommandRequestHandler : public Common::RequestHandler { private: - void requestFinished(const Common::Request &request); + void requestFinished(Common::Request &request); protected: virtual void handlePacket(const Common::XmlPacket &packet); diff --git a/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp index 2bb316b..a9791b5 100644 --- a/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp @@ -45,7 +45,7 @@ void DaemonFSInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) { try { boost::shared_ptr daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]); - Common::RequestManager::get()->sendRequest(daemonCon.get(), + Common::RequestManager::get()->sendRequest0(daemonCon.get(), boost::bind(&DaemonFSInfoRequestHandler::requestFinished, this, _1)); } catch(Net::Exception &e) { @@ -60,7 +60,7 @@ void DaemonFSInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) { } } -void DaemonFSInfoRequestHandler::requestFinished(const Common::Request &request) { +void DaemonFSInfoRequestHandler::requestFinished(Common::Request &request) { try { sendPacket(request.getResult()); } diff --git a/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h index 3352f11..5d2ae1c 100644 --- a/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h +++ b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h @@ -30,7 +30,7 @@ namespace RequestHandlers { class DaemonFSInfoRequestHandler : public Common::RequestHandler { private: - void requestFinished(const Common::Request &request); + void requestFinished(Common::Request &request); protected: virtual void handlePacket(const Common::XmlPacket &packet); diff --git a/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp b/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp index 15f63c7..94df846 100644 --- a/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp @@ -47,7 +47,7 @@ void DaemonStatusRequestHandler::handlePacket(const Common::XmlPacket &packet) { try { boost::shared_ptr daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName); - Common::RequestManager::get()->sendRequest(daemonCon.get(), + Common::RequestManager::get()->sendRequest0(daemonCon.get(), boost::bind(&DaemonStatusRequestHandler::requestFinished, this, _1)); } catch(Net::Exception &e) { @@ -62,7 +62,7 @@ void DaemonStatusRequestHandler::handlePacket(const Common::XmlPacket &packet) { } } -void DaemonStatusRequestHandler::requestFinished(const Common::Request &request) { +void DaemonStatusRequestHandler::requestFinished(Common::Request &request) { try { sendPacket(request.getResult()); } diff --git a/src/Server/RequestHandlers/DaemonStatusRequestHandler.h b/src/Server/RequestHandlers/DaemonStatusRequestHandler.h index 8e61ada..de7f83d 100644 --- a/src/Server/RequestHandlers/DaemonStatusRequestHandler.h +++ b/src/Server/RequestHandlers/DaemonStatusRequestHandler.h @@ -30,7 +30,7 @@ namespace RequestHandlers { class DaemonStatusRequestHandler : public Common::RequestHandler { private: - void requestFinished(const Common::Request &request); + void requestFinished(Common::Request &request); protected: virtual void handlePacket(const Common::XmlPacket &packet); -- cgit v1.2.3