diff options
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 52 | ||||
-rw-r--r-- | protocols/Steam/src/steam_login.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_messages.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_pooling.cpp | 8 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.h | 8 |
5 files changed, 36 insertions, 36 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index fa6f2c0965..72a5422e5a 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -94,9 +94,9 @@ MCONTACT CSteamProto::FindContact(const char *steamId) return hContact; } -void CSteamProto::UpdateContact(MCONTACT hContact, JSONNODE *data) +void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) { - JSONNODE *node = NULL; + JSONNode *node = NULL; // set common data node = json_get(data, "personaname"); @@ -322,15 +322,15 @@ MCONTACT CSteamProto::AddContact(const char *steamId, bool isTemporary) return hContact; } -void CSteamProto::ProcessContact(std::map<std::string, JSONNODE*>::iterator *it, MCONTACT hContact) +void CSteamProto::ProcessContact(std::map<std::string, JSONNode*>::iterator *it, MCONTACT hContact) { std::string steamId = (*it)->first; - JSONNODE *child = (*it)->second; + JSONNode *child = (*it)->second; if (!hContact) hContact = AddContact(steamId.c_str()); - JSONNODE *node = json_get(child, "friend_since"); + JSONNode *node = json_get(child, "friend_since"); if (node) db_set_dw(hContact, "UserInfo", "ContactAddTime", json_as_int(node)); @@ -365,16 +365,16 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response) std::string steamIds = ptrA(getStringA("SteamID")); - std::map<std::string, JSONNODE*> friends; + std::map<std::string, JSONNode*> friends; // Remember contacts on server - JSONNODE *node = json_get(root, "friends"); - JSONNODE *nroot = json_as_array(node); + JSONNode *node = json_get(root, "friends"); + JSONNode *nroot = json_as_array(node); if (nroot != NULL) { for (size_t i = 0; i < json_size(nroot); i++) { - JSONNODE *child = json_at(nroot, i); + JSONNode *child = json_at(nroot, i); if (child == NULL) break; @@ -397,7 +397,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response) if (id == NULL) continue; - std::map<std::string, JSONNODE*>::iterator it = friends.find(std::string(id)); + std::map<std::string, JSONNode*>::iterator it = friends.find(std::string(id)); if (it != friends.end()) { @@ -415,7 +415,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response) } // Check remaining contacts in map and add them to contact list - for (std::map<std::string, JSONNODE*>::iterator it = friends.begin(); it != friends.end();) + for (std::map<std::string, JSONNode*>::iterator it = friends.begin(); it != friends.end();) { // Contact is on server-list, but not in database, add (but not notify) it ProcessContact(&it, NULL); @@ -425,7 +425,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response) } friends.clear(); - // We need to delete nroot here at the end, because we had references to JSONNODE objects stored in friends map + // We need to delete nroot here at the end, because we had references to JSONNode objects stored in friends map json_delete(nroot); if (!steamIds.empty()) @@ -450,13 +450,13 @@ void CSteamProto::OnGotBlockList(const NETLIBHTTPREQUEST *response) //std::string steamIds; - JSONNODE *node = json_get(root, "friends"); - JSONNODE *nroot = json_as_array(node); + JSONNode *node = json_get(root, "friends"); + JSONNode *nroot = json_as_array(node); if (nroot != NULL) { for (size_t i = 0; i < json_size(nroot); i++) { - JSONNODE *child = json_at(nroot, i); + JSONNode *child = json_at(nroot, i); if (child == NULL) break; @@ -492,13 +492,13 @@ void CSteamProto::OnGotUserSummaries(const NETLIBHTTPREQUEST *response) if (root == NULL) return; - JSONNODE *node = json_get(root, "players"); - JSONNODE *nroot = json_as_array(node); + JSONNode *node = json_get(root, "players"); + JSONNode *nroot = json_as_array(node); if (nroot != NULL) { for (size_t i = 0; i < json_size(nroot); i++) { - JSONNODE *item = json_at(nroot, i); + JSONNode *item = json_at(nroot, i); if (item == NULL) break; @@ -601,9 +601,9 @@ void CSteamProto::OnAuthRequested(const NETLIBHTTPREQUEST *response, void *arg) if (root == NULL) return; - JSONNODE *node = json_get(root, "players"); - JSONNODE *nodes = json_as_array(node); - JSONNODE *nroot = json_at(nodes, 0); + JSONNode *node = json_get(root, "players"); + JSONNode *nodes = json_as_array(node); + JSONNode *nroot = json_at(nodes, 0); if (nroot != NULL) { @@ -665,7 +665,7 @@ void CSteamProto::OnPendingApproved(const NETLIBHTTPREQUEST *response, void *arg if (root == NULL) return; - JSONNODE *node = json_get(root, "success"); + JSONNode *node = json_get(root, "success"); if (json_as_int(node) == 0) { node = json_get(root, "error_text"); @@ -685,7 +685,7 @@ void CSteamProto::OnPendingIgnoreded(const NETLIBHTTPREQUEST *response, void *ar if (root == NULL) return; - JSONNODE *node = json_get(root, "success"); + JSONNode *node = json_get(root, "success"); if (json_as_int(node) == 0) { node = json_get(root, "error_text"); @@ -706,9 +706,9 @@ void CSteamProto::OnSearchByIdEnded(const NETLIBHTTPREQUEST *response, void *arg if (root == NULL) return; - JSONNODE *node = json_get(root, "players"); - JSONNODE *nodes = json_as_array(node); - JSONNODE *nroot = json_at(nodes, 0); + JSONNode *node = json_get(root, "players"); + JSONNode *nodes = json_as_array(node); + JSONNode *nroot = json_at(nodes, 0); if (nroot != NULL) { diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp index 2002586053..6128428dbe 100644 --- a/protocols/Steam/src/steam_login.cpp +++ b/protocols/Steam/src/steam_login.cpp @@ -269,7 +269,7 @@ void CSteamProto::OnLoggedOn(const NETLIBHTTPREQUEST *response) JSONROOT root(response->pData);
- JSONNODE *node = json_get(root, "error");
+ JSONNode *node = json_get(root, "error");
ptrT error(json_as_string(node));
if (mir_tstrcmpi(error, _T("OK")) || response->resultCode == HTTP_STATUS_UNAUTHORIZED)
{
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index 5a55919a07..563923c919 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -23,7 +23,7 @@ void CSteamProto::OnMessageSent(const NETLIBHTTPREQUEST *response, void *arg) if (response != NULL && response->resultCode == HTTP_STATUS_OK)
{
JSONROOT root(response->pData);
- JSONNODE *node = json_get(root, "error");
+ JSONNode *node = json_get(root, "error");
if (node)
error = json_as_string(node);
}
diff --git a/protocols/Steam/src/steam_pooling.cpp b/protocols/Steam/src/steam_pooling.cpp index b6cb91f56e..71d1b20f0e 100644 --- a/protocols/Steam/src/steam_pooling.cpp +++ b/protocols/Steam/src/steam_pooling.cpp @@ -2,9 +2,9 @@ #define POLLING_ERRORS_LIMIT 3 -void CSteamProto::ParsePollData(JSONNODE *data) +void CSteamProto::ParsePollData(JSONNode *data) { - JSONNODE *node, *item = NULL; + JSONNode *node, *item = NULL; std::string steamIds; for (size_t i = 0; i < json_size(data); i++) @@ -192,7 +192,7 @@ void CSteamProto::PollingThread(void*) errors = 0; JSONROOT root(response->pData); - JSONNODE *node = json_get(root, "error"); + JSONNode *node = json_get(root, "error"); ptrT error(json_as_string(node)); if (!lstrcmpi(error, _T("OK"))) @@ -201,7 +201,7 @@ void CSteamProto::PollingThread(void*) messageId = json_as_int(node); node = json_get(root, "messages"); - JSONNODE *nroot = json_as_array(node); + JSONNode *nroot = json_as_array(node); if (nroot != NULL) { diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index fc82986b67..4b4dcaa40a 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -27,7 +27,7 @@ struct SendMessageParam struct STEAM_SEARCH_RESULT
{
PROTOSEARCHRESULT hdr;
- JSONNODE *data;
+ JSONNode *data;
};
enum
@@ -129,7 +129,7 @@ protected: static void MirFreeArg(void *arg) { mir_free(arg); }
// pooling thread
- void ParsePollData(JSONNODE *data);
+ void ParsePollData(JSONNode *data);
void __cdecl PollingThread(void*);
// account
@@ -153,8 +153,8 @@ protected: MCONTACT GetContactFromAuthEvent(MEVENT hEvent);
- void UpdateContact(MCONTACT hContact, JSONNODE *data);
- void ProcessContact(std::map<std::string, JSONNODE*>::iterator *it, MCONTACT hContact);
+ void UpdateContact(MCONTACT hContact, JSONNode *data);
+ void ProcessContact(std::map<std::string, JSONNode*>::iterator *it, MCONTACT hContact);
void ContactIsRemoved(MCONTACT hContact);
void ContactIsFriend(MCONTACT hContact);
|