summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_account.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-05-26 19:15:20 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-05-26 19:15:20 +0000
commitab75f8e4a3968c956425844415237a4fa6fcee63 (patch)
treedf2c209dd0197dc3085546606b0581d63f9114ad /protocols/Steam/src/steam_account.cpp
parent4e9e885747b2037c81ce809f7f6505f8bc8b0e2f (diff)
Steam: merge new api
git-svn-id: http://svn.miranda-ng.org/main/trunk@13850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_account.cpp')
-rw-r--r--protocols/Steam/src/steam_account.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/protocols/Steam/src/steam_account.cpp b/protocols/Steam/src/steam_account.cpp
index 942095d150..bbf144fc61 100644
--- a/protocols/Steam/src/steam_account.cpp
+++ b/protocols/Steam/src/steam_account.cpp
@@ -14,7 +14,7 @@ bool CSteamProto::IsMe(const char *steamId)
return false;
}
-void CSteamProto::OnGotRsaKey(const NETLIBHTTPREQUEST *response, void *)
+void CSteamProto::OnGotRsaKey(const NETLIBHTTPREQUEST *response)
{
if (response == NULL)
return;
@@ -69,13 +69,14 @@ void CSteamProto::OnGotRsaKey(const NETLIBHTTPREQUEST *response, void *)
ptrA username(mir_utf8encodeW(getWStringA("Username")));
PushRequest(
- new SteamWebApi::AuthorizationRequest(username, base64RsaEncryptedPassword, timestamp),
+ new AuthorizationRequest(username, base64RsaEncryptedPassword, timestamp),
&CSteamProto::OnAuthorization);
}
-void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *)
+void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response)
{
- if (response == NULL) {
+ if (response == NULL)
+ {
SetStatus(ID_STATUS_OFFLINE);
return;
}
@@ -109,16 +110,14 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *)
CSteamGuardDialog guardDialog(this, emailDomain);
if (!guardDialog.DoModal())
- {
return;
- }
ptrA username(mir_utf8encodeW(getWStringA("Username")));
ptrA password(getStringA("EncryptedPassword"));
ptrA timestamp(getStringA("RsaTimestamp"));
PushRequest(
- new SteamWebApi::AuthorizationRequest(username, password, timestamp, guardDialog.GetGuardCode()),
+ new AuthorizationRequest(username, password, timestamp, guardDialog.GetGuardCode()),
&CSteamProto::OnAuthorization);
return;
}
@@ -129,7 +128,7 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *)
node = json_get(root, "captcha_gid");
ptrA captchaId(mir_u2a(ptrT(json_as_string(node))));
- SteamWebApi::GetCaptchaRequest *request = new SteamWebApi::GetCaptchaRequest(captchaId);
+ GetCaptchaRequest *request = new GetCaptchaRequest(captchaId);
NETLIBHTTPREQUEST *response = request->Send(m_hNetlibUser);
delete request;
@@ -146,7 +145,7 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *)
ptrA timestamp(getStringA("RsaTimestamp"));
PushRequest(
- new SteamWebApi::AuthorizationRequest(username, password, timestamp, captchaId, captchaDialog.GetCaptchaText()),
+ new AuthorizationRequest(username, password, timestamp, captchaId, captchaDialog.GetCaptchaText()),
&CSteamProto::OnAuthorization);
return;
}
@@ -185,15 +184,15 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *)
delSetting("EncryptedPassword");
PushRequest(
- new SteamWebApi::GetSessionRequest(token, steamId, cookie),
+ new GetSessionRequest(token, steamId, cookie),
&CSteamProto::OnGotSession);
PushRequest(
- new SteamWebApi::LogonRequest(token),
+ new LogonRequest(token),
&CSteamProto::OnLoggedOn);
}
-void CSteamProto::OnGotSession(const NETLIBHTTPREQUEST *response, void *)
+void CSteamProto::OnGotSession(const NETLIBHTTPREQUEST *response)
{
if(response == NULL)
return;
@@ -224,7 +223,7 @@ void CSteamProto::HandleTokenExpired()
SetStatus(ID_STATUS_OFFLINE);
}
-void CSteamProto::OnLoggedOn(const NETLIBHTTPREQUEST *response, void *)
+void CSteamProto::OnLoggedOn(const NETLIBHTTPREQUEST *response)
{
if (response == NULL)
{
@@ -255,7 +254,7 @@ void CSteamProto::OnLoggedOn(const NETLIBHTTPREQUEST *response, void *)
ptrA steamId(getStringA("SteamID"));
PushRequest(
- new SteamWebApi::GetFriendListRequest(token, steamId),
+ new GetFriendListRequest(token, steamId),
&CSteamProto::OnGotFriendList);
// start polling thread