diff options
Diffstat (limited to 'src/Server')
8 files changed, 71 insertions, 71 deletions
diff --git a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp index af48d65..1348541 100644 --- a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp @@ -31,31 +31,31 @@ namespace Mad { namespace Server { namespace RequestHandlers { -void ConnectionRequestHandlerGroup::handleAuthMethodRequest(boost::shared_ptr<const Common::XmlPacket> /*packet*/, Common::XmlPacket *ret, +void ConnectionRequestHandlerGroup::handleAuthMethodRequest(boost::shared_ptr<const Common::XmlData> /*packet*/, Common::XmlData *ret, Common::Connection* /*connection*/) { ret->setType("OK"); - Common::XmlPacket::List *list = ret->createList("methods"); + Common::XmlData::List *list = ret->createList("methods"); std::set<std::string> methods = application->getAuthManager()->getMethods(); for(std::set<std::string>::iterator method = methods.begin(); method != methods.end(); ++method) { - Common::XmlPacket::List::iterator entry = list->addEntry(); + Common::XmlData::List::iterator entry = list->addEntry(); entry->set("name", *method); - Common::XmlPacket::List *subList = entry->createList("subMethods"); + Common::XmlData::List *subList = entry->createList("subMethods"); std::vector<std::string> subMethods = application->getAuthManager()->getSubMethods(*method); for(std::vector<std::string>::iterator subMethod = subMethods.begin(); subMethod != subMethods.end(); ++subMethod) { - Common::XmlPacket::List::iterator subEntry = subList->addEntry(); + Common::XmlData::List::iterator subEntry = subList->addEntry(); subEntry->set("name", *subMethod); } } } -void ConnectionRequestHandlerGroup::handleAuthRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection) { +void ConnectionRequestHandlerGroup::handleAuthRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { std::vector<boost::uint8_t> response; boost::shared_ptr<const Common::AuthContext> authContext = application->getConnectionManager()->authenticateConnection(connection, @@ -72,18 +72,18 @@ void ConnectionRequestHandlerGroup::handleAuthRequest(boost::shared_ptr<const Co ret->setType("Continue"); } -void ConnectionRequestHandlerGroup::handleDaemonListRequest(boost::shared_ptr<const Common::XmlPacket> /*packet*/, Common::XmlPacket *ret, +void ConnectionRequestHandlerGroup::handleDaemonListRequest(boost::shared_ptr<const Common::XmlData> /*packet*/, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); ret->setType("OK"); - Common::XmlPacket::List *list = ret->createList("hosts"); + Common::XmlData::List *list = ret->createList("hosts"); std::vector<Common::HostInfo> daemons = application->getConnectionManager()->getDaemonList(); for(std::vector<Common::HostInfo>::iterator daemon = daemons.begin(); daemon != daemons.end(); ++daemon) { - Common::XmlPacket::List::iterator entry = list->addEntry(); + Common::XmlData::List::iterator entry = list->addEntry(); entry->set("name", daemon->getName()); entry->set("address", daemon->getIP()); @@ -91,13 +91,13 @@ void ConnectionRequestHandlerGroup::handleDaemonListRequest(boost::shared_ptr<co } } -void ConnectionRequestHandlerGroup::handleIdentifyRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection) { +void ConnectionRequestHandlerGroup::handleIdentifyRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { application->getConnectionManager()->identifyDaemonConnection(connection, packet->get<const std::string&>("hostname")); ret->setType("OK"); } -void ConnectionRequestHandlerGroup::handleLogRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection) { +void ConnectionRequestHandlerGroup::handleLogRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { // TODO Require authentication boost::posix_time::ptime timestamp(boost::posix_time::not_a_date_time); diff --git a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.h b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.h index f3d2138..7b46f22 100644 --- a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.h +++ b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.h @@ -35,11 +35,11 @@ class MAD_SERVER_EXPORT ConnectionRequestHandlerGroup : public Common::RequestHa private: Application *application; - void handleAuthMethodRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleAuthRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleDaemonListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleIdentifyRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleLogRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handleAuthMethodRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleAuthRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleDaemonListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleIdentifyRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleLogRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); public: ConnectionRequestHandlerGroup(Application *application0); diff --git a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp index 499e7b6..e258b89 100644 --- a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp @@ -30,11 +30,11 @@ namespace Mad { namespace Server { namespace RequestHandlers { -void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) { +void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared_ptr<const Common::XmlData> packet) { if(packet->getType() != type) { getApplication()->log(Core::Logger::LOG_ERROR, "Received an unexpected packet."); - Common::XmlPacket ret; + Common::XmlData ret; ret.setType("Error"); ret.set("ErrorCode", Core::Exception::UNEXPECTED_PACKET); @@ -64,7 +64,7 @@ void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared getRequestManager()->sendRequest(daemonCon.get(), request); } catch(Core::Exception &e) { - Common::XmlPacket ret; + Common::XmlData ret; ret.setType("Error"); ret.set("ErrorCode", e.getErrorCode()); ret.set("SubCode", e.getSubCode()); @@ -76,9 +76,9 @@ void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared } } -void DaemonRequestHandlerGroup::DaemonRequestHandler::requestFinished(boost::shared_ptr<const Common::XmlPacket> packet, Core::Exception error) { +void DaemonRequestHandlerGroup::DaemonRequestHandler::requestFinished(boost::shared_ptr<const Common::XmlData> packet, Core::Exception error) { if(error) { - Common::XmlPacket ret; + Common::XmlData ret; ret.setType("Error"); ret.set("ErrorCode", error.getErrorCode()); ret.set("SubCode", error.getSubCode()); diff --git a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h index 8312709..48d8e2c 100644 --- a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h +++ b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h @@ -37,10 +37,10 @@ class MAD_SERVER_EXPORT DaemonRequestHandlerGroup : public Common::RequestHandle private: std::string type; - void requestFinished(boost::shared_ptr<const Common::XmlPacket> packet, Core::Exception error); + void requestFinished(boost::shared_ptr<const Common::XmlData> packet, Core::Exception error); protected: - virtual void handlePacket(boost::shared_ptr<const Common::XmlPacket> packet); + virtual void handlePacket(boost::shared_ptr<const Common::XmlData> packet); public: DaemonRequestHandler(Common::Application *application, const std::string &type0) diff --git a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp index d5f97a9..1d99c2e 100644 --- a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp @@ -29,7 +29,7 @@ namespace Mad { namespace Server { namespace RequestHandlers { -void UserRequestHandlerGroup::handleUserListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleUserListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -52,10 +52,10 @@ void UserRequestHandlerGroup::handleUserListRequest(boost::shared_ptr<const Comm ret->set("timestamp", boost::posix_time::to_iso_string(timestamp)); if(users) { - Common::XmlPacket::List *list = ret->createList("users"); + Common::XmlData::List *list = ret->createList("users"); for(std::map<unsigned long, Common::UserInfo>::const_iterator user = users->begin(); user != users->end(); ++user) { - Common::XmlPacket::List::iterator entry = list->addEntry(); + Common::XmlData::List::iterator entry = list->addEntry(); entry->set("uid", user->second.getUid()); entry->set("gid", user->second.getGid()); @@ -65,7 +65,7 @@ void UserRequestHandlerGroup::handleUserListRequest(boost::shared_ptr<const Comm } } -void UserRequestHandlerGroup::handleUserInfoRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleUserInfoRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -101,7 +101,7 @@ void UserRequestHandlerGroup::handleUserInfoRequest(boost::shared_ptr<const Comm } } -void UserRequestHandlerGroup::handleUserGroupListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleUserGroupListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -124,17 +124,17 @@ void UserRequestHandlerGroup::handleUserGroupListRequest(boost::shared_ptr<const ret->set("timestamp", boost::posix_time::to_iso_string(timestamp)); if(groups) { - Common::XmlPacket::List *list = ret->createList("groups"); + Common::XmlData::List *list = ret->createList("groups"); for(std::set<unsigned long>::const_iterator group = groups->begin(); group != groups->end(); ++group) { - Common::XmlPacket::List::iterator entry = list->addEntry(); + Common::XmlData::List::iterator entry = list->addEntry(); entry->set("gid", *group); } } } -void UserRequestHandlerGroup::handleGroupListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleGroupListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -157,10 +157,10 @@ void UserRequestHandlerGroup::handleGroupListRequest(boost::shared_ptr<const Com ret->set("timestamp", boost::posix_time::to_iso_string(timestamp)); if(groups) { - Common::XmlPacket::List *list = ret->createList("groups"); + Common::XmlData::List *list = ret->createList("groups"); for(std::map<unsigned long, Common::GroupInfo>::const_iterator group = groups->begin(); group != groups->end(); ++group) { - Common::XmlPacket::List::iterator entry = list->addEntry(); + Common::XmlData::List::iterator entry = list->addEntry(); entry->set("gid", group->second.getGid()); entry->set("name", group->second.getName()); @@ -168,7 +168,7 @@ void UserRequestHandlerGroup::handleGroupListRequest(boost::shared_ptr<const Com } } -void UserRequestHandlerGroup::handleGroupInfoRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleGroupInfoRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -202,7 +202,7 @@ void UserRequestHandlerGroup::handleGroupInfoRequest(boost::shared_ptr<const Com } } -void UserRequestHandlerGroup::handleGroupUserListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleGroupUserListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -224,16 +224,16 @@ void UserRequestHandlerGroup::handleGroupUserListRequest(boost::shared_ptr<const if(!timestamp.is_not_a_date_time()) ret->set("timestamp", boost::posix_time::to_iso_string(timestamp)); - Common::XmlPacket::List *list = ret->createList("users"); + Common::XmlData::List *list = ret->createList("users"); for(std::set<unsigned long>::const_iterator user = users->begin(); user != users->end(); ++user) { - Common::XmlPacket::List::iterator entry = list->addEntry(); + Common::XmlData::List::iterator entry = list->addEntry(); entry->set("uid", *user); } } -void UserRequestHandlerGroup::handleFullUserGroupListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleFullUserGroupListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -256,10 +256,10 @@ void UserRequestHandlerGroup::handleFullUserGroupListRequest(boost::shared_ptr<c ret->set("timestamp", boost::posix_time::to_iso_string(timestamp)); if(userGroups) { - Common::XmlPacket::List *list = ret->createList("userGroupList"); + Common::XmlData::List *list = ret->createList("userGroupList"); for(std::multimap<unsigned long, unsigned long>::const_iterator userGroup = userGroups->begin(); userGroup != userGroups->end(); ++userGroup) { - Common::XmlPacket::List::iterator entry = list->addEntry(); + Common::XmlData::List::iterator entry = list->addEntry(); entry->set("uid", userGroup->first); entry->set("gid", userGroup->second); @@ -268,7 +268,7 @@ void UserRequestHandlerGroup::handleFullUserGroupListRequest(boost::shared_ptr<c } -void UserRequestHandlerGroup::handleUserInfoCheckRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleUserInfoCheckRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -282,7 +282,7 @@ void UserRequestHandlerGroup::handleUserInfoCheckRequest(boost::shared_ptr<const ret->setType("OK"); } -void UserRequestHandlerGroup::handleUserAddRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleUserAddRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -296,7 +296,7 @@ void UserRequestHandlerGroup::handleUserAddRequest(boost::shared_ptr<const Commo ret->setType("OK"); } -void UserRequestHandlerGroup::handleUserUpdateRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleUserUpdateRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -310,7 +310,7 @@ void UserRequestHandlerGroup::handleUserUpdateRequest(boost::shared_ptr<const Co ret->setType("OK"); } -void UserRequestHandlerGroup::handleUserDeleteRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleUserDeleteRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -321,7 +321,7 @@ void UserRequestHandlerGroup::handleUserDeleteRequest(boost::shared_ptr<const Co } -void UserRequestHandlerGroup::handleGroupInfoCheckRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleGroupInfoCheckRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -331,7 +331,7 @@ void UserRequestHandlerGroup::handleGroupInfoCheckRequest(boost::shared_ptr<cons ret->setType("OK"); } -void UserRequestHandlerGroup::handleGroupAddRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleGroupAddRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -341,7 +341,7 @@ void UserRequestHandlerGroup::handleGroupAddRequest(boost::shared_ptr<const Comm ret->setType("OK"); } -void UserRequestHandlerGroup::handleGroupUpdateRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleGroupUpdateRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -352,7 +352,7 @@ void UserRequestHandlerGroup::handleGroupUpdateRequest(boost::shared_ptr<const C ret->setType("OK"); } -void UserRequestHandlerGroup::handleGroupDeleteRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleGroupDeleteRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -363,7 +363,7 @@ void UserRequestHandlerGroup::handleGroupDeleteRequest(boost::shared_ptr<const C } -void UserRequestHandlerGroup::handleAddUserToGroupRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleAddUserToGroupRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -373,7 +373,7 @@ void UserRequestHandlerGroup::handleAddUserToGroupRequest(boost::shared_ptr<cons ret->setType("OK"); } -void UserRequestHandlerGroup::handleDeleteUserFromGroupRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handleDeleteUserFromGroupRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); @@ -383,7 +383,7 @@ void UserRequestHandlerGroup::handleDeleteUserFromGroupRequest(boost::shared_ptr ret->setType("OK"); } -void UserRequestHandlerGroup::handlePasswordSetRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, +void UserRequestHandlerGroup::handlePasswordSetRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { if(!connection->isAuthenticated()) throw(Core::Exception(Core::Exception::PERMISSION)); diff --git a/src/Server/RequestHandlers/UserRequestHandlerGroup.h b/src/Server/RequestHandlers/UserRequestHandlerGroup.h index aed585f..d4326e1 100644 --- a/src/Server/RequestHandlers/UserRequestHandlerGroup.h +++ b/src/Server/RequestHandlers/UserRequestHandlerGroup.h @@ -35,30 +35,30 @@ class MAD_SERVER_EXPORT UserRequestHandlerGroup : public Common::RequestHandlers private: Application *application; - void handleUserListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleUserInfoRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleUserGroupListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handleUserListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleUserInfoRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleUserGroupListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); - void handleGroupListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleGroupInfoRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleGroupUserListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handleGroupListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleGroupInfoRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleGroupUserListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); - void handleFullUserGroupListRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handleFullUserGroupListRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); - void handleUserInfoCheckRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleUserAddRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleUserUpdateRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleUserDeleteRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handleUserInfoCheckRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleUserAddRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleUserUpdateRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleUserDeleteRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); - void handleGroupInfoCheckRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleGroupAddRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleGroupUpdateRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleGroupDeleteRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handleGroupInfoCheckRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleGroupAddRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleGroupUpdateRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleGroupDeleteRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); - void handleAddUserToGroupRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); - void handleDeleteUserFromGroupRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handleAddUserToGroupRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); + void handleDeleteUserFromGroupRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); - void handlePasswordSetRequest(boost::shared_ptr<const Common::XmlPacket> packet, Common::XmlPacket *ret, Common::Connection *connection); + void handlePasswordSetRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection); public: UserRequestHandlerGroup(Application *application0); diff --git a/src/Server/Requests/CommandRequest.cpp b/src/Server/Requests/CommandRequest.cpp index 2a84840..51e7b1d 100644 --- a/src/Server/Requests/CommandRequest.cpp +++ b/src/Server/Requests/CommandRequest.cpp @@ -24,7 +24,7 @@ namespace Server { namespace Requests { void CommandRequest::sendRequest() { - Common::XmlPacket packet; + Common::XmlData packet; packet.setType("Command"); packet.set("command", reboot ? "reboot" : "shutdown"); diff --git a/src/Server/Requests/DaemonStateUpdateRequest.cpp b/src/Server/Requests/DaemonStateUpdateRequest.cpp index 730b490..8ed1eed 100644 --- a/src/Server/Requests/DaemonStateUpdateRequest.cpp +++ b/src/Server/Requests/DaemonStateUpdateRequest.cpp @@ -24,7 +24,7 @@ namespace Server { namespace Requests { void DaemonStateUpdateRequest::sendRequest() { - Common::XmlPacket packet; + Common::XmlData packet; packet.setType("UpdateHostState"); packet.set("name", name); |