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/PasteIt/src/Options.cpp | 2 +- plugins/PasteIt/src/PasteIt.cpp | 8 +++++--- plugins/PasteIt/src/stdafx.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'plugins/PasteIt/src') diff --git a/plugins/PasteIt/src/Options.cpp b/plugins/PasteIt/src/Options.cpp index 60cec76e47..8d80a15948 100644 --- a/plugins/PasteIt/src/Options.cpp +++ b/plugins/PasteIt/src/Options.cpp @@ -409,7 +409,7 @@ INT_PTR CALLBACK Options::DlgProcOptsPages(HWND hwndDlg, UINT msg, WPARAM wParam } case WM_CLOSE: { - OptsPagesData* optsPagesData = (OptsPagesData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + OptsPagesData *optsPagesData = (OptsPagesData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); delete optsPagesData; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0); break; diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 6ebee5236d..6b6a8bd599 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -54,6 +54,7 @@ PLUGININFOEX pluginInfo = { static IconItem icon = { LPGEN("Paste It"), "PasteIt_main", IDI_MENU }; int hLangpack = 0; +CHAT_MANAGER *pci; BOOL APIENTRY DllMain(HMODULE hModule, DWORD, LPVOID) { @@ -146,13 +147,13 @@ void PasteIt(MCONTACT hContact, int mode) GC_INFO gci = { 0 }; GCDEST gcd = { szProto, NULL, GC_EVENT_SENDMESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; - int cnt = (int)CallService(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)szProto); + int cnt = pci->SM_GetCount(szProto); for (int i = 0; i < cnt; i++) { gci.iItem = i; gci.pszModule = szProto; gci.Flags = GCF_BYINDEX | GCF_HCONTACT | GCF_ID; - CallService(MS_GC_GETINFO, 0, (LPARAM)&gci); + Chat_GetInfo(&gci); if (gci.hContact == hContact) { // In this place session was finded, gci.pszID contains @@ -163,7 +164,7 @@ void PasteIt(MCONTACT hContact, int mode) gce.dwFlags = GCEF_ADDTOLOG; gce.ptszText = mir_a2u_cp(pasteToWeb->szFileLink, CP_ACP); gce.time = time(NULL); - CallService(MS_GC_EVENT, 0, (LPARAM)&gce); + Chat_Event(0, &gce); mir_free((void*)gce.ptszText); break; } @@ -399,6 +400,7 @@ int ModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); + pci = Chat_GetInterface(); Icon_Register(hInst, LPGEN("Paste It"), &icon, 1); diff --git a/plugins/PasteIt/src/stdafx.h b/plugins/PasteIt/src/stdafx.h index 959524e03e..a637e884d0 100644 --- a/plugins/PasteIt/src/stdafx.h +++ b/plugins/PasteIt/src/stdafx.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include -- cgit v1.2.3