summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_thread.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-04-14 19:49:51 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-04-14 19:49:51 +0000
commite7eadee4856f2f3a2d6873712d5f73ce03b11918 (patch)
treeacae8d5da72ce293d506b5cdcf063110f27b5653 /protocols/Steam/src/steam_thread.cpp
parent84748741977bfc0bb49a6e2e42fa1ebd9e6b3aac (diff)
Steam: work commit
- added joint to game menu item - first approach to contacts management - minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@8977 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_thread.cpp')
-rw-r--r--protocols/Steam/src/steam_thread.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/protocols/Steam/src/steam_thread.cpp b/protocols/Steam/src/steam_thread.cpp
index 970cbcd628..e95af473dd 100644
--- a/protocols/Steam/src/steam_thread.cpp
+++ b/protocols/Steam/src/steam_thread.cpp
@@ -45,15 +45,7 @@ void CSteamProto::PollServer(const char *token, const char *sessionId, UINT32 me
{
const wchar_t *text = message->GetText();
- DBEVENTINFO dbei = { sizeof(dbei) };
- dbei.szModule = this->m_szModuleName;
- dbei.timestamp = message->GetTimestamp();
- dbei.eventType = EVENTTYPE_MESSAGE;
- dbei.cbBlob = lstrlen(text);
- dbei.pBlob = (BYTE*)mir_utf8encodeW(text);
- dbei.flags = DBEF_UTF | DBEF_SENT;
-
- db_event_add(hContact, &dbei);
+ AddDBEvent(hContact, EVENTTYPE_MESSAGE, time(NULL), DBEF_UTF | DBEF_SENT, lstrlen(text), (BYTE*)mir_utf8encodeW(text));
}
}
break;
@@ -93,7 +85,7 @@ void CSteamProto::PollServer(const char *token, const char *sessionId, UINT32 me
}
break;
- case SteamWebApi::PollApi::POOL_TYPE_CONTACT_ADDED:
+ case SteamWebApi::PollApi::POOL_TYPE_CONTACT_ADD:
{
SteamWebApi::PollApi::Relationship *crs = (SteamWebApi::PollApi::Relationship*)item;
@@ -105,7 +97,7 @@ void CSteamProto::PollServer(const char *token, const char *sessionId, UINT32 me
}
break;
- case SteamWebApi::PollApi::POOL_TYPE_CONTACT_DELETED:
+ case SteamWebApi::PollApi::POOL_TYPE_CONTACT_REMOVE:
{
SteamWebApi::PollApi::Relationship *crs = (SteamWebApi::PollApi::Relationship*)item;
@@ -115,6 +107,19 @@ void CSteamProto::PollServer(const char *token, const char *sessionId, UINT32 me
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
break;
+
+ case SteamWebApi::PollApi::POOL_TYPE_CONTACT_REQUEST:
+ {
+ SteamWebApi::PollApi::Relationship *crs = (SteamWebApi::PollApi::Relationship*)item;
+
+ const char *steamId = crs->GetSteamId();
+ MCONTACT hContact = FindContact(steamId);
+ if (!hContact)
+ hContact = AddContact(steamId);
+
+
+ }
+ break;
}
}