summaryrefslogtreecommitdiffstats
path: root/src/Server/RequestHandlers/UserRequestHandlerGroup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server/RequestHandlers/UserRequestHandlerGroup.h')
-rw-r--r--src/Server/RequestHandlers/UserRequestHandlerGroup.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/Server/RequestHandlers/UserRequestHandlerGroup.h b/src/Server/RequestHandlers/UserRequestHandlerGroup.h
index c24d502..52965dd 100644
--- a/src/Server/RequestHandlers/UserRequestHandlerGroup.h
+++ b/src/Server/RequestHandlers/UserRequestHandlerGroup.h
@@ -20,35 +20,14 @@
#ifndef MAD_SERVER_REQUESTHANDLERS_USERREQUESTHANDLERGROUP_H_
#define MAD_SERVER_REQUESTHANDLERS_USERREQUESTHANDLERGROUP_H_
-#include <Common/RequestHandlerGroup.h>
+#include <Common/RequestHandlers/SimpleRequestHandlerGroup.h>
namespace Mad {
namespace Server {
namespace RequestHandlers {
-class UserRequestHandlerGroup : public Common::RequestHandlerGroup {
+class UserRequestHandlerGroup : public Common::RequestHandlers::SimpleRequestHandlerGroup {
private:
- class RequestHandler : public Common::RequestHandler {
- private:
- std::string type;
- boost::function2<void, boost::shared_ptr<const Common::XmlPacket>, Common::XmlPacket*> handler;
-
- protected:
- virtual void handlePacket(boost::shared_ptr<const Common::XmlPacket> packet);
-
- public:
- RequestHandler(const std::string &type0, const boost::function2<void, boost::shared_ptr<const Common::XmlPacket>, Common::XmlPacket*> &handler0) : type(type0), handler(handler0) {}
- };
-
-
- std::set<std::string> types;
- std::map<std::string, boost::function2<void, boost::shared_ptr<const Common::XmlPacket>, Common::XmlPacket*> > handlers;
-
- void registerHandler(const std::string &type, const boost::function2<void, boost::shared_ptr<const Common::XmlPacket>, Common::XmlPacket*> &handler) {
- types.insert(type);
- handlers.insert(std::make_pair(type, handler));
- }
-
static void handleUserListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret);
static void handleUserInfoRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret);
static void handleUserGroupListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret);
@@ -57,9 +36,6 @@ class UserRequestHandlerGroup : public Common::RequestHandlerGroup {
public:
UserRequestHandlerGroup();
-
- virtual const std::set<std::string>& getPacketTypes();
- virtual boost::shared_ptr<Common::RequestHandler> createRequestHandler(const std::string &type);
};
}