summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_database.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2012-10-21 10:24:15 +0000
committerAlexander Lantsev <aunsane@gmail.com>2012-10-21 10:24:15 +0000
commit84fc6ba7d2399bfe5db16c044bace2642f9df8a6 (patch)
tree5db5b725fb3fbafe16b92f1895727bc77ddeea3c /protocols/Skype/src/skype_database.cpp
parent68d9f580b716d6ba9103663f3fc1637f41e162fc (diff)
- added message receiving
git-svn-id: http://svn.miranda-ng.org/main/trunk@2011 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_database.cpp')
-rw-r--r--protocols/Skype/src/skype_database.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp
index 38c08d80b8..c303f8b3aa 100644
--- a/protocols/Skype/src/skype_database.cpp
+++ b/protocols/Skype/src/skype_database.cpp
@@ -52,4 +52,24 @@ void CSkypeProto::RaiseAuthRequestEvent(
::strcpy((char*)pCurBlob, reason);
::CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+}
+
+void CSkypeProto::RaiseMessageReceivedEvent(
+ DWORD timestamp,
+ const char* sid,
+ const char* nick,
+ const char* message)
+{
+ PROTORECVEVENT pre = {0};
+
+ CCSDATA ccs = {0};
+ ccs.szProtoService = PSR_MESSAGE;
+ ccs.hContact = this->AddContactBySid(::mir_a2u(sid), ::mir_a2u(nick));
+ ccs.wParam = 0;
+ ccs.lParam = (LPARAM)&pre;
+ pre.flags = PREF_UTF;
+ pre.timestamp = timestamp;
+ pre.szMessage = (char *)message;
+
+ ::CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
} \ No newline at end of file