summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_trouter.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-30 17:04:08 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-30 17:04:08 +0000
commitfc36545dac2ad60dcc5f628b32f460295f7316ec (patch)
treeabe4a76a6d45974c2a2ebcbf7d227906fe357e8e /protocols/SkypeWeb/src/skype_trouter.cpp
parent0f03399b85a33d6abe5321715df190df3f6a793c (diff)
SkypeWeb: ClistEvent on incoming call.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13294 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_trouter.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp
index 039107e0fd..03f04e7a35 100644
--- a/protocols/SkypeWeb/src/skype_trouter.cpp
+++ b/protocols/SkypeWeb/src/skype_trouter.cpp
@@ -97,8 +97,23 @@ void CSkypeProto::OnTrouterEvent(JSONNODE *body, JSONNODE *headers)
MCONTACT hContact = FindContact(_T2A(uid));
if (hContact != NULL)
{
- AddCallToDb(hContact, time(NULL), 0);
+ MEVENT hEvent = AddCallToDb(hContact, time(NULL), DBEF_READ);
SkinPlaySound("skype_inc_call");
+
+ CLISTEVENT cle = { sizeof(cle) };
+ cle.flags |= CLEF_TCHAR;
+ cle.hContact = hContact;
+ cle.hDbEvent = hEvent;
+ cle.lParam = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
+ cle.hIcon = Skin_GetIconByHandle(GetIconHandle("inc_call"));
+
+ CMStringA service(FORMAT, "%s/IncomingCall", GetContactProto(hContact));
+ cle.pszService = service.GetBuffer();
+
+ CMString tooltip(FORMAT, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ cle.ptszTooltip = tooltip.GetBuffer();
+
+ CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
}
@@ -162,4 +177,11 @@ void CSkypeProto::TRouterThread(void*)
m_hTrouterThread = NULL;
m_TrouterConnection = NULL;
debugLogA(__FUNCTION__": leaving");
+}
+
+INT_PTR CSkypeProto::OnIncomingCall(WPARAM wParam, LPARAM lParam)
+{
+ CLISTEVENT *cle = (CLISTEVENT*)lParam;
+ NotifyEventHooks(m_hCallHook, (WPARAM)cle->hContact, (LPARAM)0);
+ return 0;
} \ No newline at end of file