diff options
Diffstat (limited to 'src/Server/ConnectionManager.cpp')
-rw-r--r-- | src/Server/ConnectionManager.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp index 5836b32..f09f9e3 100644 --- a/src/Server/ConnectionManager.cpp +++ b/src/Server/ConnectionManager.cpp @@ -57,8 +57,8 @@ bool ConnectionManager::ServerConnection::disconnect() { return true; } -boost::shared_ptr<const Common::AuthContext> ConnectionManager::ServerConnection::authenticate(const std::string &method, - const std::string &subMethod, const std::string &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response) { +boost::shared_ptr<const Common::AuthContext> ConnectionManager::ServerConnection::authenticate(const Core::String &method, + const Core::String &subMethod, const Core::String &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response) { if(!isIdentified()) type = CLIENT; @@ -151,12 +151,12 @@ bool ConnectionManager::handleConfigEntry(const Core::ConfigEntry &entry, bool h else if(entry[0].getKey().matches("Daemon")) { if(entry[0].getSize() == 1) { if(entry[1].isEmpty()) { - daemonInfo.insert(std::make_pair(entry[0][0].extract(), Common::HostInfo(entry[0][0].extract()))); + daemonInfo.insert(std::make_pair(entry[0][0], Common::HostInfo(entry[0][0]))); return true; } else if(entry[1].getKey().matches("IpAddress") && entry[2].isEmpty()) { - daemonInfo[entry[0][0].extract()].setIP(entry[1][0].extract()); + daemonInfo[entry[0][0]].setIP(entry[1][0].extract()); return true; } @@ -231,10 +231,10 @@ ConnectionManager::~ConnectionManager() { application->getRequestManager()->unregisterPacketType("GetStatus"); } -boost::shared_ptr<Common::Connection> ConnectionManager::getDaemonConnection(const std::string &name) const throw (Core::Exception) { +boost::shared_ptr<Common::Connection> ConnectionManager::getDaemonConnection(const Core::String &name) const throw (Core::Exception) { - std::map<std::string, Common::HostInfo>::const_iterator hostIt = daemonInfo.find(name); + std::map<Core::String, Common::HostInfo>::const_iterator hostIt = daemonInfo.find(name); if(hostIt == daemonInfo.end()) throw Core::Exception(Core::Exception::UNKNOWN_DAEMON); @@ -251,7 +251,7 @@ boost::shared_ptr<Common::Connection> ConnectionManager::getDaemonConnection(con throw Core::Exception(Core::Exception::NOT_AVAILABLE); } -std::string ConnectionManager::getDaemonName(const Common::Connection *con) const throw (Core::Exception) { +Core::String ConnectionManager::getDaemonName(const Common::Connection *con) const throw (Core::Exception) { const ServerConnection *connection = dynamic_cast<const ServerConnection*>(con); if(connection && connection->getConnectionType() == ServerConnection::DAEMON) @@ -260,7 +260,7 @@ std::string ConnectionManager::getDaemonName(const Common::Connection *con) cons throw Core::Exception(Core::Exception::UNKNOWN_DAEMON); } -void ConnectionManager::identifyDaemonConnection(Common::Connection *con, const std::string &name) throw (Core::Exception) { +void ConnectionManager::identifyDaemonConnection(Common::Connection *con, const Core::String &name) throw (Core::Exception) { // TODO Logging ServerConnection *connection = dynamic_cast<ServerConnection*>(con); @@ -288,8 +288,8 @@ void ConnectionManager::identifyDaemonConnection(Common::Connection *con, const updateState(hostInfo, Common::HostInfo::RUNNING); } -boost::shared_ptr<const Common::AuthContext> ConnectionManager::authenticateConnection(Common::Connection *con, const std::string &method, - const std::string &subMethod, const std::string &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response) { +boost::shared_ptr<const Common::AuthContext> ConnectionManager::authenticateConnection(Common::Connection *con, const Core::String &method, + const Core::String &subMethod, const Core::String &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response) { // TODO Logging ServerConnection *connection = dynamic_cast<ServerConnection*>(con); @@ -306,7 +306,7 @@ boost::shared_ptr<const Common::AuthContext> ConnectionManager::authenticateConn std::vector<Common::HostInfo> ConnectionManager::getDaemonList() const { std::vector<Common::HostInfo> ret; - for(std::map<std::string,Common::HostInfo>::const_iterator daemon = daemonInfo.begin(); daemon != daemonInfo.end(); ++daemon) { + for(std::map<Core::String,Common::HostInfo>::const_iterator daemon = daemonInfo.begin(); daemon != daemonInfo.end(); ++daemon) { ret.push_back(daemon->second); } |