summaryrefslogtreecommitdiffstats
path: root/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-09-04 00:24:42 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-09-04 00:24:42 +0200
commit1eb9f4df776adc5dc5cf74a587288199bbf8b703 (patch)
tree42c3950b6d69c65f859db0a4d290c5408597a7bd /src/Client/Authenticators/ChallengeResponseAuthenticator.cpp
parent197582bcf7458cafb571fde7d37ef4415d0d8f4a (diff)
downloadmad-1eb9f4df776adc5dc5cf74a587288199bbf8b703.tar
mad-1eb9f4df776adc5dc5cf74a587288199bbf8b703.zip
Renamed: XmlPacket -> XmlData
Diffstat (limited to 'src/Client/Authenticators/ChallengeResponseAuthenticator.cpp')
-rw-r--r--src/Client/Authenticators/ChallengeResponseAuthenticator.cpp18
1 files changed, 9 insertions, 9 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;