summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-16 19:43:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-16 19:43:24 +0000
commit0c41e6c4566fdb2d99b8a6ca1fb48859fd4a0e34 (patch)
tree700937499ee66952d1ca5b92928fc9ec3b034447 /protocols/Tox
parent7a7a6637021d78ad995f3e21e9743fae69bd2562 (diff)
- 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
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/src/stdafx.h2
-rw-r--r--protocols/Tox/src/tox.cpp4
-rw-r--r--protocols/Tox/src/tox_chatrooms.cpp10
3 files changed, 9 insertions, 7 deletions
diff --git a/protocols/Tox/src/stdafx.h b/protocols/Tox/src/stdafx.h
index 9f37777cc5..e4f9c6987b 100644
--- a/protocols/Tox/src/stdafx.h
+++ b/protocols/Tox/src/stdafx.h
@@ -34,7 +34,7 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0
#include <m_message.h>
#include <m_avatars.h>
#include <m_skin.h>
-#include <m_chat.h>
+#include <m_chat_int.h>
#include <m_genmenu.h>
#include <m_clc.h>
#include <m_clist.h>
diff --git a/protocols/Tox/src/tox.cpp b/protocols/Tox/src/tox.cpp
index 10c30c14ee..0ee2774aa4 100644
--- a/protocols/Tox/src/tox.cpp
+++ b/protocols/Tox/src/tox.cpp
@@ -1,7 +1,8 @@
#include "stdafx.h"
int hLangpack;
-CLIST_INTERFACE* pcli;
+CHAT_MANAGER *pci;
+CLIST_INTERFACE *pcli;
HINSTANCE g_hInstance;
HMODULE g_hToxLibrary = NULL;
@@ -40,6 +41,7 @@ extern "C" int __declspec(dllexport) Load(void)
if (g_hToxLibrary == NULL)
return 0;
+ pci = Chat_GetInterface();
pcli = Clist_GetInterface();
mir_getLP(&pluginInfo);
diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp
index 82805ab96e..2cf2641db8 100644
--- a/protocols/Tox/src/tox_chatrooms.cpp
+++ b/protocols/Tox/src/tox_chatrooms.cpp
@@ -140,7 +140,7 @@ void CToxProto::InitGroupChatModule()
gcr.iMaxText = 0;
gcr.ptszDispName = this->m_tszUserName;
gcr.pszModule = this->m_szModuleName;
- CallServiceSync(MS_GC_REGISTER, 0, (LPARAM)&gcr);
+ Chat_Register(&gcr);
HookProtoEvent(ME_GC_EVENT, &CToxProto::OnGroupChatEventHook);
HookProtoEvent(ME_GC_BUILDMENU, &CToxProto::OnGroupChatMenuHook);
@@ -155,16 +155,16 @@ void CToxProto::CloseAllChatChatSessions()
gci.Flags = GCF_BYINDEX | GCF_ID | GCF_DATA;
gci.pszModule = m_szModuleName;
- int count = CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)m_szModuleName);
+ int count = pci->SM_GetCount(m_szModuleName);
for (int i = 0; i < count; i++)
{
gci.iItem = i;
- if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci))
+ if (!Chat_GetInfo(&gci))
{
GCDEST gcd = { m_szModuleName, gci.pszID, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
- CallServiceSync(MS_GC_EVENT, SESSION_OFFLINE, (LPARAM)&gce);
- CallServiceSync(MS_GC_EVENT, SESSION_TERMINATE, (LPARAM)&gce);
+ Chat_Event(SESSION_OFFLINE, &gce);
+ Chat_Event(SESSION_TERMINATE, &gce);
}
}
}