diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-01 11:42:56 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-01 11:42:56 +0000 |
commit | 88c3082ba9a98453111cc249994e6dd9656a661e (patch) | |
tree | 74754c18ece88e23ea818702f7fd341dceb09111 /protocols/SkypeWeb/src/skype_utils.cpp | |
parent | 4eccffd2cb24cfaf32959fcf400aaea1930af15f (diff) |
SkypeWeb: 'skype:' uri full support.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13331 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.cpp | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index cf0219663b..097e9345af 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -566,24 +566,61 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) *(szCommand++) = 0;
// parameters
- TCHAR *szSecondParam = szCommand ? _tcschr(szCommand, _T(';')) : NULL;
+ TCHAR *szSecondParam = szCommand ? _tcschr(szCommand, _T('&')) : NULL;
if (szSecondParam)
*(szSecondParam++) = 0;
- MCONTACT hContact = AddContact(_T2A(szJid), true);
// no command or message command
if (!szCommand || (szCommand && !_tcsicmp(szCommand, _T("chat"))))
{
+ if (szSecondParam)
+ {
+ TCHAR *szChatId = _tcsstr(szSecondParam, _T("id="));
+ if (szChatId)
+ {
+ szChatId += 5;
+ StartChatRoom(szChatId, szChatId);
+ return 0;
+ }
+ }
+ MCONTACT hContact = AddContact(_T2A(szJid), true);
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL);
return 0;
}
- else if (szCommand && !_tcsicmp(szCommand, _T("call")))
+ else if (!_tcsicmp(szCommand, _T("call")))
{
+ MCONTACT hContact = AddContact(_T2A(szJid), true);
NotifyEventHooks(m_hCallHook, (WPARAM)hContact, (LPARAM)0);
return 0;
}
- else if (szCommand && !_tcsicmp(szCommand, _T("userinfo"))){ return 0;}
-
+ else if (!_tcsicmp(szCommand, _T("userinfo"))){ return 0;}
+ else if (!_tcsicmp(szCommand, _T("add")))
+ {
+ MCONTACT hContact = FindContact(_T2A(szJid));
+ if (hContact == NULL)
+ {
+ PROTOSEARCHRESULT psr = { 0 };
+ psr.id = mir_tstrdup(szJid);
+ psr.nick = mir_tstrdup(szJid);
+ psr.flags = PSR_TCHAR;
+
+ ADDCONTACTSTRUCT acs;
+ acs.handleType = HANDLE_SEARCHRESULT;
+ acs.szProto = m_szModuleName;
+ acs.psr = &psr;
+ CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ }
+ return 0;
+ }
+ if (!_tcsicmp(szCommand, _T("sendfile")))
+ {
+ MCONTACT hContact = AddContact(_T2A(szJid), true);
+ CallService(MS_FILE_SENDFILE, hContact, NULL);
+ }
+ if (!_tcsicmp(szCommand, _T("voicemail")))
+ {
+ return 1;
+ }
return 1; /* parse failed */
}
|