From 10bc9e42dfba6ed8be41199243d688c2e367dc0d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Jun 2015 18:59:38 +0000 Subject: MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WinterSpeak/src/Common.h | 2 +- plugins/WinterSpeak/src/UserInformation.cpp | 23 +++++++++-------------- plugins/WinterSpeak/src/main.cpp | 6 +++--- 3 files changed, 13 insertions(+), 18 deletions(-) (limited to 'plugins/WinterSpeak') diff --git a/plugins/WinterSpeak/src/Common.h b/plugins/WinterSpeak/src/Common.h index 692a412ae3..b51cc56ff8 100644 --- a/plugins/WinterSpeak/src/Common.h +++ b/plugins/WinterSpeak/src/Common.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp index 9b24734afe..43f02605fa 100644 --- a/plugins/WinterSpeak/src/UserInformation.cpp +++ b/plugins/WinterSpeak/src/UserInformation.cpp @@ -46,14 +46,11 @@ std::wstring UserInformation::statusString(MCONTACT user) //------------------------------------------------------------------------------ std::wstring UserInformation::statusModeString(MCONTACT user) { - int status = CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, m_status_info[user], 0); + WCHAR *status = pcli->pfnGetStatusModeDescription(m_status_info[user], 0); + if (NULL == status) + return L""; - if (NULL == status) - { - return L""; - } - - return reinterpret_cast(status); + return status; } //------------------------------------------------------------------------------ @@ -66,13 +63,11 @@ void UserInformation::insertName(std::wstring &str, MCONTACT user) const //------------------------------------------------------------------------------ std::wstring UserInformation::nameString(MCONTACT user) const { - //WCHAR *ret = reinterpret_cast(CallService(MS_CLIST_GETCONTACTDISPLAYNAME, reinterpret_cast(user), 0)); - char* ret = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(user), 0); - if (0 == ret) - { - return L""; - } - return TranslateW(mir_a2t_cp(ret, CP_UTF8)); + WCHAR *ret = pcli->pfnGetContactDisplayName(user, 0); + if (0 == ret) + return L""; + + return TranslateW(ret); } //============================================================================== diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp index 4a5c831517..554ee64ee4 100644 --- a/plugins/WinterSpeak/src/main.cpp +++ b/plugins/WinterSpeak/src/main.cpp @@ -1,6 +1,6 @@ #include "Common.h" - +CLIST_INTERFACE *pcli; HINSTANCE g_hInst; int hLangpack; DWORD g_mirandaVersion; @@ -105,8 +105,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda extern "C" __declspec(dllexport) int Load(void) { - mir_getLP( &pluginInfo ); - //pluginLink = link; + mir_getLP(&pluginInfo); + mir_getCLI(); if (!g_speak_config) { -- cgit v1.2.3