summaryrefslogtreecommitdiffstats
path: root/src/Common/RequestHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/RequestHandler.h')
-rw-r--r--src/Common/RequestHandler.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Common/RequestHandler.h b/src/Common/RequestHandler.h
index f36aae5..a0922a7 100644
--- a/src/Common/RequestHandler.h
+++ b/src/Common/RequestHandler.h
@@ -20,26 +20,23 @@
#ifndef MAD_COMMON_XMLREQUESTHANDLER_H_
#define MAD_COMMON_XMLREQUESTHANDLER_H_
+#include "Connection.h"
#include "XmlPacket.h"
#include <sigc++/signal.h>
#include <stdint.h>
namespace Mad {
-
-namespace Net {
-class Connection;
-}
-
namespace Common {
+class Connection;
class RequestManager;
class RequestHandler {
private:
sigc::signal<void> finished;
- Net::Connection *connection;
+ Connection *connection;
uint16_t requestId;
// Prevent shallow copy
@@ -47,11 +44,11 @@ class RequestHandler {
RequestHandler& operator=(const RequestHandler &o);
protected:
- RequestHandler(Net::Connection *connection0, uint16_t requestId0) : connection(connection0), requestId(requestId0) {}
+ RequestHandler(Connection *connection0, uint16_t requestId0) : connection(connection0), requestId(requestId0) {}
sigc::signal<void> signalFinished() {return finished;}
- Net::Connection* getConnection() const {
+ Connection* getConnection() const {
return connection;
}
@@ -59,7 +56,9 @@ class RequestHandler {
return requestId;
}
- bool sendPacket(const XmlPacket &packet);
+ bool sendPacket(const XmlPacket &packet) {
+ return connection->sendPacket(packet, requestId);
+ }
virtual void handlePacket(const XmlPacket &packet) = 0;