summaryrefslogtreecommitdiffstats
path: root/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server/RequestHandlers/UserRequestHandlerGroup.cpp')
-rw-r--r--src/Server/RequestHandlers/UserRequestHandlerGroup.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp
index 1b6dd3d..1ff8883 100644
--- a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp
+++ b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp
@@ -26,39 +26,6 @@ namespace Mad {
namespace Server {
namespace RequestHandlers {
-void UserRequestHandlerGroup::RequestHandler::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) {
- if(packet->getType() != type) {
- Common::Logger::log(Common::Logger::ERROR, "Received an unexpected packet.");
-
- Common::XmlPacket ret;
- ret.setType("Error");
- ret.add("ErrorCode", Net::Exception::UNEXPECTED_PACKET);
-
- sendPacket(ret);
-
- signalFinished();
- return;
- }
-
- // TODO Require authentication
-
- Common::XmlPacket ret;
-
- try {
- handler(packet, &ret);
- }
- catch(Net::Exception e) {
- ret.setType("Error");
- ret.add("ErrorCode", e.getErrorCode());
- ret.add("SubCode", e.getSubCode());
- ret.add("SubSubCode", e.getSubSubCode());
- ret.add("Where", e.getWhere());
- }
-
- sendPacket(ret);
- signalFinished();
-}
-
void UserRequestHandlerGroup::handleUserListRequest(boost::shared_ptr<const Common::XmlPacket> packet _UNUSED_PARAMETER_, Common::XmlPacket *ret) {
boost::shared_ptr<std::map<unsigned long, Common::UserInfo> > info = UserManager::get()->getUserList();
@@ -138,19 +105,6 @@ UserRequestHandlerGroup::UserRequestHandlerGroup() {
registerHandler("ListGroupUsers", &UserRequestHandlerGroup::handleGroupUserListRequest);
}
-const std::set<std::string>& UserRequestHandlerGroup::getPacketTypes() {
- return types;
-}
-
-boost::shared_ptr<Common::RequestHandler> UserRequestHandlerGroup::createRequestHandler(const std::string &type) {
- std::map<std::string, boost::function2<void, boost::shared_ptr<const Common::XmlPacket>, Common::XmlPacket*> >::iterator handler = handlers.find(type);
-
- if(handler == handlers.end())
- return boost::shared_ptr<Common::RequestHandler>();
- else
- return boost::shared_ptr<RequestHandler>(new RequestHandler(type, handler->second));
-}
-
}
}
}