summaryrefslogtreecommitdiffstats
path: root/src/Client/Requests/DaemonListRequest.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-02-28 19:09:43 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-02-28 19:09:43 +0100
commit46c110f7a14e4b5d0e8bd27259f7744ae8a36382 (patch)
tree94693ecffb8f1c553c12ea3a30920b2008e27b11 /src/Client/Requests/DaemonListRequest.cpp
parent8f85624a76934b14e0ba0f49413f471f8f4aa4f1 (diff)
downloadmad-46c110f7a14e4b5d0e8bd27259f7744ae8a36382.tar
mad-46c110f7a14e4b5d0e8bd27259f7744ae8a36382.zip
DaemonListRequest und DaemonStateUpdateRequest benutzen jetzt XML
Diffstat (limited to 'src/Client/Requests/DaemonListRequest.cpp')
-rw-r--r--src/Client/Requests/DaemonListRequest.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Client/Requests/DaemonListRequest.cpp b/src/Client/Requests/DaemonListRequest.cpp
index 690aaea..ec80828 100644
--- a/src/Client/Requests/DaemonListRequest.cpp
+++ b/src/Client/Requests/DaemonListRequest.cpp
@@ -25,16 +25,19 @@ namespace Client {
namespace Requests {
void DaemonListRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
- connection->send(Net::Packet(Net::Packet::LIST_DAEMONS, requestId));
+ Common::XmlPacket packet;
+
+ packet.setType("ListHosts");
+ connection->send(packet.encode(requestId));
}
-void DaemonListRequest::handlePacket(Net::Connection*, const Net::Packet &packet) {
- if(packet.getType() != Net::Packet::OK) {
+void DaemonListRequest::handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet) {
+ if(packet.getType() != "OK") {
finishWithError(Common::Exception(Common::Exception::UNEXPECTED_PACKET));
return; // TODO Logging
}
- finish(Net::Packets::HostListPacket(packet));
+ finish(packet);
}
}