summaryrefslogtreecommitdiffstats
path: root/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp')
-rw-r--r--src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp22
1 files changed, 11 insertions, 11 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);