summaryrefslogtreecommitdiffstats
path: root/src/Core/Requests
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-03-12 20:26:36 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-03-12 20:26:36 +0100
commit03e7a5b2fefa08d49ef34e70bfb1d52f0a7d828e (patch)
tree863952edd85e56578e0810adbdccea3a1bf47e61 /src/Core/Requests
parentde5fa3867791bf4bf84a52de8cd09821f9ce28ab (diff)
downloadmad-03e7a5b2fefa08d49ef34e70bfb1d52f0a7d828e.tar
mad-03e7a5b2fefa08d49ef34e70bfb1d52f0a7d828e.zip
Request-Klassen vereinfacht
Diffstat (limited to 'src/Core/Requests')
-rw-r--r--src/Core/Requests/CommandRequest.cpp13
-rw-r--r--src/Core/Requests/CommandRequest.h1
-rw-r--r--src/Core/Requests/DaemonStateUpdateRequest.cpp9
-rw-r--r--src/Core/Requests/DaemonStateUpdateRequest.h1
4 files changed, 0 insertions, 24 deletions
diff --git a/src/Core/Requests/CommandRequest.cpp b/src/Core/Requests/CommandRequest.cpp
index 8fdd4c2..a280bc5 100644
--- a/src/Core/Requests/CommandRequest.cpp
+++ b/src/Core/Requests/CommandRequest.cpp
@@ -32,19 +32,6 @@ void CommandRequest::sendRequest(Net::Connection *connection, uint16_t requestId
connection->send(packet.encode(requestId));
}
-void CommandRequest::handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet) {
- if(packet.getType() == "Error") {
- finishWithError(Common::Exception(packet["Where"], packet["ErrorCode"], packet["SubCode"], packet["SubSubCode"]));
- return;
- }
- else if(packet.getType() != "OK") {
- finishWithError(Common::Exception(Common::Exception::UNEXPECTED_PACKET));
- return; // TODO Logging
- }
-
- finish(packet);
-}
-
}
}
}
diff --git a/src/Core/Requests/CommandRequest.h b/src/Core/Requests/CommandRequest.h
index 9c6c70d..aece5ae 100644
--- a/src/Core/Requests/CommandRequest.h
+++ b/src/Core/Requests/CommandRequest.h
@@ -32,7 +32,6 @@ class CommandRequest : public Common::Request {
protected:
virtual void sendRequest(Net::Connection *connection, uint16_t requestId);
- virtual void handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet);
public:
CommandRequest(bool reboot0, slot_type slot) : Common::Request(slot), reboot(reboot0) {}
diff --git a/src/Core/Requests/DaemonStateUpdateRequest.cpp b/src/Core/Requests/DaemonStateUpdateRequest.cpp
index c00468e..abf51de 100644
--- a/src/Core/Requests/DaemonStateUpdateRequest.cpp
+++ b/src/Core/Requests/DaemonStateUpdateRequest.cpp
@@ -33,15 +33,6 @@ void DaemonStateUpdateRequest::sendRequest(Net::Connection *connection, uint16_t
connection->send(packet.encode(requestId));
}
-void DaemonStateUpdateRequest::handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet) {
- if(packet.getType() != "OK") {
- finishWithError(Common::Exception(Common::Exception::UNEXPECTED_PACKET));
- return; // TODO Logging
- }
-
- finish(packet);
-}
-
}
}
}
diff --git a/src/Core/Requests/DaemonStateUpdateRequest.h b/src/Core/Requests/DaemonStateUpdateRequest.h
index f1466b2..3f15e9b 100644
--- a/src/Core/Requests/DaemonStateUpdateRequest.h
+++ b/src/Core/Requests/DaemonStateUpdateRequest.h
@@ -34,7 +34,6 @@ class DaemonStateUpdateRequest : public Common::Request {
protected:
virtual void sendRequest(Net::Connection *connection, uint16_t requestId);
- virtual void handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet);
public:
DaemonStateUpdateRequest(const std::string &name0, Common::HostInfo::State state0) : Common::Request(slot_type()), name(name0), state(state0) {}