diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-25 12:58:13 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-25 12:58:13 +0000 |
commit | c9e610c405ec66764de279ff797ffa48964936be (patch) | |
tree | 48b5035d4afabfc7a3a00b0c9030b4baae5fd80e /protocols/SkypeWeb/src/skype_proto.cpp | |
parent | 419ee3af2ba3f822b6cbd01ebaf29c10e3bcc039 (diff) |
SkypeWeb: Contacts receiving
git-svn-id: http://svn.miranda-ng.org/main/trunk@15028 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 0b66f02421..4d1e236bce 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -304,4 +304,40 @@ int CSkypeProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam }
return 1;
+}
+
+int CSkypeProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
+{
+ PROTOSEARCHRESULT **isrList = (PROTOSEARCHRESULT**)pre->szMessage;
+ DWORD cbBlob = 0;
+ BYTE *pBlob;
+ BYTE *pCurBlob;
+ int i;
+
+ int nCount = *((LPARAM*)pre->lParam);
+ char* szMessageId = ((char*)pre->lParam + sizeof(LPARAM));
+
+ //if (GetMessageFromDb(hContact, szMessageId, pre->timestamp)) return 0;
+
+ for (i = 0; i < nCount; i++)
+ cbBlob += int(/*mir_tstrlen(isrList[i]->nick.t)*/0 + 2 + mir_tstrlen(isrList[i]->id.t) + mir_strlen(szMessageId));
+
+ pBlob = (PBYTE)mir_calloc(cbBlob);
+
+ for (i = 0, pCurBlob = pBlob; i < nCount; i++)
+ {
+ //mir_strcpy((char*)pCurBlob, _T2A(isrList[i]->nick.t));
+ pCurBlob += mir_strlen((PCHAR)pCurBlob) + 1;
+
+ mir_strcpy((char*)pCurBlob, _T2A(isrList[i]->id.t));
+ pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ }
+
+ //memcpy(pCurBlob + 1, szMessageId, mir_strlen(szMessageId));
+
+ AddEventToDb(hContact, EVENTTYPE_CONTACTS, pre->timestamp, (pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0, cbBlob, pBlob);
+
+ mir_free(pBlob);
+
+ return 0;
}
\ No newline at end of file |