diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-04 00:24:42 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-04 00:24:42 +0200 |
commit | 1eb9f4df776adc5dc5cf74a587288199bbf8b703 (patch) | |
tree | 42c3950b6d69c65f859db0a4d290c5408597a7bd /src/Client/Authenticators | |
parent | 197582bcf7458cafb571fde7d37ef4415d0d8f4a (diff) | |
download | mad-1eb9f4df776adc5dc5cf74a587288199bbf8b703.tar mad-1eb9f4df776adc5dc5cf74a587288199bbf8b703.zip |
Renamed: XmlPacket -> XmlData
Diffstat (limited to 'src/Client/Authenticators')
4 files changed, 19 insertions, 19 deletions
diff --git a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp index 33e5ccd..4aadb63 100644 --- a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp +++ b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp @@ -28,7 +28,7 @@ namespace Client { namespace Authenticators { void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::sendRequest() { - Common::XmlPacket packet; + Common::XmlData packet; packet.setType("Authenticate"); packet.set("method", "Challenge-Response"); packet.set("subMethod", hash); @@ -38,7 +38,7 @@ void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::sendRequest() sendPacket(packet); } -void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) { +void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlData> packet) { if(packet->getType() == "Error") { signalFinished(Core::Exception(packet->get<const std::string&>("Where"), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), packet->get<long>("SubCode"), packet->get<long>("SubSubCode"))); @@ -51,7 +51,7 @@ void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::handlePacket( return; // TODO Logging } - Common::XmlPacket ret; + Common::XmlData ret; ret.setType("Authenticate"); ret.set("method", "Challenge-Response"); ret.set("subMethod", hash); @@ -88,20 +88,20 @@ void ChallengeResponseAuthenticator::authenticate(Common::Application *applicati application->getRequestManager()->sendRequest(con, request); request->wait(); - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult(); if(!result.first || result.second) throw result.second; - const Common::XmlPacket::List *methods = result.first->getList("methods"); + const Common::XmlData::List *methods = result.first->getList("methods"); - for(Common::XmlPacket::List::const_iterator method = methods->begin(); method != methods->end(); ++method) { + for(Common::XmlData::List::const_iterator method = methods->begin(); method != methods->end(); ++method) { if(method->get<const std::string&>("name") != "Challenge-Response") continue; - const Common::XmlPacket::List *subMethods = method->getList("subMethods"); + const Common::XmlData::List *subMethods = method->getList("subMethods"); - for(Common::XmlPacket::List::const_iterator subMethod = subMethods->begin(); subMethod != subMethods->end(); ++subMethod) { + for(Common::XmlData::List::const_iterator subMethod = subMethods->begin(); subMethod != subMethods->end(); ++subMethod) { if(Common::Hash::isHashSupported(subMethod->get<const std::string&>("name"))) { hash = subMethod->get<const std::string&>("name"); break; @@ -122,7 +122,7 @@ void ChallengeResponseAuthenticator::authenticate(Common::Application *applicati application->getRequestManager()->sendRequest(con, request); request->wait(); - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult(); if(!result.first || result.second) throw result.second; diff --git a/src/Client/Authenticators/ChallengeResponseAuthenticator.h b/src/Client/Authenticators/ChallengeResponseAuthenticator.h index 61c6f20..3906ba9 100644 --- a/src/Client/Authenticators/ChallengeResponseAuthenticator.h +++ b/src/Client/Authenticators/ChallengeResponseAuthenticator.h @@ -41,7 +41,7 @@ class MAD_CLIENT_EXPORT ChallengeResponseAuthenticator { protected: virtual void sendRequest(); - virtual void handlePacket(boost::shared_ptr<const Common::XmlPacket> packet); + virtual void handlePacket(boost::shared_ptr<const Common::XmlData> packet); public: ChallengeResponseAuthRequest(Common::Application *application, const std::string &username0, const std::string &password0, const std::string &hash0) diff --git a/src/Client/Authenticators/PasswordAuthenticator.cpp b/src/Client/Authenticators/PasswordAuthenticator.cpp index 8887d96..bf2a284 100644 --- a/src/Client/Authenticators/PasswordAuthenticator.cpp +++ b/src/Client/Authenticators/PasswordAuthenticator.cpp @@ -28,7 +28,7 @@ namespace Client { namespace Authenticators { void PasswordAuthenticator::PasswordAuthRequest::sendRequest() { - Common::XmlPacket packet; + Common::XmlData packet; packet.setType("Authenticate"); packet.set("method", "Password"); packet.set("subMethod", hash); @@ -43,7 +43,7 @@ void PasswordAuthenticator::PasswordAuthRequest::sendRequest() { sendPacket(packet); } -void PasswordAuthenticator::PasswordAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) { +void PasswordAuthenticator::PasswordAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlData> packet) { if(packet->getType() == "Error") { signalFinished(Core::Exception(packet->get<const std::string&>("Where"), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), packet->get<long>("SubCode"), packet->get<long>("SubSubCode"))); @@ -66,20 +66,20 @@ void PasswordAuthenticator::authenticate(Common::Application *application, Commo application->getRequestManager()->sendRequest(con, request); request->wait(); - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult(); if(!result.first || result.second) throw result.second; - const Common::XmlPacket::List *methods = result.first->getList("methods"); + const Common::XmlData::List *methods = result.first->getList("methods"); - for(Common::XmlPacket::List::const_iterator method = methods->begin(); method != methods->end(); ++method) { + for(Common::XmlData::List::const_iterator method = methods->begin(); method != methods->end(); ++method) { if(method->get<const std::string&>("name") != "Password") continue; - const Common::XmlPacket::List *subMethods = method->getList("subMethods"); + const Common::XmlData::List *subMethods = method->getList("subMethods"); - for(Common::XmlPacket::List::const_iterator subMethod = subMethods->begin(); subMethod != subMethods->end(); ++subMethod) { + for(Common::XmlData::List::const_iterator subMethod = subMethods->begin(); subMethod != subMethods->end(); ++subMethod) { if(Common::Hash::isHashSupported(subMethod->get<const std::string&>("name"))) { hash = subMethod->get<const std::string&>("name"); break; @@ -100,7 +100,7 @@ void PasswordAuthenticator::authenticate(Common::Application *application, Commo application->getRequestManager()->sendRequest(con, request); request->wait(); - std::pair<boost::shared_ptr<const Common::XmlPacket>, Core::Exception> result = request->getResult(); + std::pair<boost::shared_ptr<const Common::XmlData>, Core::Exception> result = request->getResult(); if(!result.first || result.second) throw result.second; diff --git a/src/Client/Authenticators/PasswordAuthenticator.h b/src/Client/Authenticators/PasswordAuthenticator.h index d7b2fbc..70ab3f2 100644 --- a/src/Client/Authenticators/PasswordAuthenticator.h +++ b/src/Client/Authenticators/PasswordAuthenticator.h @@ -39,7 +39,7 @@ class MAD_CLIENT_EXPORT PasswordAuthenticator { protected: virtual void sendRequest(); - virtual void handlePacket(boost::shared_ptr<const Common::XmlPacket> packet); + virtual void handlePacket(boost::shared_ptr<const Common::XmlData> packet); public: PasswordAuthRequest(Common::Application *application, const std::string &username0, const std::string &password0, const std::string &hash0) |