From 0c41e6c4566fdb2d99b8a6ca1fb48859fd4a0e34 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 16 Sep 2016 19:43:24 +0000 Subject: - chats services replaces with functions; - chat calls switched from CallServiceSync to direct calls everywhere git-svn-id: http://svn.miranda-ng.org/main/trunk@17305 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SendScreenshotPlus/src/CSend.cpp | 6 +++--- plugins/SendScreenshotPlus/src/Main.cpp | 2 ++ plugins/SendScreenshotPlus/src/stdafx.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/SendScreenshotPlus') diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index 61e4be2080..d80b7a016b 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -222,14 +222,14 @@ void CSend::svcSendMsgExit(const char* szMessage) } GC_INFO gci = { 0 }; int res = GC_RESULT_NOSESSION; - int cnt = (int)CallService(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)m_pszProto); + int cnt = pci->SM_GetCount(m_pszProto); //loop on all gc session to get the right (save) ptszID for the chatroom from m_hContact gci.pszModule = m_pszProto; for (int i = 0; i < cnt; i++) { gci.iItem = i; gci.Flags = GCF_BYINDEX | GCF_HCONTACT | GCF_ID; - CallService(MS_GC_GETINFO, 0, (LPARAM)&gci); + Chat_GetInfo(&gci); if (gci.hContact == m_hContact) { GCDEST gcd = { m_pszProto, gci.pszID, GC_EVENT_SENDMESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -239,7 +239,7 @@ void CSend::svcSendMsgExit(const char* szMessage) gce.time = time(NULL); //* returns 0 on success or error code on failure - res = 200 + (int)CallService(MS_GC_EVENT, 0, (LPARAM)&gce); + res = 200 + (int)Chat_Event(0, &gce); break; } } diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 6866930af5..7026c4c832 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Main.h" // Prototypes /////////////////////////////////////////////////////////////////////////// +CHAT_MANAGER *pci; CLIST_INTERFACE *pcli; HINSTANCE g_hSendSS; MGLOBAL g_myGlobals; @@ -258,6 +259,7 @@ ATOM g_clsTargetHighlighter = 0; DLL_EXPORT int Load(void) { mir_getLP(&pluginInfo); + pci = Chat_GetInterface(); pcli = Clist_GetInterface(); INT_PTR result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&FIP); diff --git a/plugins/SendScreenshotPlus/src/stdafx.h b/plugins/SendScreenshotPlus/src/stdafx.h index 5a079657bf..a96f88f4d1 100644 --- a/plugins/SendScreenshotPlus/src/stdafx.h +++ b/plugins/SendScreenshotPlus/src/stdafx.h @@ -53,7 +53,7 @@ using namespace std; #include #include #include -#include +#include #include #include #include -- cgit v1.2.3