summaryrefslogtreecommitdiffstats
path: root/src/Client/Authenticators/PasswordAuthenticator.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/PasswordAuthenticator.cpp
parent197582bcf7458cafb571fde7d37ef4415d0d8f4a (diff)
downloadmad-1eb9f4df776adc5dc5cf74a587288199bbf8b703.tar
mad-1eb9f4df776adc5dc5cf74a587288199bbf8b703.zip
Renamed: XmlPacket -> XmlData
Diffstat (limited to 'src/Client/Authenticators/PasswordAuthenticator.cpp')
-rw-r--r--src/Client/Authenticators/PasswordAuthenticator.cpp16
1 files changed, 8 insertions, 8 deletions
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;