diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-04-29 19:23:12 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-04-29 19:23:12 +0000 |
commit | 0b324ac64ba108f06bafb3a687a69ac148fdbbf6 (patch) | |
tree | 3ae699f9e8b5a92c016b2584998317583b023165 /protocols/Steam/src/steam_contacts.cpp | |
parent | f27d98ff82bc2525ceaaaf51a0117fe360fbfeff (diff) |
Steam: fixed contact management functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@9099 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_contacts.cpp')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 3936d4f742..2f3018a873 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -267,14 +267,23 @@ void CSteamProto::AuthAllowThread(void *arg) ptrA steamId(getStringA("SteamID"));
ptrA who(getStringA(hContact, "SteamID"));
- SteamWebApi::InvitationApi::Result result;
- debugLogA("CSteamProto::AuthAllowThread: call SteamWebApi::InvitationApi::Accept");
- SteamWebApi::InvitationApi::Accept(m_hNetlibUser, token, sessionId, steamId, who, &result);
+ SteamWebApi::PendingApi::Result result;
+ debugLogA("CSteamProto::AuthAllowThread: call SteamWebApi::PendingApi::Accept");
+ SteamWebApi::PendingApi::Accept(m_hNetlibUser, token, sessionId, steamId, who, &result);
if (result.IsSuccess())
{
delSetting(hContact, "Auth");
delSetting(hContact, "Grant");
+
+ /*SteamWebApi::FriendApi::Summaries summaries;
+ debugLogA("CSteamProto::AuthAllowThread: call SteamWebApi::FriendApi::LoadSummaries");
+ SteamWebApi::FriendApi::LoadSummaries(m_hNetlibUser, token, who, &summaries);
+
+ if (summaries.IsSuccess())
+ {
+ UpdateContact(hContact, summaries.GetAt(0));
+ }*/
}
}
@@ -284,13 +293,14 @@ void CSteamProto::AuthDenyThread(void *arg) if (!hContact)
return;
+ ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
ptrA steamId(getStringA("SteamID"));
ptrA who(getStringA(hContact, "SteamID"));
- SteamWebApi::InvitationApi::Result result;
- debugLogA("CSteamProto::AuthDenyThread: call SteamWebApi::InvitationApi::Ignore");
- SteamWebApi::InvitationApi::Ignore(m_hNetlibUser, sessionId, steamId, who, &result);
+ SteamWebApi::PendingApi::Result result;
+ debugLogA("CSteamProto::AuthDenyThread: call SteamWebApi::PendingApi::Ignore");
+ SteamWebApi::PendingApi::Ignore(m_hNetlibUser, token, sessionId, steamId, who, &result);
}
void CSteamProto::AddContactThread(void *arg)
@@ -299,6 +309,17 @@ void CSteamProto::AddContactThread(void *arg) void CSteamProto::RemoveContactThread(void *arg)
{
+ if (!arg)
+ return;
+
+ ptrA token(getStringA("TokenSecret"));
+ ptrA sessionId(getStringA("SessionID"));
+ ptrA steamId(getStringA("SteamID"));
+ ptrA who((char*)arg);
+
+ SteamWebApi::FriendListApi::Result result;
+ debugLogA("CSteamProto::RemoveContactThread: call SteamWebApi::FriendListApi::RemoveFriend");
+ SteamWebApi::FriendListApi::RemoveFriend(m_hNetlibUser, token, sessionId, steamId, who, &result);
}
void CSteamProto::LoadContactListThread(void*)
|