diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-06-04 22:23:07 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-06-04 22:23:07 +0200 |
commit | 0b27c37fe95c6aced613d51a3624f8930a96ad3f (patch) | |
tree | 5cb92568f70fe9789e99633ec71048389efb7fa4 /src/Common/RequestHandlers | |
parent | 50d92f64547c5c06851976ceab5ed631ec93f647 (diff) | |
download | mad-0b27c37fe95c6aced613d51a3624f8930a96ad3f.tar mad-0b27c37fe95c6aced613d51a3624f8930a96ad3f.zip |
RequestHandler-Interface ?berarbeitet
Diffstat (limited to 'src/Common/RequestHandlers')
6 files changed, 9 insertions, 21 deletions
diff --git a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp index ac8e7dc..942da0a 100644 --- a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp +++ b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp @@ -25,8 +25,8 @@ namespace Mad { namespace Common { namespace RequestHandlers { -void DisconnectRequestHandler::handlePacket(const XmlPacket &packet) { - if(packet.getType() != "Disconnect") { +void DisconnectRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packet) { + if(packet->getType() != "Disconnect") { Logger::log(Logger::ERROR, "Received an unexpected packet."); XmlPacket ret; diff --git a/src/Common/RequestHandlers/DisconnectRequestHandler.h b/src/Common/RequestHandlers/DisconnectRequestHandler.h index 05b9c50..963f603 100644 --- a/src/Common/RequestHandlers/DisconnectRequestHandler.h +++ b/src/Common/RequestHandlers/DisconnectRequestHandler.h @@ -28,11 +28,7 @@ namespace RequestHandlers { class DisconnectRequestHandler : public RequestHandler { protected: - virtual void handlePacket(const XmlPacket &packet); - - public: - DisconnectRequestHandler(Connection *connection, uint16_t requestId) - : RequestHandler(connection, requestId) {} + virtual void handlePacket(boost::shared_ptr<const XmlPacket> packet); }; } diff --git a/src/Common/RequestHandlers/FSInfoRequestHandler.cpp b/src/Common/RequestHandlers/FSInfoRequestHandler.cpp index 9044c68..845258b 100644 --- a/src/Common/RequestHandlers/FSInfoRequestHandler.cpp +++ b/src/Common/RequestHandlers/FSInfoRequestHandler.cpp @@ -27,8 +27,8 @@ namespace Mad { namespace Common { namespace RequestHandlers { -void FSInfoRequestHandler::handlePacket(const XmlPacket &packet) { - if(packet.getType() != "FSInfo") { +void FSInfoRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packet) { + if(packet->getType() != "FSInfo") { Logger::log(Logger::ERROR, "Received an unexpected packet."); XmlPacket ret; diff --git a/src/Common/RequestHandlers/FSInfoRequestHandler.h b/src/Common/RequestHandlers/FSInfoRequestHandler.h index 47fcbd8..6d21787 100644 --- a/src/Common/RequestHandlers/FSInfoRequestHandler.h +++ b/src/Common/RequestHandlers/FSInfoRequestHandler.h @@ -31,11 +31,7 @@ namespace RequestHandlers { class FSInfoRequestHandler : public RequestHandler { protected: - virtual void handlePacket(const XmlPacket &packet); - - public: - FSInfoRequestHandler(Connection *connection, uint16_t requestId) - : RequestHandler(connection, requestId) {} + virtual void handlePacket(boost::shared_ptr<const XmlPacket> packet); }; } diff --git a/src/Common/RequestHandlers/StatusRequestHandler.cpp b/src/Common/RequestHandlers/StatusRequestHandler.cpp index e766670..989ce7c 100644 --- a/src/Common/RequestHandlers/StatusRequestHandler.cpp +++ b/src/Common/RequestHandlers/StatusRequestHandler.cpp @@ -28,8 +28,8 @@ namespace Mad { namespace Common { namespace RequestHandlers { -void StatusRequestHandler::handlePacket(const XmlPacket &packet) { - if(packet.getType() != "GetStatus") { +void StatusRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packet) { + if(packet->getType() != "GetStatus") { Logger::log(Logger::ERROR, "Received an unexpected packet."); XmlPacket ret; diff --git a/src/Common/RequestHandlers/StatusRequestHandler.h b/src/Common/RequestHandlers/StatusRequestHandler.h index 151852c..656a1a5 100644 --- a/src/Common/RequestHandlers/StatusRequestHandler.h +++ b/src/Common/RequestHandlers/StatusRequestHandler.h @@ -29,11 +29,7 @@ namespace RequestHandlers { class StatusRequestHandler : public RequestHandler { protected: - virtual void handlePacket(const XmlPacket &packet); - - public: - StatusRequestHandler(Connection *connection, uint16_t requestId) - : RequestHandler(connection, requestId) {} + virtual void handlePacket(boost::shared_ptr<const XmlPacket> packet); }; } |