From 66a60a05bfcbefa4faa141caa895e7315e7ffa45 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Mon, 20 Apr 2015 15:33:13 +0000 Subject: SkypeWeb: AssocMgr support part 2. git-svn-id: http://svn.miranda-ng.org/main/trunk@12979 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/main.cpp | 2 +- protocols/SkypeWeb/src/skype_proto.h | 2 +- protocols/SkypeWeb/src/skype_utils.cpp | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 6aedb66382..80c8363e1a 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -89,7 +89,7 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM) { if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) { - CreateServiceFunction(SKYPE_PARSEURI, ParseSkypeURI); + CreateServiceFunction(SKYPE_PARSEURI, GlobalService<&CSkypeProto::ParseSkypeURIService>); AssocMgr_AddNewUrlTypeT("skype:", TranslateT("Skype Link Protocol"), g_hInstance, IDI_SKYPE, SKYPE_PARSEURI, 0); } return 0; diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 3e50d204a3..16aa9df60d 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -277,7 +277,7 @@ private: char *SelfUrlToName(const char *url); char *GetServerFromUrl(const char *url); - static INT_PTR __cdecl CSkypeProto::ParseSkypeURI(WPARAM, LPARAM lParam); + INT_PTR __cdecl CSkypeProto::ParseSkypeURIService(WPARAM, LPARAM lParam); template static INT_PTR __cdecl GlobalService(WPARAM wParam, LPARAM lParam) diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 165a48cdf0..b1f929fad5 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -517,7 +517,7 @@ char *CSkypeProto::GetServerFromUrl(const char *url) return ParseUrl(url, "://"); } -INT_PTR __cdecl CSkypeProto::ParseSkypeURI(WPARAM w, LPARAM lParam) +INT_PTR __cdecl CSkypeProto::ParseSkypeURIService(WPARAM, LPARAM lParam) { TCHAR *arg = (TCHAR *)lParam; if (arg == NULL) @@ -551,7 +551,8 @@ INT_PTR __cdecl CSkypeProto::ParseSkypeURI(WPARAM w, LPARAM lParam) // no command or message command if (!szCommand || (szCommand && !_tcsicmp(szCommand, _T("chat")))) { - //CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL); + MCONTACT hContact = AddContact(_T2A(szJid), true); + CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL); return 0; } -- cgit v1.2.3