From f85b6d5ab264910f272e69ce5997cebec54886ce Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 24 Feb 2009 22:03:34 +0100 Subject: Requests Status, DaemonStatus und UserList in XmlRequests umgewandelt --- src/Common/Requests/UserListRequest.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Common/Requests/UserListRequest.cpp') diff --git a/src/Common/Requests/UserListRequest.cpp b/src/Common/Requests/UserListRequest.cpp index cd9c760..2545677 100644 --- a/src/Common/Requests/UserListRequest.cpp +++ b/src/Common/Requests/UserListRequest.cpp @@ -25,16 +25,19 @@ namespace Common { namespace Requests { void UserListRequest::sendRequest(Net::Connection *connection, uint16_t requestId) { - connection->send(Net::Packet(Net::Packet::USERS_LIST, requestId)); + XmlPacket packet; + packet.setType("ListUsers"); + + connection->send(packet.encode(requestId)); } -void UserListRequest::handlePacket(Net::Connection*, const Net::Packet &packet) { - if(packet.getType() != Net::Packet::OK) { +void UserListRequest::handlePacket(Net::Connection*, uint16_t, const XmlPacket &packet) { + if(packet.getType() != "OK") { finishWithError(Exception(Exception::UNEXPECTED_PACKET)); return; // TODO Logging } - finish(Net::Packets::UserListPacket(packet)); + finish(packet); } } -- cgit v1.2.3