diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-06-01 23:03:29 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-06-01 23:03:29 +0200 |
commit | dcf66f3cc133bf600190b844ab9c0da764e5e82b (patch) | |
tree | e3d30777ae7751841cba3bb2aee524cb5438fb9a /src/Server | |
parent | a77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898 (diff) | |
download | mad-dcf66f3cc133bf600190b844ab9c0da764e5e82b.tar mad-dcf66f3cc133bf600190b844ab9c0da764e5e82b.zip |
?berarbeitung der Request-Klasse begonnen
Diffstat (limited to 'src/Server')
7 files changed, 11 insertions, 11 deletions
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<boost::shared_ptr<ServerConnection> >::iterator con = connections.begin(); con != connections.end(); ++con) { if((*con)->getConnectionType() == ServerConnection::CLIENT) - Common::RequestManager::get()->sendRequest<Requests::DaemonStateUpdateRequest>(con->get(), boost::bind(&ConnectionManager::updateStateFinished, this, _1), hostInfo->getName(), state); + Common::RequestManager::get()->sendRequest2<Requests::DaemonStateUpdateRequest>(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<Common::Connection> daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]); - Common::RequestManager::get()->sendRequest<Requests::CommandRequest>(daemonCon.get(), - boost::bind(&DaemonCommandRequestHandler::requestFinished, this, _1), command == "reboot"); + Common::RequestManager::get()->sendRequest1<Requests::CommandRequest>(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<Common::Connection> daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]); - Common::RequestManager::get()->sendRequest<Common::Requests::FSInfoRequest>(daemonCon.get(), + Common::RequestManager::get()->sendRequest0<Common::Requests::FSInfoRequest>(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<Common::Connection> daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName); - Common::RequestManager::get()->sendRequest<Common::Requests::StatusRequest>(daemonCon.get(), + Common::RequestManager::get()->sendRequest0<Common::Requests::StatusRequest>(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); |