From ec4bfdfecf461afb79c7a992d73731c193970456 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 1 May 2015 07:59:22 +0000 Subject: SkypeWeb: Small improvements. git-svn-id: http://svn.miranda-ng.org/main/trunk@13324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_proto.h | 10 ++++++---- protocols/SkypeWeb/src/skype_trouter.cpp | 5 +++-- protocols/SkypeWeb/src/skype_utils.cpp | 13 ++++++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 659ee8880a..5ac4fd4974 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -20,7 +20,8 @@ along with this program. If not, see . typedef void(CSkypeProto::*SkypeResponseCallback)(const NETLIBHTTPREQUEST *response); typedef void(CSkypeProto::*SkypeResponseWithArgCallback)(const NETLIBHTTPREQUEST *response, void *arg); -typedef HRESULT(MarkupCallback)(IHTMLDocument3 *, BSTR &message); + +typedef HRESULT(MarkupCallback)(IHTMLDocument3 *pHtmlDoc, BSTR &message); struct CSkypeProto : public PROTO < CSkypeProto > { @@ -292,9 +293,7 @@ private: char *SelfUrlToName (const char *url); char *GetServerFromUrl (const char *url); - LPCTSTR ClearText(CMString &result, const TCHAR *message); - HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message); - HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &message); + LPCTSTR ClearText(CMString &value, const TCHAR *message); //services INT_PTR __cdecl OnIncomingCallCLE (WPARAM wParam, LPARAM lParam); @@ -316,4 +315,7 @@ private: } }; +HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message); +HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &message); + #endif //_SKYPE_PROTO_H_ \ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index c3233cd60e..c4a8b62932 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -188,7 +188,7 @@ INT_PTR CSkypeProto::OnIncomingCallCLE(WPARAM, LPARAM lParam) return 0; } -INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM, LPARAM hContact) +INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM wParam, LPARAM hContact) { CLISTEVENT *cle = NULL; while ((cle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, hContact, 0))) @@ -199,6 +199,7 @@ INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM, LPARAM hContact) break; } } - NotifyEventHooks(m_hCallHook, (WPARAM)cle->hContact, (LPARAM)0); + if (wParam == 1) + NotifyEventHooks(m_hCallHook, (WPARAM)hContact, (LPARAM)0); return 0; } \ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 2e7fb8c491..488726201d 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -480,11 +480,11 @@ LRESULT CSkypeProto::PopupDlgProcCall(HWND hPopup, UINT uMsg, WPARAM wParam, LPA switch (uMsg) { case WM_CONTEXTMENU: PUDeletePopup(hPopup); + CallService(MODULE"/IncomingCallPP", 0, PUGetContact(hPopup)); break; case WM_COMMAND: PUDeletePopup(hPopup); - CallService(MODULE"/IncomingCallPP", 0, PUGetContact(hPopup)); - + CallService(MODULE"/IncomingCallPP", 1, PUGetContact(hPopup)); break; } @@ -591,7 +591,7 @@ INT_PTR CSkypeProto::GlobalParseSkypeUriService(WPARAM wParam, LPARAM lParam) return 1; } -/* + LPCTSTR CSkypeProto::ClearText(CMString &result, const TCHAR *message) { BSTR bstrHtml = SysAllocString(message), bstrRes = SysAllocString(_T("")); @@ -606,7 +606,7 @@ LPCTSTR CSkypeProto::ClearText(CMString &result, const TCHAR *message) return result; } -HRESULT CSkypeProto::TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message) +HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message) { IHTMLDocument2 *pDoc = NULL; IHTMLElement *pElem = NULL; @@ -632,7 +632,7 @@ HRESULT CSkypeProto::TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message) -HRESULT CSkypeProto::TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &message) +HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &message) { IHTMLDocument3 *pHtmlDocRoot = NULL; @@ -688,5 +688,4 @@ HRESULT CSkypeProto::TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback pHtmlDocRoot->Release(); } return hr; -} -*/ \ No newline at end of file +} \ No newline at end of file -- cgit v1.2.3