summaryrefslogtreecommitdiffstats
path: root/src/Common/Request.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-03-16 19:13:42 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-03-16 19:13:42 +0100
commit8f098fc3070f791302ec1f497588fab6ed409980 (patch)
tree6cff9f7bb973342344a22636a5d9ef26c7a0d940 /src/Common/Request.h
parentaef0f2e7a5085b8da3aa2e97565215d182d3dd2d (diff)
downloadmad-8f098fc3070f791302ec1f497588fab6ed409980.tar
mad-8f098fc3070f791302ec1f497588fab6ed409980.zip
Request- und RequestHandler-Interfaces vereinfacht
Diffstat (limited to 'src/Common/Request.h')
-rw-r--r--src/Common/Request.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Common/Request.h b/src/Common/Request.h
index ef84194..2c6c8d4 100644
--- a/src/Common/Request.h
+++ b/src/Common/Request.h
@@ -20,7 +20,6 @@
#ifndef MAD_COMMON_XMLREQUEST_H_
#define MAD_COMMON_XMLREQUEST_H_
-#include "XmlPacket.h"
#include "RequestHandler.h"
#include "Exception.h"
@@ -43,7 +42,8 @@ class Request : public RequestHandler {
typedef sigc::slot<void,const Request&> slot_type;
protected:
- Request(slot_type slot) : exp(Exception::NOT_FINISHED) {
+ Request(Net::Connection *connection, uint16_t requestId, slot_type slot)
+ : RequestHandler(connection, requestId), exp(Exception::NOT_FINISHED) {
finished.connect(slot);
finished.connect(sigc::hide(signalFinished().make_slot()));
}
@@ -52,8 +52,8 @@ class Request : public RequestHandler {
void finish(const XmlPacket& result) {res.reset(new XmlPacket(result)); finished(*this);}
void finishWithError(const Exception &e) {exp = e; finished(*this);}
- virtual void sendRequest(Net::Connection *connection, uint16_t requestId) = 0;
- virtual void handlePacket(Net::Connection *connection, uint16_t requestId, const XmlPacket &packet);
+ virtual void sendRequest() = 0;
+ virtual void handlePacket(const XmlPacket &packet);
public:
const XmlPacket& getResult() const throw(Exception) {