summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/delphi/m_clist.inc31
-rw-r--r--include/delphi/m_clistint.inc11
-rw-r--r--include/m_clist.h45
-rw-r--r--include/m_clistint.h9
-rw-r--r--include/m_popup.h4
-rw-r--r--plugins/AVS/src/stdafx.h1
-rw-r--r--plugins/AddContactPlus/src/stdafx.h2
-rw-r--r--plugins/Alarms/src/alarms.cpp2
-rw-r--r--plugins/Alarms/src/stdafx.h1
-rw-r--r--plugins/AutoShutdown/src/stdafx.h2
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp8
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
-rw-r--r--plugins/AvatarHistory/src/popup.cpp4
-rw-r--r--plugins/BASS_interface/src/stdafx.h2
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp4
-rw-r--r--plugins/BasicHistory/src/DatExport.cpp2
-rw-r--r--plugins/BasicHistory/src/EventList.cpp84
-rw-r--r--plugins/BasicHistory/src/EventList.h8
-rw-r--r--plugins/BasicHistory/src/ExportManager.cpp2
-rw-r--r--plugins/BasicHistory/src/ExportManager.h2
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp20
-rw-r--r--plugins/BasicHistory/src/Scheduler.cpp2
-rw-r--r--plugins/BasicHistory/src/SearchContext.h2
-rw-r--r--plugins/BasicHistory/src/Searcher.cpp6
-rw-r--r--plugins/BossKeyPlus/src/stdafx.h2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp14
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp8
-rw-r--r--plugins/BuddyPounce/src/main.cpp7
-rw-r--r--plugins/CSList/src/stdafx.h2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp6
-rw-r--r--plugins/Clist_blind/src/init.cpp2
-rw-r--r--plugins/Clist_blind/src/stdafx.h2
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonheaders.h2
-rw-r--r--plugins/Clist_nicer/src/Include/commonheaders.h2
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp7
-rw-r--r--plugins/CmdLine/src/utils.cpp2
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp5
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp2
-rw-r--r--plugins/FTPFileYM/src/job_generic.cpp2
-rw-r--r--plugins/FavContacts/src/http_api.cpp2
-rw-r--r--plugins/FavContacts/src/menu.cpp4
-rw-r--r--plugins/FavContacts/src/stdafx.h1
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp4
-rw-r--r--plugins/FileAsMessage/src/main.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp4
-rw-r--r--plugins/FloatingContacts/src/stdafx.h2
-rw-r--r--plugins/HTTPServer/src/Glob.h1
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_dlg.cpp2
-rw-r--r--plugins/HistoryStats/src/main.cpp4
-rw-r--r--plugins/HistoryStats/src/mirandahistory.cpp2
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp10
-rw-r--r--plugins/HistoryStats/src/mu_common.h2
-rw-r--r--plugins/HistoryStats/src/settingsserializer.cpp2
-rw-r--r--plugins/HistoryStats/src/stdafx.h1
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.h2
-rw-r--r--plugins/HwHotKeys/src/HwHotKeys.h2
-rw-r--r--plugins/IEView/src/ieview_common.h1
-rw-r--r--plugins/ImportTXT/importtxtdlg.pas2
-rw-r--r--plugins/ListeningTo/src/commons.h2
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp19
-rw-r--r--plugins/MenuItemEx/src/main.cpp2
-rw-r--r--plugins/MenuItemEx/src/menuex.h2
-rw-r--r--plugins/MirFox/src/MirandaInterface.cpp6
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp25
-rw-r--r--plugins/MirFox/src/common.h2
-rw-r--r--plugins/MirOTR/src/dllmain.cpp6
-rw-r--r--plugins/MirOTR/src/utils.cpp4
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp6
-rw-r--r--plugins/MirandaG15/src/CChatScreen.cpp3
-rw-r--r--plugins/MirandaG15/src/CContactList.cpp4
-rw-r--r--plugins/MirandaG15/src/Miranda.cpp64
-rw-r--r--plugins/ModernOpt/src/commonheaders.h2
-rwxr-xr-xplugins/Msg_Export/src/main.cpp3
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp2
-rw-r--r--plugins/MyDetails/src/data.cpp2
-rw-r--r--plugins/MyDetails/src/frame.cpp6
-rw-r--r--plugins/MyDetails/src/services.cpp3
-rw-r--r--plugins/NewAwaySysMod/src/SetAwayMsg.cpp2
-rw-r--r--plugins/NewEventNotify/src/main.cpp17
-rw-r--r--plugins/NewEventNotify/src/popup.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/common.h2
-rw-r--r--plugins/New_GPG/src/commonheaders.h2
-rw-r--r--plugins/New_GPG/src/init.cpp6
-rwxr-xr-xplugins/New_GPG/src/main.cpp2
-rwxr-xr-xplugins/New_GPG/src/messages.cpp63
-rwxr-xr-xplugins/New_GPG/src/options.cpp6
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp18
-rw-r--r--plugins/Non-IM Contact/src/commonheaders.h1
-rw-r--r--plugins/Nudge/src/headers.h1
-rw-r--r--plugins/Nudge/src/main.cpp2
-rw-r--r--plugins/Ping/src/common.h2
-rw-r--r--plugins/Ping/src/options.cpp2
-rw-r--r--plugins/Popup/src/headers.h1
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp4
-rw-r--r--plugins/QuickMessages/src/Utils.cpp2
-rw-r--r--plugins/QuickMessages/src/main.cpp2
-rw-r--r--plugins/QuickSearch/i_ok.inc13
-rw-r--r--plugins/QuickSearch/sr_global.pas16
-rw-r--r--plugins/QuickSearch/sr_optdialog.pas2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.h1
-rw-r--r--plugins/SMS/src/SMS_svc.cpp2
-rw-r--r--plugins/SMS/src/common.h3
-rw-r--r--plugins/SMS/src/main.cpp3
-rw-r--r--plugins/SMS/src/options.cpp2
-rw-r--r--plugins/SMS/src/receive.cpp4
-rw-r--r--plugins/SMS/src/recvdlg.cpp2
-rw-r--r--plugins/SMS/src/senddlg.cpp8
-rw-r--r--plugins/Scriver/src/commonheaders.h2
-rw-r--r--plugins/Scriver/src/msgs.cpp6
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp5
-rw-r--r--plugins/SecureIM/src/crypt_popups.cpp2
-rw-r--r--plugins/SecureIM/src/main.cpp2
-rw-r--r--plugins/SeenPlugin/src/history.cpp2
-rw-r--r--plugins/SeenPlugin/src/main.cpp2
-rw-r--r--plugins/SeenPlugin/src/missed.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp3
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/Sessions/Src/Options.cpp2
-rw-r--r--plugins/ShellExt/src/main.cpp2
-rw-r--r--plugins/ShellExt/src/shlcom.cpp29
-rw-r--r--plugins/SimpleAR/src/Main.cpp2
-rw-r--r--plugins/SimpleAR/src/Options.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp4
-rw-r--r--plugins/SimpleStatusMsg/src/commonheaders.h2
-rw-r--r--plugins/Spamotron/src/common.h7
-rw-r--r--plugins/Spamotron/src/spamotron.cpp19
-rw-r--r--plugins/Spamotron/src/utils.cpp2
-rw-r--r--plugins/SplashScreen/src/debug.h2
-rw-r--r--plugins/SplashScreen/src/main.cpp3
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.cpp2
-rw-r--r--plugins/StatusPlugins/commonstatus.h1
-rwxr-xr-xplugins/StopSpamMod/src/headers.h6
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp4
-rw-r--r--plugins/TabSRMM/src/commonheaders.h2
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp2
-rw-r--r--plugins/TipperYM/src/common.h2
-rw-r--r--plugins/TipperYM/src/popwin.cpp2
-rw-r--r--plugins/TipperYM/src/subst.cpp2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp41
-rw-r--r--plugins/TooltipNotify/src/main.cpp3
-rw-r--r--plugins/TopToolBar/src/common.h1
-rw-r--r--plugins/UserInfoEx/src/commonheaders.h2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp2
-rw-r--r--plugins/Utils.pas/mircontacts.pas3
-rw-r--r--plugins/Variables/src/contact.cpp2
-rw-r--r--plugins/Variables/src/main.cpp8
-rw-r--r--plugins/Variables/src/parse_miranda.cpp8
-rw-r--r--plugins/Watrack/proto/proto.pas2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp2
-rw-r--r--plugins/WebView/src/stdafx.h2
-rw-r--r--plugins/WhenWasIt/src/commonheaders.h2
-rw-r--r--plugins/WinterSpeak/src/Common.h2
-rw-r--r--plugins/WinterSpeak/src/UserInformation.cpp23
-rw-r--r--plugins/WinterSpeak/src/main.cpp6
-rw-r--r--plugins/XSoundNotify/src/dialog.cpp2
-rw-r--r--plugins/XSoundNotify/src/options.cpp2
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp4
-rw-r--r--plugins/YAPP/src/common.h1
-rw-r--r--plugins/YAPP/src/options.cpp2
-rw-r--r--plugins/YARelay/src/stdafx.h2
-rw-r--r--plugins/YahooGroups/src/YahooGroups.cpp8
-rw-r--r--plugins/YahooGroups/src/utils.cpp2
-rw-r--r--plugins/ZeroSwitch/src/stdafx.h1
-rw-r--r--plugins/wbOSD/src/events.cpp8
-rw-r--r--plugins/wbOSD/src/main.cpp2
-rw-r--r--plugins/wbOSD/src/options.cpp2
-rw-r--r--protocols/AimOscar/src/aim.cpp2
-rw-r--r--protocols/AimOscar/src/chat.cpp4
-rw-r--r--protocols/AimOscar/src/stdafx.h2
-rw-r--r--protocols/Dummy/src/stdafx.h2
-rw-r--r--protocols/FacebookRM/src/stdafx.h2
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/gg.h1
-rw-r--r--protocols/IcqOscarJ/src/stdafx.h1
-rw-r--r--protocols/IcqOscarJ/src/stdpackets.cpp2
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp4
-rw-r--r--protocols/JabberG/src/stdafx.h1
-rw-r--r--protocols/MRA/src/MraChat.cpp4
-rw-r--r--protocols/MRA/src/MraProto.cpp2
-rw-r--r--protocols/MRA/src/MraSelectEMail.cpp2
-rw-r--r--protocols/MRA/src/Mra_functions.cpp2
-rw-r--r--protocols/MRA/src/Mra_menus.cpp2
-rw-r--r--protocols/MRA/src/Mra_proto.cpp6
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp2
-rw-r--r--protocols/MRA/src/stdafx.h4
-rw-r--r--protocols/MSN/src/msn.cpp3
-rw-r--r--protocols/MSN/src/msn_std.cpp2
-rw-r--r--protocols/MSN/src/stdafx.h1
-rw-r--r--protocols/MinecraftDynmap/src/stdafx.h2
-rw-r--r--protocols/Omegle/src/stdafx.h2
-rw-r--r--protocols/Sametime/src/StdAfx.h1
-rw-r--r--protocols/Sametime/src/sametime.cpp5
-rw-r--r--protocols/Sametime/src/session_announce_win.cpp2
-rw-r--r--protocols/SkypeWeb/src/stdafx.h1
-rw-r--r--protocols/Tlen/src/tlen.h1
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp2
-rw-r--r--protocols/Tlen/src/tlen_voice.cpp2
-rw-r--r--protocols/Tox/src/stdafx.h1
-rw-r--r--protocols/Twitter/src/stdafx.h1
-rw-r--r--protocols/VKontakte/src/stdafx.h2
-rw-r--r--protocols/WhatsApp/src/common.h1
-rw-r--r--protocols/Yahoo/src/chat.cpp2
-rw-r--r--protocols/Yahoo/src/yahoo.h1
-rw-r--r--src/core/stdauth/src/commonheaders.h1
-rw-r--r--src/core/stdaway/src/commonheaders.h1
-rw-r--r--src/core/stdchat/src/chat.h1
-rw-r--r--src/core/stdclist/src/commonheaders.h1
-rw-r--r--src/core/stdemail/src/commonheaders.h2
-rw-r--r--src/core/stdfile/src/commonheaders.h1
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp2
-rw-r--r--src/core/stdhelp/src/commonheaders.h1
-rw-r--r--src/core/stdidle/src/commonheaders.h1
-rw-r--r--src/core/stdmsg/src/commonheaders.h1
-rw-r--r--src/core/stdssl/src/commonheaders.h1
-rw-r--r--src/core/stduihist/src/commonheaders.h1
-rw-r--r--src/core/stdurl/commonheaders.h2
-rw-r--r--src/core/stduserinfo/src/commonheaders.h2
-rw-r--r--src/core/stduseronline/src/commonheaders.h2
-rw-r--r--src/mir_app/src/clistmod.cpp17
-rw-r--r--src/mir_app/src/clistsettings.cpp50
-rw-r--r--src/mir_app/src/path.cpp4
-rw-r--r--src/mir_app/src/stdafx.h1
228 files changed, 510 insertions, 676 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 9c54fae5d5..388990f8af 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -33,19 +33,6 @@ const
}
MS_CLIST_GETSTATUSMODE:PAnsiChar = 'CList/GetStatusMode';
- GSMDF_UNICODE = 2; // will return TCHAR* instead of AnsiChar*
- GSMDF_UNTRANSLATED = 4;
-
- {
- wParam : status_mode
- lParam : flags
- Affect : Get a textual description of the given status mode
- Returns: pointer to a static buffer of the description of the given status mode
- or NULL(0) if the mode was unknown.
- Version: v0.1.0.1+
- }
- MS_CLIST_GETSTATUSMODEDESCRIPTION:PAnsiChar = 'CList/GetStatusModeDescription';
-
function Menu_BuildContactMenu(hContact:TMCONTACT) : HMENU; stdcall;
external AppDll name 'Menu_BuildContactMenu';
@@ -110,24 +97,6 @@ const
}
ME_CLIST_DOUBLECLICKED:PAnsiChar = 'CList/DoubleClicked';
- GCDNF_NOMYHANDLE = 1; // will never return the user's custom name
- GCDNF_UNICODE = 2; // will return TCHAR* instead of AnsiChar*
- GCDNF_NOCACHE = 4; // will not use the cache
- {
- wParam : TMCONTACT
- lParam : flags
- Affect : Gets the string that the contact list will use to represent a contact
- Returns: Always a pointer
- Notes : Returns a pointer to the name, will always succeed, even if it needs
- to return "(Unknown Contact)"
- -
- this pointer is a statically allocated buffer which will
- be overwritten on every call to this service, callers should make
- sure that they copy the information before they call it again
- Version: v0.1.2.0+, 0.2.0+ ONLY (0.3a supports the contacts module)
- }
- MS_CLIST_GETCONTACTDISPLAYNAME:PAnsiChar = 'CList/GetContactDisplayName';
-
{
Invalidates the display name cache
wParam=(WPARAM)(HANDLE)hContact
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc
index 33e2ab5d7e..108163db8b 100644
--- a/include/delphi/m_clistint.inc
+++ b/include/delphi/m_clistint.inc
@@ -273,6 +273,10 @@ const
* CLIST_INTERFACE structure definition
************************************************************************** }
+const
+ GCDNF_NOMYHANDLE = 1; // will never return the user's custom name
+ GCDNF_NOCACHE = 4; // will not use the cache
+
type
PClcProtoStatus = ^TClcProtoStatus;
TClcProtoStatus = record
@@ -396,7 +400,7 @@ type
(* clistmod.c *)
pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:TMCONTACT):int; cdecl;
pfnShowHide : function (_para1:WPARAM; _para2:LPARAM):int; cdecl;
- pfnGetStatusModeDescription : function (mode:int; flags:int):TChar; cdecl;
+ pfnGetStatusModeDescription : function (mode:int; flags:int) : PWideChar; cdecl;
(* clistsettings.c *)
pfnGetCacheEntry : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
@@ -404,12 +408,11 @@ type
pfnCheckCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
pfnFreeCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
- pfnGetContactDisplayName : function (hContact:TMCONTACT; mode:int):TChar; cdecl;
+ pfnGetContactDisplayName : function (hContact:TMCONTACT; mode:int):PWideChar; cdecl;
pfnInvalidateDisplayNameCacheEntry : procedure (hContact:TMCONTACT); cdecl;
(* clisttray.c *)
- pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar;
- szPreferredProto:PAnsiChar); cdecl;
+ pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar; szPreferredProto:PAnsiChar); cdecl;
pfnTrayIconUpdateBase : procedure (szChangedProto:PAnsiChar); cdecl;
pfnTrayIconSetToBase : procedure (szPreferredProto:PAnsiChar); cdecl;
pfnTrayIconIconsChanged : procedure ; cdecl;
diff --git a/include/m_clist.h b/include/m_clist.h
index b519ec8d9b..1453f76e29 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -60,22 +60,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_CLIST_GETSTATUSMODE "CList/GetStatusMode"
/////////////////////////////////////////////////////////////////////////////////////////
-// gets a textual description of the given status mode
-// wParam = status mode, from statusmodes.h
-// lParam = flags, below
-// returns a static buffer of the description of the given status mode
-// returns NULL if the status mode was unknown
-
-#define GSMDF_UNICODE 2 //will return TCHAR* instead of char*
-#if defined(_UNICODE)
- #define GSMDF_TCHAR GSMDF_UNICODE //will return TCHAR* instead of char*
-#else
- #define GSMDF_TCHAR 0 //will return char*, as usual
-#endif
-#define GSMDF_UNTRANSLATED 4
-#define MS_CLIST_GETSTATUSMODEDESCRIPTION "CList/GetStatusModeDescription"
-
-/////////////////////////////////////////////////////////////////////////////////////////
// MAIN MENU
// adds a new element into main menu
@@ -231,31 +215,6 @@ typedef struct {
#define ME_CLIST_DOUBLECLICKED "CList/DoubleClicked"
/////////////////////////////////////////////////////////////////////////////////////////
-// gets the string that the contact list will use to represent a contact
-// wParam = (MCONTACT)hContact
-// lParam = flags
-// returns a pointer to the name, will always succeed, even if it needs to
-// return "(Unknown Contact)"
-// this pointer is to a statically allocated buffer which will be overwritten
-// on every call to this service. Callers should make sure that they copy the
-// information before they call this service again.
-
-#define GCDNF_NOMYHANDLE 1 //will never return the user's custom name
-#define GCDNF_UNICODE 2 //will return TCHAR* instead of char*
-#define GCDNF_NOCACHE 4 //will not use the cache
-
-#if defined(_UNICODE)
- #define GCDNF_TCHAR GCDNF_UNICODE //will return TCHAR* instead of char*
-#else
- #define GCDNF_TCHAR 0 //will return char*, as usual
-#endif
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// even if it's the one that should be displayed.
-// v0.3.0.0+ if using GCDNF_NOMYHANDLE you must free your string
-#define MS_CLIST_GETCONTACTDISPLAYNAME "CList/GetContactDisplayName"
-
-/////////////////////////////////////////////////////////////////////////////////////////
// Invalidates the display name cache
// wParam = (MCONTACT)hContact
// lParam = not used
@@ -645,4 +604,8 @@ typedef struct {
#define SETTING_BRINGTOFRONT_DEFAULT 0
+#ifndef M_CLISTINT_H__
+#include <m_clistint.h>
+#endif
+
#endif // M_CLIST_H__
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 7890028d09..4510b963cf 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -27,7 +27,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <CommCtrl.h>
+#ifndef M_CLIST_H__
#include <m_clist.h>
+#endif
+
#include <m_protocols.h>
#include <m_clc.h>
@@ -343,6 +346,8 @@ typedef struct
/* clistmod.c */
int (*pfnIconFromStatusMode)(const char *szProto, int status, MCONTACT hContact);
int (*pfnShowHide)(WPARAM, LPARAM);
+
+ #define GSMDF_UNTRANSLATED 4 // don't tranlate the result
TCHAR* (*pfnGetStatusModeDescription)(int mode, int flags);
/* clistsettings.c */
@@ -351,6 +356,10 @@ typedef struct
void (*pfnCheckCacheItem)(ClcCacheEntry*);
void (*pfnFreeCacheItem)(ClcCacheEntry*);
+ #define GCDNF_NOMYHANDLE 1 // will never return the user's custom name
+ #define GCDNF_UNICODE 2 // will return TCHAR* instead of char*
+ #define GCDNF_NOCACHE 4 // will not use the cache
+
TCHAR* (*pfnGetContactDisplayName)(MCONTACT hContact, int mode);
void (*pfnInvalidateDisplayNameCacheEntry)(MCONTACT hContact);
diff --git a/include/m_popup.h b/include/m_popup.h
index 827615c902..feb7834b93 100644
--- a/include/m_popup.h
+++ b/include/m_popup.h
@@ -192,12 +192,12 @@ typedef struct
HICON lchIcon;
union
{
- WCHAR lptzContactName[MAX_CONTACTNAME];
+ TCHAR lptzContactName[MAX_CONTACTNAME];
WCHAR lpwzContactName[MAX_CONTACTNAME];
};
union
{
- WCHAR lptzText[MAX_SECONDLINE];
+ TCHAR lptzText[MAX_SECONDLINE];
WCHAR lpwzText[MAX_SECONDLINE];
};
COLORREF colorBack;
diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h
index 89e9ba9dbe..473f71e22a 100644
--- a/plugins/AVS/src/stdafx.h
+++ b/plugins/AVS/src/stdafx.h
@@ -43,7 +43,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_folders.h>
#include <m_metacontacts.h>
#include <m_avatarhistory.h>
-#include <m_clistint.h>
#include "resource.h"
#include "version.h"
diff --git a/plugins/AddContactPlus/src/stdafx.h b/plugins/AddContactPlus/src/stdafx.h
index 6ee030d959..db389ab584 100644
--- a/plugins/AddContactPlus/src/stdafx.h
+++ b/plugins/AddContactPlus/src/stdafx.h
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <win2k.h>
#include <newpluginapi.h>
#include <m_utils.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_genmenu.h>
#include <m_hotkeys.h>
#include <m_icolib.h>
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index e7732c46b9..3a17aaf2c3 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -68,7 +68,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
void ShowPopup(MCONTACT hContact, const TCHAR *msg)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- TCHAR *lpzContactName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *lpzContactName = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
diff --git a/plugins/Alarms/src/stdafx.h b/plugins/Alarms/src/stdafx.h
index 0b184aef19..8e000393b4 100644
--- a/plugins/Alarms/src/stdafx.h
+++ b/plugins/Alarms/src/stdafx.h
@@ -18,7 +18,6 @@
#include <m_idle.h>
#include <m_clui.h>
#include <m_cluiframes.h>
-#include <m_clistint.h>
#include <m_fontservice.h>
#include <m_icolib.h>
#include <win2k.h>
diff --git a/plugins/AutoShutdown/src/stdafx.h b/plugins/AutoShutdown/src/stdafx.h
index 65e8dc8596..87647c7928 100644
--- a/plugins/AutoShutdown/src/stdafx.h
+++ b/plugins/AutoShutdown/src/stdafx.h
@@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_file.h>
#include <m_idle.h>
#include <win2k.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_cluiframes.h>
#include <m_fontservice.h>
#include <m_icolib.h>
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 3d88738d1e..a748ae039a 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -133,11 +133,9 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l
else
FillAvatarListFromFiles(hwndList, data->hContact);
- TCHAR *displayName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)data->hContact,GCDNF_TCHAR);
- if (displayName)
- {
+ TCHAR *displayName = pcli->pfnGetContactDisplayName(data->hContact, 0);
+ if (displayName) {
TCHAR title[MAX_PATH];
-
mir_sntprintf(title, _countof(title), TranslateT("Avatar History for %s"), displayName);
SetWindowText(hwnd, title);
}
@@ -547,7 +545,7 @@ int ShowSaveDialog(HWND hwnd, TCHAR* fn, MCONTACT hContact)
_tcsncpy_s(file, (_tcsrchr(fn, '\\') + 1), _TRUNCATE);
ofn.lpstrFile = file;
- TCHAR *displayName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
+ TCHAR *displayName = pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR title[MAX_PATH];
if (displayName)
{
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index 04b88b5942..bbf9da67b1 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -23,6 +23,7 @@ Avatar History Plugin
*/
#include "stdafx.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
DWORD mirVer;
@@ -293,6 +294,7 @@ static INT_PTR CALLBACK FirstRunDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
CoInitialize(NULL);
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp
index fc332ca8b7..d8ada07c4c 100644
--- a/plugins/AvatarHistory/src/popup.cpp
+++ b/plugins/AvatarHistory/src/popup.cpp
@@ -107,7 +107,7 @@ void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description
if (title != NULL)
mir_tstrncpy(ppd.lptzContactName, title, _countof(ppd.lptzContactName));
else if (hContact != NULL)
- mir_tstrncpy(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
+ mir_tstrncpy(ppd.lptzContactName, (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0),
_countof(ppd.lptzContactName));
if (description != NULL)
@@ -174,7 +174,7 @@ void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description
}
else
{
- MessageBox(NULL, description, title ? title : (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
+ MessageBox(NULL, description, title ? title : (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0),
MB_OK);
}
diff --git a/plugins/BASS_interface/src/stdafx.h b/plugins/BASS_interface/src/stdafx.h
index 2afa76cc75..93059bd003 100644
--- a/plugins/BASS_interface/src/stdafx.h
+++ b/plugins/BASS_interface/src/stdafx.h
@@ -13,7 +13,7 @@ Copyright (C) 2010, 2011 tico-tico
#include <m_options.h>
#include <win2k.h>
#include <m_clui.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_cluiframes.h>
#include <m_fontservice.h>
#include <m_button_int.h>
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 3c372011a4..38cf5d3044 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
#define MS_HISTORY_DELETEALLCONTACTHISTORY "BasicHistory/DeleteAllContactHistory"
@@ -240,6 +241,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
hTaskMainMenu = NULL;
DuplicateHandle(GetCurrentProcess(),GetCurrentThread(),GetCurrentProcess(),&g_hMainThread,0,FALSE,DUPLICATE_SAME_ACCESS);
@@ -256,7 +258,7 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_OPT_INITIALISE, Options::InitOptions);
- EventList::Init();
+ HistoryEventList::Init();
Icon_Register(hInst, LPGEN("History"), iconList, _countof(iconList));
return 0;
diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp
index 43809f6f58..f11cef9a17 100644
--- a/plugins/BasicHistory/src/DatExport.cpp
+++ b/plugins/BasicHistory/src/DatExport.cpp
@@ -182,7 +182,7 @@ bool DatExport::GetEventList(std::vector<IImport::ExternalMessage>& eventList)
info.timestamp = messageHeader.timestamp;
info.cbBlob = messageHeader.cbBlob;
info.pBlob = (PBYTE)memBuf.c_str();
- EventList::GetObjectDescription(&info, _str, MAXSELECTSTR);
+ HistoryEventList::GetObjectDescription(&info, _str, MAXSELECTSTR);
exMsg.message = _str;
sortedEvents.insert(std::pair<DWORD, IImport::ExternalMessage>(messageHeader.timestamp, exMsg));
dataSize -= messageHeader.cbSize + messageHeader.cbBlob;
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index 947c2139d8..b6b5ec7a02 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -29,7 +29,7 @@ static mir_cs csEventList;
bool DeleteDirectory(LPCTSTR lpszDir, bool noRecycleBin = true);
std::wstring GetName(const std::wstring &path);
-EventList::EventList()
+HistoryEventList::HistoryEventList()
:hWnd(NULL),
isWnd(false),
hContact(NULL),
@@ -42,7 +42,7 @@ EventList::EventList()
goldBlobSize = 0;
}
-EventList::EventList(MCONTACT _hContact, int filter)
+HistoryEventList::HistoryEventList(MCONTACT _hContact, int filter)
:hWnd(NULL),
isWnd(false),
hContact(_hContact),
@@ -56,13 +56,13 @@ EventList::EventList(MCONTACT _hContact, int filter)
SetDefFilter(filter);
}
-EventList::~EventList()
+HistoryEventList::~HistoryEventList()
{
mir_free(gdbei.pBlob);
eventList.clear();
}
-bool EventList::CanShowHistory(DBEVENTINFO* dbei)
+bool HistoryEventList::CanShowHistory(DBEVENTINFO* dbei)
{
if (deltaTime != 0) {
if (deltaTime > 0) {
@@ -106,7 +106,7 @@ bool EventList::CanShowHistory(DBEVENTINFO* dbei)
return false;
}
-bool EventList::CanShowHistory(const IImport::ExternalMessage& message)
+bool HistoryEventList::CanShowHistory(const IImport::ExternalMessage& message)
{
if (deltaTime != 0) {
if (deltaTime > 0) {
@@ -145,7 +145,7 @@ bool EventList::CanShowHistory(const IImport::ExternalMessage& message)
return false;
}
-void EventList::InitFilters()
+void HistoryEventList::InitFilters()
{
filterMap.clear();
onlyInFilter = false;
@@ -169,7 +169,7 @@ void EventList::InitFilters()
else filterName = L"";
}
-void EventList::SetDefFilter(int filter)
+void HistoryEventList::SetDefFilter(int filter)
{
defFilter = filter;
if (filter >= 2 && filter - 2 < (int)Options::instance->customFilters.size())
@@ -180,17 +180,17 @@ void EventList::SetDefFilter(int filter)
filterName = TranslateT("Default history events");
}
-int EventList::GetFilterNr()
+int HistoryEventList::GetFilterNr()
{
return defFilter;
}
-std::wstring EventList::GetFilterName()
+std::wstring HistoryEventList::GetFilterName()
{
return filterName;
}
-void EventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, MCONTACT _hContact)
+void HistoryEventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, MCONTACT _hContact)
{
bool isWndLocal = isWnd;
EventTempIndex ti;
@@ -231,7 +231,7 @@ void EventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter,
}
}
-void EventList::RefreshEventList()
+void HistoryEventList::RefreshEventList()
{
InitNames();
InitFilters();
@@ -240,7 +240,7 @@ void EventList::RefreshEventList()
std::vector<IImport::ExternalMessage> messages;
{
mir_cslock lck(csEventList);
- std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, HistoryEventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
ExportManager imp(hWnd, hContact, 1);
imp.SetAutoImport(it->second.file);
@@ -300,7 +300,7 @@ void EventList::RefreshEventList()
}
}
-bool EventList::SearchInContact(MCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun)
+bool HistoryEventList::SearchInContact(MCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun)
{
InitFilters();
@@ -308,7 +308,7 @@ bool EventList::SearchInContact(MCONTACT hContact, TCHAR *strFind, ComparatorInt
std::vector<IImport::ExternalMessage> messages;
{
mir_cslock lck(csEventList);
- std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, HistoryEventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
ExportManager imp(hWnd, hContact, 1);
imp.SetAutoImport(it->second.file);
@@ -341,11 +341,11 @@ bool EventList::SearchInContact(MCONTACT hContact, TCHAR *strFind, ComparatorInt
return false;
}
-void EventList::InitNames()
+void HistoryEventList::InitNames()
{
TCHAR str[200];
if (hContact) {
- _tcscpy_s(contactName, 256, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR ));
+ _tcscpy_s(contactName, 256, pcli->pfnGetContactDisplayName(hContact, 0));
mir_sntprintf(str, _countof(str), TranslateT("History for %s"),contactName);
}
else {
@@ -359,7 +359,7 @@ void EventList::InitNames()
_tcscpy_s(myName, GetMyName().c_str());
}
-void EventList::AddGroup(const EventIndex& ev)
+void HistoryEventList::AddGroup(const EventIndex& ev)
{
EventData data;
GetEventData(ev, data);
@@ -388,10 +388,10 @@ void EventList::AddGroup(const EventIndex& ev)
AddGroup(data.isMe, time, user, eventText, ico);
}
-std::wstring EventList::GetContactName()
+std::wstring HistoryEventList::GetContactName()
{
if (hContact)
- return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR );
+ return pcli->pfnGetContactDisplayName(hContact, 0);
return TranslateT("System");
}
@@ -416,7 +416,7 @@ void GetInfo(CONTACTINFO& ci, std::wstring& str)
}
}
-std::wstring EventList::GetMyName()
+std::wstring HistoryEventList::GetMyName()
{
std::wstring myName;
CONTACTINFO ci;
@@ -448,18 +448,18 @@ inline std::wstring GetProtocolName(MCONTACT hContact)
return proto1;
}
-std::wstring EventList::GetProtocolName()
+std::wstring HistoryEventList::GetProtocolName()
{
return ::GetProtocolName(hContact);
}
-std::string EventList::GetBaseProtocol()
+std::string HistoryEventList::GetBaseProtocol()
{
char* proto = GetContactProto(hContact);
return proto == NULL ? "" : proto;
}
-std::wstring EventList::GetMyId()
+std::wstring HistoryEventList::GetMyId()
{
std::wstring myId;
CONTACTINFO ci;
@@ -485,7 +485,7 @@ inline std::wstring GetContactId(MCONTACT hContact)
return id;
}
-std::wstring EventList::GetContactId()
+std::wstring HistoryEventList::GetContactId()
{
return ::GetContactId(hContact);
}
@@ -498,12 +498,12 @@ static void GetMessageDescription( DBEVENTINFO *dbei, TCHAR* buf, int cbBuf )
mir_free(msg);
}
-void EventList::GetObjectDescription( DBEVENTINFO *dbei, TCHAR* str, int cbStr )
+void HistoryEventList::GetObjectDescription( DBEVENTINFO *dbei, TCHAR* str, int cbStr )
{
GetMessageDescription( dbei, str, cbStr );
}
-bool EventList::GetEventIcon(bool isMe, int eventType, int &id)
+bool HistoryEventList::GetEventIcon(bool isMe, int eventType, int &id)
{
switch(eventType) {
case EVENTTYPE_MESSAGE:
@@ -524,7 +524,7 @@ bool EventList::GetEventIcon(bool isMe, int eventType, int &id)
}
}
-void EventList::ImportMessages(const std::vector<IImport::ExternalMessage>& messages)
+void HistoryEventList::ImportMessages(const std::vector<IImport::ExternalMessage>& messages)
{
DWORD lastTime = 0;
importedMessages.clear();
@@ -540,7 +540,7 @@ void EventList::ImportMessages(const std::vector<IImport::ExternalMessage>& mess
}
}
-void EventList::MargeMessages(const std::vector<IImport::ExternalMessage>& messages)
+void HistoryEventList::MargeMessages(const std::vector<IImport::ExternalMessage>& messages)
{
ImportMessages(messages);
std::list<EventTempIndex> tempList;
@@ -572,7 +572,7 @@ void EventList::MargeMessages(const std::vector<IImport::ExternalMessage>& messa
ImportMessages(emessages);
}
-bool EventList::GetEventData(const EventIndex& ev, EventData& data)
+bool HistoryEventList::GetEventData(const EventIndex& ev, EventData& data)
{
if (!ev.isExternal) {
DWORD newBlobSize = db_event_getBlobSize(ev.hEvent);
@@ -600,7 +600,7 @@ bool EventList::GetEventData(const EventIndex& ev, EventData& data)
return false;
}
-void EventList::GetExtEventDBei(const EventIndex& ev)
+void HistoryEventList::GetExtEventDBei(const EventIndex& ev)
{
IImport::ExternalMessage& em = importedMessages[ev.exIdx];
gdbei.flags = em.flags | 0x800;
@@ -608,7 +608,7 @@ void EventList::GetExtEventDBei(const EventIndex& ev)
gdbei.timestamp = em.timestamp;
}
-HICON EventList::GetEventCoreIcon(const EventIndex& ev)
+HICON HistoryEventList::GetEventCoreIcon(const EventIndex& ev)
{
if (ev.isExternal)
return NULL;
@@ -621,7 +621,7 @@ HICON EventList::GetEventCoreIcon(const EventIndex& ev)
return ico;
}
-void EventList::RebuildGroup(int selected)
+void HistoryEventList::RebuildGroup(int selected)
{
std::deque<EventIndex> newGroup;
for (size_t i = 0; i < eventList[selected].size(); ++i) {
@@ -637,10 +637,10 @@ void EventList::RebuildGroup(int selected)
eventList[selected].insert(eventList[selected].begin(), newGroup.begin(), newGroup.end());
}
-std::map<MCONTACT, EventList::ImportDiscData> EventList::contactFileMap;
-std::wstring EventList::contactFileDir;
+std::map<MCONTACT, HistoryEventList::ImportDiscData> HistoryEventList::contactFileMap;
+std::wstring HistoryEventList::contactFileDir;
-void EventList::AddImporter(MCONTACT hContact, IImport::ImportType type, const std::wstring& file)
+void HistoryEventList::AddImporter(MCONTACT hContact, IImport::ImportType type, const std::wstring& file)
{
mir_cslock lck(csEventList);
@@ -653,7 +653,7 @@ void EventList::AddImporter(MCONTACT hContact, IImport::ImportType type, const s
contactFileMap[hContact] = data;
}
-void EventList::Init()
+void HistoryEventList::Init()
{
TCHAR temp[MAX_PATH];
temp[0] = 0;
@@ -664,33 +664,33 @@ void EventList::Init()
CreateDirectory(contactFileDir.c_str(), NULL);
}
-int EventList::GetContactMessageNumber(MCONTACT hContact)
+int HistoryEventList::GetContactMessageNumber(MCONTACT hContact)
{
int count = db_event_count(hContact);
mir_cslock lck(csEventList);
- std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, HistoryEventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end())
++count;
return count;
}
-bool EventList::IsImportedHistory(MCONTACT hContact)
+bool HistoryEventList::IsImportedHistory(MCONTACT hContact)
{
bool count = false;
mir_cslock lck(csEventList);
- std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, HistoryEventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end())
count = true;
return count;
}
-void EventList::DeleteImporter(MCONTACT hContact)
+void HistoryEventList::DeleteImporter(MCONTACT hContact)
{
mir_cslock lck(csEventList);
- std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, HistoryEventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
DeleteFile(it->second.file.c_str());
contactFileMap.erase(it);
diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h
index 3b037b0a5a..e0586f30ce 100644
--- a/plugins/BasicHistory/src/EventList.h
+++ b/plugins/BasicHistory/src/EventList.h
@@ -27,7 +27,7 @@ public:
virtual bool Compare(const bool isMe, const std::wstring& message, TCHAR *strFind) = 0;
};
-class EventList
+class HistoryEventList
{
public:
struct EventData
@@ -101,9 +101,9 @@ protected:
void RebuildGroup(int selected);
public:
- EventList();
- EventList(MCONTACT _hContact, int filter);
- ~EventList();
+ HistoryEventList();
+ HistoryEventList(MCONTACT _hContact, int filter);
+ ~HistoryEventList();
HWND hWnd;
MCONTACT hContact;
diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp
index e6fef029e1..0800d6ad89 100644
--- a/plugins/BasicHistory/src/ExportManager.cpp
+++ b/plugins/BasicHistory/src/ExportManager.cpp
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "codecvt_CodePage.h"
ExportManager::ExportManager(HWND _hwnd, MCONTACT _hContact, int filter) :
- EventList(_hContact, filter),
+ HistoryEventList(_hContact, filter),
hwnd(_hwnd),
oldOnTop(false)
{
diff --git a/plugins/BasicHistory/src/ExportManager.h b/plugins/BasicHistory/src/ExportManager.h
index 09fa0c697b..ea3aa208b3 100644
--- a/plugins/BasicHistory/src/ExportManager.h
+++ b/plugins/BasicHistory/src/ExportManager.h
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "EventList.h"
#include "IExport.h"
#include "IImport.h"
-class ExportManager : public EventList
+class ExportManager : public HistoryEventList
{
private:
IExport* exp;
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index 6c8262cf10..56488dad5e 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -430,7 +430,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM hContact, LPARAM)
HWND hWnd = NULL;
int start = 0;
int end = 0;
- int count = EventList::GetContactMessageNumber(hContact);
+ int count = HistoryEventList::GetContactMessageNumber(hContact);
if (!count)
return FALSE;
@@ -482,10 +482,10 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM hContact, LPARAM)
}
CallService(MS_DB_SETSAFETYMODE, TRUE, 0);
- if (EventList::IsImportedHistory(hContact)) {
+ if (HistoryEventList::IsImportedHistory(hContact)) {
TCHAR *message = TranslateT("Do you want to delete all imported messages for this contact?\nNote that next scheduler task import this messages again.");
if (MessageBox(hWnd, message, TranslateT("Are You sure?"), MB_YESNO | MB_ICONERROR) == IDYES)
- EventList::DeleteImporter(hContact);
+ HistoryEventList::DeleteImporter(hContact);
}
RebuildEvents(hContact);
@@ -1604,7 +1604,7 @@ void HistoryWindow::EnableWindows(BOOL enable)
void HistoryWindow::ReloadContacts()
{
HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS);
- if (EventList::GetContactMessageNumber(NULL)) {
+ if (HistoryEventList::GetContactMessageNumber(NULL)) {
if (hSystem == NULL) {
CLCINFOITEM cii = { sizeof(cii) };
cii.flags = CLCIIF_GROUPFONT | CLCIIF_BELOWCONTACTS;
@@ -1620,7 +1620,7 @@ void HistoryWindow::ReloadContacts()
}
for (MCONTACT _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) {
- if (EventList::GetContactMessageNumber(_hContact) && (metaContactProto == NULL || !db_mc_isSub(_hContact))) {
+ if (HistoryEventList::GetContactMessageNumber(_hContact) && (metaContactProto == NULL || !db_mc_isSub(_hContact))) {
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
if (hItem == NULL)
SendMessage(contactList, CLM_ADDCONTACT, (WPARAM)_hContact, 0);
@@ -1964,7 +1964,7 @@ void HistoryWindow::DoImport(IImport::ImportType type)
HistoryWindow::RebuildEvents(hContact);
}
else if (act == IDNO) {
- EventList::AddImporter(hContact, type, exp.GetFileName());
+ HistoryEventList::AddImporter(hContact, type, exp.GetFileName());
if (!changeContact)
HistoryWindow::RebuildEvents(hContact);
}
@@ -2071,7 +2071,7 @@ void HistoryWindow::Delete(int what)
if (areImpMessages) {
TCHAR *message = TranslateT("Do you want to delete all imported messages for this contact?\nNote that next scheduler task import this messages again.");
if (MessageBox(hWnd, message, TranslateT("Are You sure?"), MB_YESNO | MB_ICONERROR) == IDYES) {
- EventList::DeleteImporter(hContact);
+ HistoryEventList::DeleteImporter(hContact);
rebuild = true;
}
}
@@ -2187,7 +2187,7 @@ MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
_hContact = db_find_next(_hContact);
}
- if (!find && EventList::GetContactMessageNumber(NULL)) {
+ if (!find && HistoryEventList::GetContactMessageNumber(NULL)) {
_hContact = NULL;
find = true;
}
@@ -2218,7 +2218,7 @@ MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
}
if (hContact != NULL) {
- if (lastContact == NULL && !EventList::GetContactMessageNumber(NULL)) {
+ if (lastContact == NULL && !HistoryEventList::GetContactMessageNumber(NULL)) {
_hContact = db_find_next(hContact);
while (_hContact) {
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
@@ -2229,7 +2229,7 @@ MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
}
}
- if (lastContact != NULL || EventList::GetContactMessageNumber(NULL)) {
+ if (lastContact != NULL || HistoryEventList::GetContactMessageNumber(NULL)) {
_hContact = lastContact;
find = true;
}
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp
index 0875b05596..fdd218fa75 100644
--- a/plugins/BasicHistory/src/Scheduler.cpp
+++ b/plugins/BasicHistory/src/Scheduler.cpp
@@ -379,7 +379,7 @@ bool DoTask(TaskOptions& to)
if (ret >= 0) {
mExp.hContact = contacts[ret];
if (to.type == TaskOptions::Import) {
- EventList::AddImporter(mExp.hContact, to.importType, *it);
+ HistoryEventList::AddImporter(mExp.hContact, to.importType, *it);
contactList.push_back(mExp.hContact);
}
else {
diff --git a/plugins/BasicHistory/src/SearchContext.h b/plugins/BasicHistory/src/SearchContext.h
index 3e26475e2f..cab81a213c 100644
--- a/plugins/BasicHistory/src/SearchContext.h
+++ b/plugins/BasicHistory/src/SearchContext.h
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include "EventList.h"
-class SearchContext : public EventList
+class SearchContext : public HistoryEventList
{
public:
HWND editWindow;
diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp
index 13d7cfb645..2723c6c764 100644
--- a/plugins/BasicHistory/src/Searcher.cpp
+++ b/plugins/BasicHistory/src/Searcher.cpp
@@ -311,9 +311,9 @@ bool Searcher::IsInSel(int sel, TCHAR *strFind)
return false;
TCHAR str[MAXSELECTSTR + 8]; // for safety reason
- EventList::EventData data;
- for (std::deque<EventList::EventIndex>::iterator it = context->eventList[sel].begin(); it != context->eventList[sel].end(); ++it) {
- EventList::EventIndex hDbEvent = *it;
+ HistoryEventList::EventData data;
+ for (std::deque<HistoryEventList::EventIndex>::iterator it = context->eventList[sel].begin(); it != context->eventList[sel].end(); ++it) {
+ HistoryEventList::EventIndex hDbEvent = *it;
if (context->GetEventData(hDbEvent, data)) {
bool isMe = data.isMe;
if (onlyIn && isMe || onlyOut && !isMe)
diff --git a/plugins/BossKeyPlus/src/stdafx.h b/plugins/BossKeyPlus/src/stdafx.h
index 293c028078..dfdf4679d0 100644
--- a/plugins/BossKeyPlus/src/stdafx.h
+++ b/plugins/BossKeyPlus/src/stdafx.h
@@ -36,7 +36,7 @@
#include <m_popup.h>
#include <m_awaymsg.h>
#include <m_icolib.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_message.h>
#include <m_hotkeys.h>
#include <win2k.h>
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 8e84683491..3c444dcf0a 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -21,6 +21,7 @@
#include "stdafx.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -231,7 +232,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
mir_sntprintf(ppd.lptzContactName, _countof(ppd.lptzContactName), TranslateT("Hiding %s (%S)"),
- CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
+ pcli->pfnGetContactDisplayName(hContact, 0),
GetContactProto(hContact));
mir_sntprintf(ppd.lptzText, _countof(ppd.lptzText), TranslateT("%d days since last message"), daysSinceMessage);
@@ -267,7 +268,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message)
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -286,7 +287,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message)
cle.pszService = "BuddyExpectator/actionReturned";
cle.flags = CLEF_TCHAR;
- TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR* nick = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tmpMsg[512];
mir_sntprintf(tmpMsg, _countof(tmpMsg), _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
@@ -305,7 +306,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message)
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -324,7 +325,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message)
cle.hIcon = hIcon;
cle.pszService = "BuddyExpectator/actionStillAbsent";
- TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR* nick = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tmpMsg[512];
mir_sntprintf(tmpMsg, _countof(tmpMsg), _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
@@ -489,7 +490,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam)
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -663,6 +664,7 @@ int onShutdown(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
InitOptions();
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index c3d7725e15..0f02f3037d 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -16,7 +16,7 @@ void populateContacts(MCONTACT BPhContact, HWND hwnd2CB)
char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
TCHAR name[300];
- mir_sntprintf(name, _countof(name), _T("%s (%s)"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), _A2T(szProto));
+ mir_sntprintf(name, _countof(name), _T("%s (%s)"), pcli->pfnGetContactDisplayName(hContact, 0), _A2T(szProto));
int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
SendMessage(hwnd2CB, CB_SETITEMDATA, index, hContact);
if (BPhContact == hContact)
@@ -532,7 +532,7 @@ INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_TIMER:
{
TCHAR message[1024];
- mir_sntprintf(message, _countof(message), TranslateT("Pounce being sent to %s in %d seconds"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)spdps->hContact, GCDNF_TCHAR), spdps->timer);
+ mir_sntprintf(message, _countof(message), TranslateT("Pounce being sent to %s in %d seconds"), pcli->pfnGetContactDisplayName(spdps->hContact, 0), spdps->timer);
SetDlgItemText(hwnd, LBL_CONTACT, message);
}
spdps->timer--;
@@ -609,12 +609,12 @@ void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess)
HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONFIRMSEND), 0, PounceSentDlgProc, hContact);
TCHAR msg[256];
if (SentSuccess) {
- mir_sntprintf(msg, _countof(msg), TranslateT("Message successfully sent to %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ mir_sntprintf(msg, _countof(msg), TranslateT("Message successfully sent to %s"), pcli->pfnGetContactDisplayName(hContact, 0));
SetDlgItemText(hwnd, IDOK, TranslateT("OK"));
ShowWindow(GetDlgItem(hwnd, IDCANCEL), 0);
}
else {
- mir_sntprintf(msg, _countof(msg), TranslateT("Message failed to send to %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ mir_sntprintf(msg, _countof(msg), TranslateT("Message failed to send to %s"), pcli->pfnGetContactDisplayName(hContact, 0));
SetDlgItemText(hwnd, IDOK, TranslateT("Retry"));
}
SetDlgItemText(hwnd, LBL_CONTACT, msg);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 23c1d0142f..9fc8e1461a 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -1,5 +1,6 @@
#include "stdafx.h"
+CLIST_INTERFACE *pcli;
int hLangpack;
HINSTANCE hInst;
MWindowList hWindowList;
@@ -231,18 +232,20 @@ INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, UserOnlineSettingChanged);
HookEvent(ME_OPT_INITIALISE, BuddyPounceOptInit);
HookEvent(ME_PROTO_ACK, MsgAck);
+
CreateServiceFunction("BuddyPounce/MenuCommand", BuddyPounceMenuCommand);
+
hWindowList = WindowList_Create();
/* service funcitons for other devs... */
CreateServiceFunction("BuddyPounce/AddSimplePounce", AddSimpleMessage); // add a simple pounce to a contact
CreateServiceFunction("BuddyPounce/AddToPounce", AddToPounce); // add to the exsisitng pounce, if there isnt 1 then add a new simple pounce.
- /* ******************************************************** */
-
return 0;
}
diff --git a/plugins/CSList/src/stdafx.h b/plugins/CSList/src/stdafx.h
index 491041b688..b06d7dcd74 100644
--- a/plugins/CSList/src/stdafx.h
+++ b/plugins/CSList/src/stdafx.h
@@ -39,7 +39,7 @@
#include <m_database.h>
#include <m_system_cpp.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_icolib.h>
#include <m_protosvc.h>
#include <m_xstatus.h>
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 582a1d711e..ac97e0a7d3 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -19,6 +19,7 @@
#include "Common.h"
+CLIST_INTERFACE *pcli;
HINSTANCE g_hInstance;
HANDLE g_hMainThread;
HGENMENU g_hTogglePopupsMenuItem;
@@ -167,7 +168,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd)
ppd.lchIcon = Skin_LoadProtoIcon(szProto, db_get_w(sd->hContact, szProto, "Status", ID_STATUS_OFFLINE));
pdata->hIcon = NULL;
}
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)sd->hContact, GCDNF_TCHAR), lengthof(ppd.lptzContactName) - 1);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(sd->hContact, 0), lengthof(ppd.lptzContactName) - 1);
_tcsncpy(ppd.lptzText, PopupText, lengthof(ppd.lptzText) - 1);
ppd.colorBack = (sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_DEFBGCOLOUR) ? 0 : sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_BGCOLOUR));
ppd.colorText = (sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_DEFTEXTCOLOUR) ? 0 : sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_TEXTCOLOUR));
@@ -348,7 +349,8 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP( &pluginInfo );
+ mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, THREAD_SET_CONTEXT, false, 0);
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index 15cb50d671..6bc9539e89 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -434,7 +434,7 @@ TCHAR *GetStatusName(struct ClcContact *item)
// Get status name
status = db_get_w(item->hContact, item->proto, "Status", ID_STATUS_OFFLINE);
- mir_tstrncpy(status_name, pcli->pfnGetStatusModeDescription(status, GSMDF_TCHAR), _countof(status_name));
+ mir_tstrncpy(status_name, pcli->pfnGetStatusModeDescription(status, 0), _countof(status_name));
return status_name;
}
diff --git a/plugins/Clist_blind/src/stdafx.h b/plugins/Clist_blind/src/stdafx.h
index 122cd16ca1..dc20fb1eb9 100644
--- a/plugins/Clist_blind/src/stdafx.h
+++ b/plugins/Clist_blind/src/stdafx.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <Uxtheme.h>
#include <newpluginapi.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_clui.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
index d81e30a5f7..9192a73d2d 100644
--- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h
+++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
@@ -79,7 +79,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_langpack.h>
#include <m_options.h>
#include <m_protosvc.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_skin.h>
#include <m_contacts.h>
#include <m_avatars.h>
diff --git a/plugins/Clist_nicer/src/Include/commonheaders.h b/plugins/Clist_nicer/src/Include/commonheaders.h
index a78cab075e..a7cd57a950 100644
--- a/plugins/Clist_nicer/src/Include/commonheaders.h
+++ b/plugins/Clist_nicer/src/Include/commonheaders.h
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <newpluginapi.h>
#include <win2k.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_database.h>
#include <m_system_cpp.h>
#include <m_langpack.h>
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index 19b39e3c06..8642b4978d 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -117,7 +117,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
DWORD dwFlags = cfg::getDword(hContact, "CList", "CLN_Flags", 0);
BYTE bSecondLine = cfg::getByte(hContact, "CList", "CLN_2ndline", -1);
- mir_sntprintf(szTitle, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ mir_sntprintf(szTitle, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : pcli->pfnGetContactDisplayName(hContact, 0));
SetWindowText(hWnd, szTitle);
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 6b1021238a..120c984609 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -259,7 +259,7 @@ static void InitIcoLib()
for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) {
char szBuffer[128];
mir_snprintf(szBuffer, _countof(szBuffer), "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE));
- IconItemT icon = { pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), GSMDF_TCHAR), szBuffer, i };
+ IconItemT icon = { pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), 0), szBuffer, i };
Icon_RegisterT(g_hInst, LPGENT("Contact list")_T("/")LPGENT("Overlay icons"), &icon, 1);
}
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index 75a6aee74c..09ba726dbc 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -195,10 +195,11 @@ int ParseStatusParam(char *status)
char *PrettyStatusMode(int status, char *buffer, int size)
{
- *buffer = 0;
- char *data = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, status, 0);
+ TCHAR *data = pcli->pfnGetStatusModeDescription(status, 0);
if (data)
- strncpy_s(buffer, size, data, _TRUNCATE);
+ strncpy_s(buffer, size, _T2A(data), _TRUNCATE);
+ else
+ *buffer = 0;
return buffer;
}
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index 9331e01ffe..7e8520d06c 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -246,7 +246,7 @@ MCONTACT GetContactFromID(char *szID, char *szProto)
GetContactProto(hContact, cProtocol, sizeof(cProtocol));
char *szHandle = GetContactID(hContact, cProtocol);
- char *tmp = (char*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0);
+ char *tmp = (char*) pcli->pfnGetContactDisplayName(hContact, 0);
strncpy_s(dispName, tmp, _TRUNCATE);
if ((szHandle) && ((mir_strcmpi(szHandle, szID) == 0) || (mir_strcmpi(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0)))
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index 2f787d6f39..6cda0d5484 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -1,6 +1,7 @@
#include "stdafx.h"
HINSTANCE hInst;
+CLIST_INTERFACE *pcli;
//PLUGINLINK *pluginLink=NULL;
HANDLE hOptInit = NULL;
@@ -347,7 +348,7 @@ INT_PTR CALLBACK DlgProcConnectionNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wPar
// items.
lvI.mask = LVIF_TEXT;
for (int i = 0; i < STATUS_COUNT; i++) {
- lvI.pszText = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, ID_STATUS_ONLINE + i, GSMDF_TCHAR);
+ lvI.pszText = pcli->pfnGetStatusModeDescription(ID_STATUS_ONLINE + i, 0);
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
ListView_SetCheckState(hwndList, i, settingStatus[i]);
@@ -872,6 +873,8 @@ extern "C" int __declspec(dllexport) Load(void)
#endif
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
hExceptionsMutex = CreateMutex(NULL, FALSE, _T("ExceptionsMutex"));
LoadSettings();
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 46a8998de9..8b822de904 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "common.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -403,6 +404,7 @@ int Shutdown(WPARAM wParam, LPARAM lParam)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
#ifdef _DEBUG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp
index 5683564719..71b5aac87c 100644
--- a/plugins/FTPFileYM/src/job_generic.cpp
+++ b/plugins/FTPFileYM/src/job_generic.cpp
@@ -241,7 +241,7 @@ void GenericJob::refreshTab(bool bTabChanged)
if (this->hContact != NULL)
{
SendDlgItemMessage(uDlg->hwnd, IDC_BTN_PROTO, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadProtoIcon( GetContactProto(this->hContact), ID_STATUS_ONLINE));
- SetDlgItemText(uDlg->hwnd, IDC_UP_CONTACT, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)this->hContact, GCDNF_TCHAR));
+ SetDlgItemText(uDlg->hwnd, IDC_UP_CONTACT, (TCHAR *)pcli->pfnGetContactDisplayName(this->hContact, 0));
}
else
{
diff --git a/plugins/FavContacts/src/http_api.cpp b/plugins/FavContacts/src/http_api.cpp
index 5e8b839217..e625d9089b 100644
--- a/plugins/FavContacts/src/http_api.cpp
+++ b/plugins/FavContacts/src/http_api.cpp
@@ -74,7 +74,7 @@ public:
for (int i = 0; i < favList.getCount(); ++i)
{
MCONTACT hContact = favList[i]->getHandle();
- TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *name = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
AVATARCACHEENTRY *avatar = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
int status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index 471528de04..eaebb50c58 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -89,7 +89,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
mir_free(title);
}
- TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *name = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
if (!options->bSysColors) SelectObject(hdc, g_Options.hfntName);
GetTextExtentPoint32(hdc, name, (int)mir_tstrlen(name), &sz);
@@ -301,7 +301,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
}
if (true) {
- TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *name = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
if (!options->bSysColors)
SelectObject(hdcTemp, g_Options.hfntName);
diff --git a/plugins/FavContacts/src/stdafx.h b/plugins/FavContacts/src/stdafx.h
index 998412d18b..59ae32bd60 100644
--- a/plugins/FavContacts/src/stdafx.h
+++ b/plugins/FavContacts/src/stdafx.h
@@ -34,7 +34,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_db_int.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clc.h>
#include <m_protosvc.h>
#include <m_skin.h>
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 1edaf90842..9e881ae705 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -106,7 +106,7 @@ void MakePopupMsg(HWND hDlg, MCONTACT hContact, char *msg)
POPUPDATA ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SMALLICON));
- mir_tstrcpy(ppd.lpzContactName, (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
+ mir_tstrcpy(ppd.lpzContactName, (char *)pcli->pfnGetContactDisplayName(hContact, 0));
mir_tstrcpy(ppd.lpzText, msg);
ppd.colorBack = GetSysColor(COLOR_INFOBK);
ppd.colorText = GetSysColor(COLOR_INFOTEXT);
@@ -241,7 +241,7 @@ void FILEECHO::updateTitle()
{
char newtitle[256], *contactName;
- contactName = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0);
+ contactName = (char*)pcli->pfnGetContactDisplayName(hContact, 0);
if (iState == STATE_OPERATE && chunkCount != 0)
mir_snprintf(newtitle, _countof(newtitle), "%d%% - %s: %s", chunkSent * 100 / chunkCount, Translate(szFEMode[inSend]), contactName);
else
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index 3bd42de919..edd0769a77 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -15,6 +15,7 @@ PLUGININFOEX pluginInfo =
{ 0x34b5a402, 0x1b79, 0x4246, { 0xb0, 0x41, 0x43, 0xd0, 0xb5, 0x90, 0xae, 0x2c } }
};
+CLIST_INTERFACE *pcli;
MWindowList hFileList;
HINSTANCE hInst;
int hLangpack;
@@ -187,6 +188,7 @@ static int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
InitCRC32();
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 42d089bbcc..07f15974fb 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -414,7 +414,7 @@ static LRESULT __stdcall CommWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
case WM_REFRESH_CONTACT:
if (pThumb) {
- _tcsncpy(pThumb->ptszName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)pThumb->hContact, (LPARAM)GCDNF_TCHAR), USERNAME_LEN - 1);
+ _tcsncpy(pThumb->ptszName, pcli->pfnGetContactDisplayName(pThumb->hContact, 0), USERNAME_LEN - 1);
pThumb->RefreshContactStatus((int)lParam);
pThumb->ResizeThumb();
}
@@ -758,7 +758,7 @@ static void LoadContact(MCONTACT hContact)
DWORD dwPos = db_get_dw(hContact, MODULE, "ThumbsPos", (DWORD)-1);
if (dwPos != -1) {
- TCHAR *ptName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, (LPARAM)GCDNF_TCHAR);
+ TCHAR *ptName = pcli->pfnGetContactDisplayName(hContact, 0);
if (ptName != NULL) {
int nX = DB_POS_GETX(dwPos);
int nY = DB_POS_GETY(dwPos);
diff --git a/plugins/FloatingContacts/src/stdafx.h b/plugins/FloatingContacts/src/stdafx.h
index f2d793f8be..fbad88c334 100644
--- a/plugins/FloatingContacts/src/stdafx.h
+++ b/plugins/FloatingContacts/src/stdafx.h
@@ -17,7 +17,7 @@
#include <m_message.h>
#include <m_clui.h>
#include <m_options.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_hotkeys.h>
#include <m_imgsrvc.h>
#include <win2k.h>
diff --git a/plugins/HTTPServer/src/Glob.h b/plugins/HTTPServer/src/Glob.h
index 48d4c18479..2b5fe8e8c3 100644
--- a/plugins/HTTPServer/src/Glob.h
+++ b/plugins/HTTPServer/src/Glob.h
@@ -31,7 +31,6 @@ using namespace std;
#include <newpluginapi.h>
#include <m_database.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_langpack.h>
#include <m_clui.h>
#include <m_userinfo.h>
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 346b948eb0..c8d1a7a778 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -19,6 +19,7 @@
// Global variables
HINSTANCE hInst;
+CLIST_INTERFACE *pcli;
MWindowList hWindowList;
HCURSOR splitCursor;
@@ -47,6 +48,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
#ifdef DEBUG
{
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
index 103ca8b5d3..9af1f8dd17 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
@@ -76,7 +76,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
SetClassLongPtr(hDlg, GCLP_HICON, (LONG_PTR)LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON)));
WindowList_Add(hWindowList, hDlg, DlgParam->hContact);
- mir_sntprintf(title, _countof(title), _T("%s [%s]"), TranslateT("Linklist plugin"), (LPCTSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)DlgParam->hContact, GCDNF_TCHAR));
+ mir_sntprintf(title, _countof(title), _T("%s [%s]"), TranslateT("Linklist plugin"), pcli->pfnGetContactDisplayName(DlgParam->hContact, 0));
SetWindowText(hDlg, title);
GetFilterText(listMenu, filter, _countof(filter));
SetDlgItemText(hDlg, IDC_STATUS, filter);
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index b468dd96bf..7c5c88fb9f 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -11,6 +11,7 @@
#include "iconlib.h"
#include "dlgconfigure.h"
+CLIST_INTERFACE *pcli;
HINSTANCE g_hInst;
int hLangpack;
@@ -418,6 +419,9 @@ extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load()
{
+ mir_getLP(&g_pluginInfoEx);
+ mir_getCLI();
+
// init COM, needed for GUID generation
CoInitialize(NULL);
diff --git a/plugins/HistoryStats/src/mirandahistory.cpp b/plugins/HistoryStats/src/mirandahistory.cpp
index 8d703015e2..2c79237346 100644
--- a/plugins/HistoryStats/src/mirandahistory.cpp
+++ b/plugins/HistoryStats/src/mirandahistory.cpp
@@ -76,7 +76,7 @@ void MirandaHistory::readContacts()
if (!pProtoName)
pProtoName = con::ProtoUnknown; // MEMO: alternative would be "break;"
- ext::string curNick = mu::clist::getContactDisplayName(hContact);
+ ext::string curNick = pcli->pfnGetContactDisplayName(hContact, 0);
// retrieve protocol
const ext::a::string curProtoName = pProtoName;
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index e5508dade9..f380b2a35e 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -36,16 +36,6 @@ namespace mu
mi.pszService = const_cast<char*>(pszService);
return Menu_AddContactMenuItem(&mi);
}
-
- const TCHAR* getContactDisplayName(MCONTACT hContact)
- {
- return reinterpret_cast<const TCHAR*>(CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_UNICODE));
- }
-
- const TCHAR* getStatusModeDescription(int nStatusMode)
- {
- return reinterpret_cast<const TCHAR*>(CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, static_cast<WPARAM>(nStatusMode), GSMDF_UNICODE));
- }
}
/*
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h
index 0f760cfcfe..6769414b0b 100644
--- a/plugins/HistoryStats/src/mu_common.h
+++ b/plugins/HistoryStats/src/mu_common.h
@@ -15,8 +15,6 @@ namespace mu
{
HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot = 0);
HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService);
- const TCHAR* getContactDisplayName(MCONTACT hContact);
- const TCHAR* getStatusModeDescription(int nStatusMode);
}
/*
diff --git a/plugins/HistoryStats/src/settingsserializer.cpp b/plugins/HistoryStats/src/settingsserializer.cpp
index 265ecb3d03..842657fdad 100644
--- a/plugins/HistoryStats/src/settingsserializer.cpp
+++ b/plugins/HistoryStats/src/settingsserializer.cpp
@@ -85,7 +85,7 @@ void SettingsSerializer::readFromDB()
{
clearColumns();
- ext::string defaultNick = mu::clist::getContactDisplayName(0);
+ ext::string defaultNick = pcli->pfnGetContactDisplayName(0, 0);
SettingsTree settingsTree;
// read version tag
diff --git a/plugins/HistoryStats/src/stdafx.h b/plugins/HistoryStats/src/stdafx.h
index 4b623bc649..6533dd30e7 100644
--- a/plugins/HistoryStats/src/stdafx.h
+++ b/plugins/HistoryStats/src/stdafx.h
@@ -39,7 +39,6 @@
#include <m_chat.h> // not used
#include <m_clc.h>
#include <m_clist.h>
-#include <m_clistint.h> // not used
#include <m_clui.h> // not used
#include <m_contacts.h>
#include <m_database.h>
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.h b/plugins/HistorySweeperLight/src/historysweeperlight.h
index 5e8140c1e8..1821ebdee5 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.h
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.h
@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_options.h>
#include <m_message.h>
#include <m_icolib.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_skin.h>
#include "resource.h"
diff --git a/plugins/HwHotKeys/src/HwHotKeys.h b/plugins/HwHotKeys/src/HwHotKeys.h
index 114451a9d7..162b14a481 100644
--- a/plugins/HwHotKeys/src/HwHotKeys.h
+++ b/plugins/HwHotKeys/src/HwHotKeys.h
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA.
#include <m_langpack.h>
#include <m_database.h>
#include <m_options.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <Strsafe.h>
diff --git a/plugins/IEView/src/ieview_common.h b/plugins/IEView/src/ieview_common.h
index 2149316aa4..8e182aeba1 100644
--- a/plugins/IEView/src/ieview_common.h
+++ b/plugins/IEView/src/ieview_common.h
@@ -39,7 +39,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_langpack.h>
#include <m_protosvc.h>
#include <m_options.h>
diff --git a/plugins/ImportTXT/importtxtdlg.pas b/plugins/ImportTXT/importtxtdlg.pas
index 0fafe155c1..04927c61ab 100644
--- a/plugins/ImportTXT/importtxtdlg.pas
+++ b/plugins/ImportTXT/importtxtdlg.pas
@@ -93,7 +93,7 @@ begin
WM_INITDIALOG:
begin
TranslateDialogDefault(Dialog);
- tempwstr := PWideChar(CallService(MS_CLIST_GETCONTACTDISPLAYNAME,lParam,GCDNF_UNICODE));
+ tempwstr := cli^.pfnGetContactDisplayName(lParam,0);
s := WideFormat(TranslateWideString('Import history to %s (%s)'), [tempwstr, GetContactID(lParam)]);
SetWindowTextW(Dialog, PWideChar(s));
SendMessage(Dialog, WM_SETICON, ICON_SMALL, LoadIcon(hInstance, MAKEINTRESOURCE(IDI_DEFAULT)));
diff --git a/plugins/ListeningTo/src/commons.h b/plugins/ListeningTo/src/commons.h
index 895d445d3b..6f7c04d010 100644
--- a/plugins/ListeningTo/src/commons.h
+++ b/plugins/ListeningTo/src/commons.h
@@ -34,7 +34,7 @@ Boston, MA 02111-1307, USA.
#include <m_protosvc.h>
#include <m_langpack.h>
#include <m_database.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_options.h>
#include <m_xstatus.h>
#include <m_clui.h>
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 677c6f9ae5..8a9c67b675 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -24,6 +24,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam);
char PLUGINNAME[64] = {0}; //init at init_pluginname();
int hLangpack = 0;
HINSTANCE hInst;
+CLIST_INTERFACE *pcli;
HINSTANCE hLotusDll;
HEMREGISTRATION hLotusRegister = 0;
@@ -1365,7 +1366,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyMiscOpts(HWND hwndDlg, UINT msg, WPARAM wPara
// Initialize LVITEM members that are common to all items.
lvI.mask = LVIF_TEXT;
for(int i = 0; i < STATUS_COUNT; i++) {
- lvI.pszText = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, ID_STATUS_ONLINE + i, GSMDF_TCHAR);
+ lvI.pszText = pcli->pfnGetStatusModeDescription(ID_STATUS_ONLINE + i, 0);
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
ListView_SetCheckState(hwndList, i, settingStatus[i]);
@@ -1694,6 +1695,8 @@ static int preshutdown(WPARAM,LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
Plugin_Terminated = false;
//if(pluginLink)//strange, but this function is called by Lotus API Extension Manager (instead of MainEntryPoint) probably always with parameter poiter =1
@@ -1709,16 +1712,12 @@ extern "C" int __declspec(dllexport) Load(void)
}
bMirandaCall=TRUE;
-
init_pluginname();
logRegister();
log_p(L"Load: Entering LotusNotify.dll Load() bMirandaCall=%d PLUGINNAME=[%S]", bMirandaCall, PLUGINNAME);
-
if(!(hCheckEvent = CreateHookableEvent("LotusNotify/Check"))) //check if there is another copy of plugin running
- {
second = TRUE;
- }
hCheckHook = HookEvent("LotusNotify/Check", eventCheck); //hook function to menu click event
@@ -1738,17 +1737,16 @@ extern "C" int __declspec(dllexport) Load(void)
Menu_EnableItem(hMenuHandle ,FALSE);
}
- //create protocol
+ // create protocol
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
pd.szName = PLUGINNAME;
pd.type = PROTOTYPE_PROTOCOL;
Proto_RegisterModule(&pd);
- //set all contacts to offline ///TODO: are that contacts exists ?
- for(MCONTACT hContact = db_find_first(PLUGINNAME); hContact; hContact = db_find_next(hContact, PLUGINNAME)){
+ // set all contacts to offline
+ for(MCONTACT hContact = db_find_first(PLUGINNAME); hContact; hContact = db_find_next(hContact, PLUGINNAME))
db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);
- }
CreateProtoServiceFunction(PLUGINNAME, PS_GETCAPS, GetCaps);
CreateProtoServiceFunction(PLUGINNAME, PS_GETNAME, GetName);
@@ -1771,10 +1769,8 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
extern "C" int __declspec(dllexport) Unload()
{
-
log(L"Unload: start");
Plugin_Terminated = true;
mir_cslock lck(checkthreadCS);
@@ -1792,7 +1788,6 @@ extern "C" int __declspec(dllexport) Unload()
return 0;
}
-
extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
#ifdef _WIN64
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index a917c63bcd..be56fac7f3 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -216,7 +216,7 @@ void ShowPopup(char* szText, TCHAR* tszText, MCONTACT hContact)
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
ppd.lchContact = hContact;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME - 1);
+ _tcsncpy(ppd.lptzContactName, pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME - 1);
_tcsncpy(ppd.lptzText, text, MAX_SECONDLINE - 1);
ppd.iSeconds = -1;
diff --git a/plugins/MenuItemEx/src/menuex.h b/plugins/MenuItemEx/src/menuex.h
index 72948e239a..cc23ddfb39 100644
--- a/plugins/MenuItemEx/src/menuex.h
+++ b/plugins/MenuItemEx/src/menuex.h
@@ -14,7 +14,7 @@
#include <m_langpack.h>
#include <m_file.h>
#include <m_clui.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_ignore.h>
#include <m_icolib.h>
#include <m_skin.h>
diff --git a/plugins/MirFox/src/MirandaInterface.cpp b/plugins/MirFox/src/MirandaInterface.cpp
index 8bce0ea7fa..8b1b7a0e74 100644
--- a/plugins/MirFox/src/MirandaInterface.cpp
+++ b/plugins/MirFox/src/MirandaInterface.cpp
@@ -2,6 +2,7 @@
#include "version.h"
#include "mirandaInterface.h"
+CLIST_INTERFACE *pcli;
//Miranda - handle from DllMain
HINSTANCE hInst;
@@ -83,8 +84,11 @@ static int OnShutdown(WPARAM, LPARAM)
}
-extern "C" int __declspec(dllexport) Load(void){
+extern "C" int __declspec(dllexport) Load(void)
+{
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index abd980f02e..de8c16b1dd 100644
--- a/plugins/MirFox/src/MirfoxData.cpp
+++ b/plugins/MirFox/src/MirfoxData.cpp
@@ -385,33 +385,22 @@ void MirfoxData::initializeMirandaContacts()
logger->log_p(L"initializeMirandaContacts: try to get name for hContact = [" SCNuPTR L"]", mirandaContactsIter->contactHandle);
if (mirandaContactsIter->mirandaAccountPtr != NULL){
-
- if ( strcmp(mirandaContactsIter->mirandaAccountPtr->szProtoName, "Twitter") == 0){
- //hack for Twitter protocol
+ if (strcmp(mirandaContactsIter->mirandaAccountPtr->szProtoName, "Twitter") == 0){
+ // hack for Twitter protocol
DBVARIANT dbv;
if (!db_get_s(mirandaContactsIter->contactHandle, mirandaContactsIter->mirandaAccountPtr->szModuleName, "Username", &dbv, DBVT_WCHAR)) {
mirandaContactsIter->contactNameW = std::wstring(dbv.pwszVal);
db_free(&dbv);
}
-
- } else {
- //standard miranda way for another protocols
-
- mirandaContactsIter->contactNameW =
- (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)mirandaContactsIter->contactHandle, GCDNF_TCHAR);
- //get contact's display name from clist
-
}
-
+ else // standard miranda way for another protocols
+ mirandaContactsIter->contactNameW = pcli->pfnGetContactDisplayName(mirandaContactsIter->contactHandle, 0);
}
- if (mirandaContactsIter->contactNameW.size() == 0){
- //last chance (if some hack didn't work or mirandaContactsIter->mirandaAccountPtr is NULL)
- mirandaContactsIter->contactNameW =
- (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)mirandaContactsIter->contactHandle, GCDNF_TCHAR);
- //get contact's display name from clist
- }
+ if (mirandaContactsIter->contactNameW.size() == 0)
+ // last chance (if some hack didn't work or mirandaContactsIter->mirandaAccountPtr is NULL)
+ mirandaContactsIter->contactNameW = pcli->pfnGetContactDisplayName(mirandaContactsIter->contactHandle, 0);
logger->log_p(L"initializeMirandaContacts: got name for hContact = [" SCNuPTR L"] is: [%s]", mirandaContactsIter->contactHandle,
&(mirandaContactsIter->contactNameW)==NULL ? L"<null>" : mirandaContactsIter->contactNameW.c_str());
diff --git a/plugins/MirFox/src/common.h b/plugins/MirFox/src/common.h
index 90aa3e84c4..05375dbad5 100644
--- a/plugins/MirFox/src/common.h
+++ b/plugins/MirFox/src/common.h
@@ -11,7 +11,7 @@
#include <m_database.h>
#include <m_langpack.h>
#include <m_options.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_protosvc.h>
#include <m_popup.h>
#include <m_message.h>
diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp
index d961050b49..8b80f078cc 100644
--- a/plugins/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/src/dllmain.cpp
@@ -1,6 +1,7 @@
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
#include "stdafx.h"
+CLIST_INTERFACE *pcli;
HANDLE hEventWindow;
HINSTANCE hInst;
@@ -59,9 +60,8 @@ extern "C" __declspec(dllexport) int Load(void)
{
DEBUGOUT_T("LOAD MIROTR");
- mir_getLP( &pluginInfo );
- /* for timezones
- mir_getTMI(&tmi); */
+ mir_getLP(&pluginInfo);
+ mir_getCLI();
InitIcons();
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index d8e5e968e1..37edfd734a 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -118,14 +118,14 @@ char* contact_get_id(MCONTACT hContact, bool bNameOnError) {
}
}
if (!pszUniqueID && bNameOnError) {
- char *name = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0);
+ char *name = (char *)pcli->pfnGetContactDisplayName(hContact, 0);
if (name) pszUniqueID = mir_strdup(name);
}
return pszUniqueID;
}
__inline const TCHAR* contact_get_nameT(MCONTACT hContact) {
- return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ return (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
}
TCHAR* ProtoGetNickname(const char* proto)
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index f6a2c7440c..37fa929a4e 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -445,7 +445,7 @@ bool CAppletManager::ActivateChatScreen(MCONTACT hContact)
tstring CAppletManager::GetContactDisplayname(MCONTACT hContact,bool bShortened)
{
if(!bShortened || !CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF))
- return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ return pcli->pfnGetContactDisplayName(hContact, 0);
tstring strNick = GetContactDisplayname(hContact,false);
if(strNick.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
@@ -1527,7 +1527,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
tstring strName = CAppletManager::GetContactDisplayname(Event.hContact,true);
// Get status String
- Event.strValue = toTstring((char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, 0));
+ Event.strValue = toTstring(pcli->pfnGetStatusModeDescription(iStatus, 0));
// check if this is an irc protocol
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(strProto);
@@ -1688,7 +1688,7 @@ int CAppletManager::HookProtoAck(WPARAM wParam, LPARAM lParam)
Event.strValue = strProto;
// set the event description / summary
- tstring strStatus = toTstring((char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iNewStatus, 0));
+ tstring strStatus = toTstring(pcli->pfnGetStatusModeDescription(iNewStatus, 0));
Event.strDescription = _T("(") + Event.strValue + _T(") ")+ TranslateString(_T("You are now %s"),strStatus.c_str());
Event.strSummary = TranslateString(_T("Protocol status change"));
diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp
index 51c6a85b92..0f374d3aa4 100644
--- a/plugins/MirandaG15/src/CChatScreen.cpp
+++ b/plugins/MirandaG15/src/CChatScreen.cpp
@@ -180,7 +180,6 @@ void CChatScreen::UpdateLabels()
{
tstring strNickname = CAppletManager::GetContactDisplayname(m_hContact);
char *szProto = GetContactProto(m_hContact);
- char *szStatus = NULL;
m_iStatus = ID_STATUS_OFFLINE;
tstring strProto = _T("");
@@ -191,7 +190,7 @@ void CChatScreen::UpdateLabels()
m_iStatus = db_get_w(m_hContact,szProto,"Status",ID_STATUS_OFFLINE);
}
- szStatus = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, m_iStatus, 0);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(m_iStatus, 0);
if(szStatus != NULL)
strStatus = toTstring(szStatus);
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp
index fdaacbbe85..8ce8cb2856 100644
--- a/plugins/MirandaG15/src/CContactList.cpp
+++ b/plugins/MirandaG15/src/CContactList.cpp
@@ -111,7 +111,7 @@ void CContactList::AddContact(MCONTACT hContact)
return;
int iStatus = db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE);
- char *szStatus = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, 0);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(iStatus, 0);
CContactListEntry *psContact = new CContactListEntry();
@@ -724,7 +724,7 @@ void CContactList::OnStatusChange(MCONTACT hContact,int iStatus)
int iOldStatus = pItemData->iStatus;
// Update the list entry
- char *szStatus = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, 0);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(iStatus, 0);
if(szStatus != NULL)
pItemData->strStatus =toTstring(szStatus);
diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp
index d40cbc86fa..1515978515 100644
--- a/plugins/MirandaG15/src/Miranda.cpp
+++ b/plugins/MirandaG15/src/Miranda.cpp
@@ -58,6 +58,7 @@ bool g_bInitialized;
// Plugin Information
+CLIST_INTERFACE *pcli;
HINSTANCE hInstance;
int hLangpack;
@@ -87,40 +88,43 @@ void UnInit();
//************************************************************************
// Exported Functions
//************************************************************************
-extern "C" {
- __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
- {
- return &pluginInfoEx;
- }
+
+EXTERN_C __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfoEx;
+}
- // Called by Miranda to load the plugin.
- // We defer initialization until Miranda's module loading process completed and return 0 to
- // mark success, everything else will cause the plugin to be freed right away.
- int __declspec(dllexport) Load()
- {
- g_bInitialized = false;
- InitDebug();
- TRACE(_T("Plugin loaded\n"));
- // Schedule actual initialization for later
- HookEvent(ME_SYSTEM_MODULESLOADED, Init);
- return 0;
- }
+// Called by Miranda to load the plugin.
+// We defer initialization until Miranda's module loading process completed and return 0 to
+// mark success, everything else will cause the plugin to be freed right away.
+EXTERN_C int __declspec(dllexport) Load()
+{
+ mir_getLP(&pluginInfoEx);
+ mir_getCLI();
+
+ g_bInitialized = false;
+
+ InitDebug();
+ TRACE(_T("Plugin loaded\n"));
+ // Schedule actual initialization for later
+ HookEvent(ME_SYSTEM_MODULESLOADED, Init);
+ return 0;
+}
- // Called by Miranda when the plugin should unload itself.
- int __declspec(dllexport) Unload(void)
- {
- if(!g_bInitialized) {
- TRACE(_T("ERROR: Unload requested, but plugin is not initialized?!\n"));
- return 0;
- }
- TRACE(_T("-------------------------------------------\nUnloading started\n"));
- UnInit();
- TRACE(_T("Unloading successful\n"));
- TRACE(_T("Cleaning up: "));
- UnInitDebug();
- TRACE(_T("OK!\n"));
+// Called by Miranda when the plugin should unload itself.
+EXTERN_C int __declspec(dllexport) Unload(void)
+{
+ if(!g_bInitialized) {
+ TRACE(_T("ERROR: Unload requested, but plugin is not initialized?!\n"));
return 0;
}
+ TRACE(_T("-------------------------------------------\nUnloading started\n"));
+ UnInit();
+ TRACE(_T("Unloading successful\n"));
+ TRACE(_T("Cleaning up: "));
+ UnInitDebug();
+ TRACE(_T("OK!\n"));
+ return 0;
}
//************************************************************************
diff --git a/plugins/ModernOpt/src/commonheaders.h b/plugins/ModernOpt/src/commonheaders.h
index 1748b702f5..35464a469c 100644
--- a/plugins/ModernOpt/src/commonheaders.h
+++ b/plugins/ModernOpt/src/commonheaders.h
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_database.h>
#include <m_utils.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_protosvc.h>
#include <m_skin.h>
#include <m_userinfo.h>
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index 3d5f8b4258..9a5abd1248 100755
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -18,6 +18,7 @@
#include "Glob.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInstance = NULL;
int hLangpack = 0;
@@ -187,6 +188,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
nMaxLineWidth = db_get_w(NULL, MODULE, "MaxLineWidth", nMaxLineWidth);
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index a50cb84626..56e178cb03 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -257,7 +257,7 @@ void DisplayLastError(const TCHAR *pszError)
const TCHAR* NickFromHandle(MCONTACT hContact)
{
- const TCHAR *psz = (const TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ const TCHAR *psz = pcli->pfnGetContactDisplayName(hContact, 0);
if (psz)
return psz;
return pszNickError;
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index 7b286f837b..fe22fe135b 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -128,7 +128,7 @@ int Protocol::GetStatus()
custom_status = 0;
if (custom_status == 0) {
- TCHAR *tmp = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, status, GSMDF_TCHAR);
+ TCHAR *tmp = pcli->pfnGetStatusModeDescription(status, 0);
lcopystr(status_name, tmp, _countof(status_name));
}
else {
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index e2ef8a528c..52cc6a52ce 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -1822,8 +1822,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
}
// Add this to menu
- mir_sntprintf(tmp, _countof(tmp), TranslateT("Set my status message for %s..."),
- CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, proto->status, GSMDF_TCHAR));
+ mir_sntprintf(tmp, _countof(tmp), TranslateT("Set my status message for %s..."), pcli->pfnGetStatusModeDescription(proto->status, 0));
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
@@ -1902,8 +1901,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
InsertMenuItem(submenu, 0, TRUE, &mii);
// Add this to menu
- mir_sntprintf(tmp, _countof(tmp), TranslateT("Set my status message for %s..."),
- CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, proto->status, GSMDF_TCHAR));
+ mir_sntprintf(tmp, _countof(tmp), TranslateT("Set my status message for %s..."), pcli->pfnGetStatusModeDescription(proto->status, 0));
memset(&mii, 0, sizeof(mii));
mii.cbSize = sizeof(mii);
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp
index bddb20c124..99410d8c8e 100644
--- a/plugins/MyDetails/src/services.cpp
+++ b/plugins/MyDetails/src/services.cpp
@@ -341,8 +341,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(NULL, data->status));
TCHAR title[256];
- mir_sntprintf(title, _countof(title), TranslateT("Set my status message for %s"),
- CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, data->status, GSMDF_TCHAR));
+ mir_sntprintf(title, _countof(title), TranslateT("Set my status message for %s"), pcli->pfnGetStatusModeDescription(data->status, 0));
SetWindowText(hwndDlg, title);
SetDlgItemText(hwndDlg, IDC_STATUSMESSAGE, protocols->GetDefaultStatusMsg(data->status));
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
index 5781ab8f58..5b6f600239 100644
--- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
@@ -795,7 +795,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
WindowTitle += _T(" ");
}
- WindowTitle += (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ WindowTitle += pcli->pfnGetContactDisplayName(hContact, 0);
if (!IsAnICQProto(GetContactProto(hContact))) {
WindowTitle += _T(" ");
WindowTitle += TranslateT("available autoreply only");
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index 63fd90ea86..086a51f325 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -30,6 +30,7 @@ extern PLUGIN_DATA* PopupList[20];
//---------------------------
//---Some global variables for the plugin
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
PLUGIN_OPTIONS pluginOptions;
int hLangpack;
@@ -50,12 +51,6 @@ PLUGININFOEX pluginInfo = {
//---------------------------
//---Hooks
-//---Handles to my hooks, needed to unhook them again
-HANDLE hHookedInit;
-HANDLE hHookedOpt;
-HANDLE hHookedNewEvent;
-HANDLE hHookedDeletedEvent;
-
//---Called when a new event is added to the database
//wParam: contact-handle
//lParam: dbevent-handle
@@ -113,7 +108,7 @@ int HookedNewEvent(WPARAM hContact, LPARAM hDbEvent)
//---Called when all the modules are loaded
int HookedInit(WPARAM, LPARAM)
{
- hHookedNewEvent = HookEvent(ME_DB_EVENT_ADDED, HookedNewEvent);
+ HookEvent(ME_DB_EVENT_ADDED, HookedNewEvent);
// Plugin sweeper support
if (ServiceExists("PluginSweeper/Add"))
CallService("PluginSweeper/Add", (WPARAM)MODULE, (LPARAM)MODULE);
@@ -142,10 +137,11 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int Load(void)
{
- hHookedInit = HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit);
- hHookedOpt = HookEvent(ME_OPT_INITIALISE, HookedOptions);
+ HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit);
+ HookEvent(ME_OPT_INITIALISE, HookedOptions);
mir_getLP(&pluginInfo);
+ mir_getCLI();
OptionsInit(&pluginOptions);
pluginOptions.hInst = hInst;
@@ -155,9 +151,6 @@ extern "C" __declspec(dllexport) int Load(void)
extern "C" __declspec(dllexport) int Unload(void)
{
- UnhookEvent(hHookedNewEvent);
- UnhookEvent(hHookedOpt);
- UnhookEvent(hHookedInit);
return 0;
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index 487aa7d1fc..d3dfa415f7 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -494,7 +494,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U
_tcsncpy(pudw.lptzText, TranslateTS(sampleEvent), MAX_SECONDLINE);
}
else { // get the needed event data
- _tcsncpy(pudw.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(pudw.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(pudw.lptzText, ptrT(GetEventPreview(&dbe)), MAX_SECONDLINE);
}
diff --git a/plugins/NewXstatusNotify/src/common.h b/plugins/NewXstatusNotify/src/common.h
index 503fb31cb2..eb7e6b5a85 100644
--- a/plugins/NewXstatusNotify/src/common.h
+++ b/plugins/NewXstatusNotify/src/common.h
@@ -54,7 +54,7 @@
#include <m_xstatus.h>
#include <m_extraicons.h>
#include <m_string.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_metacontacts.h>
#include <m_toptoolbar.h>
diff --git a/plugins/New_GPG/src/commonheaders.h b/plugins/New_GPG/src/commonheaders.h
index c3ff37eede..120f288341 100644
--- a/plugins/New_GPG/src/commonheaders.h
+++ b/plugins/New_GPG/src/commonheaders.h
@@ -63,7 +63,7 @@ using std::fstream;
#include <m_jabber.h>
#include <m_icq.h>
#include <m_message.h>
-#include <m_clist.h>
+#include <m_clist.h>
#include <m_cluiframes.h>
#include <m_icolib.h>
#include <m_extraicons.h>
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 19d274ed51..47f7733ec3 100644
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -22,6 +22,7 @@ TCHAR *inopentag = NULL, *inclosetag = NULL, *outopentag = NULL, *outclosetag =
list <JabberAccount*> Accounts;
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
HFONT bold_font = NULL;
HANDLE hLoadPubKey = NULL, g_hCLIcon = NULL, hExportGpgKeys = NULL, hImportGpgKeys = NULL;
@@ -167,8 +168,11 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam)
extern "C" int __declspec(dllexport) Load()
{
- HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+
init_vars();
CreateServiceFunction("/LoadPubKey",LoadKey);
CreateServiceFunction("/ToggleEncryption",ToggleEncryption);
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 6f64c97c5e..93c1c704f9 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -1296,7 +1296,7 @@ static INT_PTR CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wPara
SetDlgItemText(hwndDlg, ID_IMPORT, tmp[0]?TranslateT("Replace"):TranslateT("Accept"));
mir_free(tmp);
tmp = new TCHAR [256];
- mir_sntprintf(tmp, 255*sizeof(TCHAR),TranslateT("Received key from %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ mir_sntprintf(tmp, 255*sizeof(TCHAR),TranslateT("Received key from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
SetDlgItemText(hwndDlg, IDC_KEY_FROM, tmp);
delete [] tmp;
}
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 384f1d7fb1..fbaea6013b 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -16,7 +16,6 @@
#include "commonheaders.h"
-
wstring new_key;
MCONTACT new_key_hcnt = NULL;
boost::mutex new_key_hcnt_mutex;
@@ -38,7 +37,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
if(!isContactSecured(hContact))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with turned off encryption");
+ debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" with turned off encryption");
if(MessageBox(0, TranslateT("We received encrypted message from contact with encryption turned off.\nDo you want to turn on encryption for this contact?"), TranslateT("Warning"), MB_YESNO) == IDYES)
{
if(!isContactHaveKey(hContact))
@@ -69,7 +68,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
}
else if(bDebugLog)
{
- debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: received encrypted message from: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
}
boost::algorithm::erase_all(str, "\r");
s2 += mir_tstrlen(_T("-----END PGP MESSAGE-----"));
@@ -103,13 +102,13 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
dbsetting += "_Password";
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T(""));
if(pass[0] && bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in database for key ID: "+inkeyid+", trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password in database for key ID: "+inkeyid+", trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" with password");
}
else
{
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T(""));
if(pass[0] && bDebugLog)
- debuglog<<std::string(time_str()+": info: found password for all keys in database, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password for all keys in database, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" with password");
}
if(pass && pass[0])
{
@@ -119,12 +118,12 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
else if(password && password[0])
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" with password");
cmd.push_back(L"--passphrase");
cmd.push_back(password);
}
else if (bDebugLog)
- debuglog<<std::string(time_str()+": info: passwords not found in database or memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" with out password");
+ debuglog<<std::string(time_str()+": info: passwords not found in database or memory, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" with out password");
mir_free(pass);
mir_free(inkeyid);
}
@@ -174,7 +173,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
while(out.find("public key decryption failed: bad passphrase") != string::npos)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: failed to decrypt messaage from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" password needed, trying to get one");
+ debuglog<<std::string(time_str()+": info: failed to decrypt messaage from "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" password needed, trying to get one");
if(_terminate)
{
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
@@ -199,7 +198,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
if(password)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
std::vector<wstring> tmp;
tmp.push_back(L"--passphrase");
tmp.push_back(password);
@@ -356,7 +355,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
else
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: blocked pgp message to metacontact:"+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: blocked pgp message to metacontact:"+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
return 0;
}
}
@@ -365,13 +364,13 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if(bAutoExchange && (str.find(_T("-----PGP KEY RESPONSE-----")) != wstring::npos))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange): parsing key response:"+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange): parsing key response:"+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
s2 = str.find(_T("-----END PGP PUBLIC KEY BLOCK-----"));
s1 = str.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----"));
if(s1 != wstring::npos && s2 != wstring::npos)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange): found pubkey block:"+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange): found pubkey block:"+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
s2 += mir_tstrlen(_T("-----END PGP PUBLIC KEY BLOCK-----"));
db_set_ts(ccs->hContact, szGPGModuleName, "GPGPubKey", str.substr(s1,s2-s1).c_str());
{ //gpg execute block
@@ -492,7 +491,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if((s2 != wstring::npos) && (s1 != wstring::npos))
{ //this is public key
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: received key from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: received key from: "+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
s1 = 0;
while((s1 = str.find(_T("\r"), s1)) != wstring::npos)
str.erase(s1, 1);
@@ -515,7 +514,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if(bAutoExchange && strstr(msg, "-----PGP KEY REQUEST-----") && gpg_valid && gpg_keyexist)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange): received key request from: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange): received key request from: "+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
char *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", "");
if(tmp[0])
{
@@ -591,7 +590,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
if(bStripTags && bAppendTags)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: stripping tags in outgoing message, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: stripping tags in outgoing message, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
strip_tags(str);
}
/* for(std::wstring::size_type i = str.find(_T("\r\n")); i != std::wstring::npos; i = str.find(_T("\r\n"), i+1))
@@ -748,7 +747,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
}
if(bDebugLog)
- debuglog<<std::string(time_str()+": adding event to contact: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" on send message.");
+ debuglog<<std::string(time_str()+": adding event to contact: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" on send message.");
fix_line_term(str);
sent_msgs.push_back((HANDLE)CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)toUTF8(str).c_str()));
@@ -765,23 +764,23 @@ INT_PTR SendMsgSvc(WPARAM w, LPARAM l)
if (!msg)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: failed to get message data, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: failed to get message data, name: "+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
return Proto_ChainSend(w, ccs);
}
if(strstr(msg,"-----BEGIN PGP MESSAGE-----"))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: encrypted messge, let it go, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: encrypted messge, let it go, name: "+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
return Proto_ChainSend(w, ccs);
}
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: contact have key, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: contact have key, name: "+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
if(bDebugLog && db_mc_isMeta(ccs->hContact))
- debuglog<<std::string(time_str()+": info: protocol is metacontacts, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: protocol is metacontacts, name: "+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
if(!isContactSecured(ccs->hContact) || db_mc_isMeta(ccs->hContact))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: contact not secured, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: contact not secured, name: "+toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
return Proto_ChainSend(w, ccs);
}
return returnNoError(ccs->hContact);
@@ -802,13 +801,13 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(isContactSecured(hContact) && strstr((char*)dbei->pBlob, "-----BEGIN PGP MESSAGE-----")) //our service data, can be double added by metacontacts e.t.c.
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
return 1;
}
if(bAutoExchange && (strstr((char*)dbei->pBlob, "-----PGP KEY RESPONSE-----") || strstr((char*)dbei->pBlob, "-----PGP KEY REQUEST-----"))) ///do not show service data in history
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(send handler): block pgp key request/response event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(send handler): block pgp key request/response event, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
return 1;
}
}
@@ -818,27 +817,27 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(!isContactHaveKey(hContact))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: contact have not key, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: contact have not key, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
if(bAutoExchange && !strstr((char*)dbei->pBlob, "-----PGP KEY REQUEST-----") && !strstr((char*)dbei->pBlob, "-----BEGIN PGP PUBLIC KEY BLOCK-----") && gpg_valid)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: checking for autoexchange possibility, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: checking for autoexchange possibility, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
LPSTR proto = GetContactProto(hContact);
DWORD uin = db_get_dw(hContact, proto, "UIN", 0);
if(uin)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like icq, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like icq, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
char *proto = GetContactProto(hContact);
if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange, icq): checking for autoexchange icq capability, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange, icq): checking for autoexchange icq capability, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
ICQ_CUSTOMCAP cap = {0};
strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
if (CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, hContact, (LPARAM)&cap)) {
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange, icq): sending key requiest, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange, icq): sending key requiest, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
boost::thread *thr = new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
@@ -853,7 +852,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(jid[0])
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like jabber, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like jabber, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
extern list <JabberAccount*> Accounts;
list<JabberAccount*>::iterator end = Accounts.end();
for(list<JabberAccount*>::iterator p = Accounts.begin(); p != end; p++)
@@ -873,7 +872,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(str.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(autoexchange, jabber): autoexchange capability found, sending key request, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(autoexchange, jabber): autoexchange capability found, sending key request, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
boost::thread *thr = new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
@@ -911,7 +910,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(!isContactSecured(hContact))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": event message: \""+(char*)dbei->pBlob+"\" passed event filter, contact "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))+" is unsecured");
+ debuglog<<std::string(time_str()+": event message: \""+(char*)dbei->pBlob+"\" passed event filter, contact "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))+" is unsecured");
return 0;
}
if(!(dbei->flags & DBEF_SENT) && db_mc_isMeta((MCONTACT)w))
@@ -922,7 +921,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(strstr(tmp, "-----BEGIN PGP MESSAGE-----"))
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info(send handler): block pgp message event, name: "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
return 1;
}
}
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 68d705f19c..bed5aaa640 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -122,7 +122,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
int i = 1, iRow = 0;
for(MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if(isContactHaveKey(hContact)) {
- TCHAR *name = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *name = pcli->pfnGetContactDisplayName(hContact, 0);
item.mask = LVIF_TEXT;
item.iItem = i;
item.iSubItem = 0;
@@ -735,7 +735,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
TranslateDialogDefault(hwndDlg);
{
wstring msg = TranslateT("Load Public GPG Key for ");
- msg += (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hcnt, GCDNF_TCHAR);
+ msg += pcli->pfnGetContactDisplayName(hcnt, 0);
SetWindowText(hwndDlg, msg.c_str());
}
if(!hcnt)
@@ -811,7 +811,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
str.append(tmp3);
mir_free(tmp3);
string msg = Translate("Load Public GPG Key for ");
- msg += (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hcnt, 0);
+ msg += _T2A(pcli->pfnGetContactDisplayName(hcnt, 0));
msg += " (Key ID: ";
msg += hcontact_data[hcnt].key_in_prescense;
msg += Translate(" found in presence, and exists in keyring.)");
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 356657bb19..a3fceecef4 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -351,13 +351,13 @@ int onProtoAck(WPARAM w, LPARAM l)
dbsetting += "_Password";
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T(""));
if(mir_tstrlen(pass) > 0 && bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in database for key ID: "+keyid+", trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password in database for key ID: "+keyid+", trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0))+" with password");
}
else
{
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T(""));
if(mir_tstrlen(pass) > 0 && bDebugLog)
- debuglog<<std::string(time_str()+": info: found password for all keys in database, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password for all keys in database, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0))+" with password");
}
if(mir_tstrlen(pass) > 0)
{
@@ -367,12 +367,12 @@ int onProtoAck(WPARAM w, LPARAM l)
else if(password)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR))+" with password");
+ debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0))+" with password");
cmd.push_back(L"--passphrase");
cmd.push_back(password);
}
else if (bDebugLog)
- debuglog<<std::string(time_str()+": info: passwords not found in database or memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR))+" with out password");
+ debuglog<<std::string(time_str()+": info: passwords not found in database or memory, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0))+" with out password");
mir_free(pass);
mir_free(keyid);
}
@@ -387,7 +387,7 @@ int onProtoAck(WPARAM w, LPARAM l)
while(out.find("public key decryption failed: bad passphrase") != string::npos)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: failed to decrypt messaage from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR))+" password needed, trying to get one");
+ debuglog<<std::string(time_str()+": info: failed to decrypt messaage from "+toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0))+" password needed, trying to get one");
if(_terminate)
break;
{ //save inkey id
@@ -408,7 +408,7 @@ int onProtoAck(WPARAM w, LPARAM l)
if(password)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": info: found password in memory, trying to decrypt message from "+toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)));
std::vector<wstring> tmp;
tmp.push_back(L"--passphrase");
tmp.push_back(password);
@@ -1065,7 +1065,7 @@ bool isContactSecured(MCONTACT hContact)
if(!gpg_enc)
{
if(bDebugLog)
- debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
return false;
}
if(!db_mc_isMeta(hContact))
@@ -1075,13 +1075,13 @@ bool isContactSecured(MCONTACT hContact)
{
mir_free(key);
if(bDebugLog)
- debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": encryption is turned off for "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
return false;
}
mir_free(key);
}
if(bDebugLog)
- debuglog<<std::string(time_str()+": encryption is turned on for "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": encryption is turned on for "+toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
return true;
}
diff --git a/plugins/Non-IM Contact/src/commonheaders.h b/plugins/Non-IM Contact/src/commonheaders.h
index 2facfdce1d..ac0eab279b 100644
--- a/plugins/Non-IM Contact/src/commonheaders.h
+++ b/plugins/Non-IM Contact/src/commonheaders.h
@@ -34,7 +34,6 @@ struct DLGTEMPLATEEX
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clui.h>
#include <m_skin.h>
#include <m_langpack.h>
diff --git a/plugins/Nudge/src/headers.h b/plugins/Nudge/src/headers.h
index 34c5abaf07..5a1fa0e324 100644
--- a/plugins/Nudge/src/headers.h
+++ b/plugins/Nudge/src/headers.h
@@ -14,7 +14,6 @@
#include <m_langpack.h>
#include <m_popup.h>
#include <m_clui.h>
-#include <m_clistint.h>
#include <m_message.h>
#include <m_ignore.h>
#include <m_options.h>
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index d60b9901a3..614da4686b 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -444,7 +444,7 @@ int Preview()
void Nudge_ShowPopup(CNudgeElement *n, MCONTACT hContact, TCHAR * Message)
{
hContact = db_mc_tryMeta(hContact);
- TCHAR *lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *lpzContactName = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
POPUPDATACLASS NudgePopup = { 0 };
diff --git a/plugins/Ping/src/common.h b/plugins/Ping/src/common.h
index 79dfbcf6f5..0329e3491e 100644
--- a/plugins/Ping/src/common.h
+++ b/plugins/Ping/src/common.h
@@ -23,7 +23,7 @@
#include <m_database.h>
#include <m_protosvc.h>
#include <m_clui.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_cluiframes.h>
#include <m_fontservice.h>
#include <m_icolib.h>
diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp
index 7fd6912da9..ad5d93ee68 100644
--- a/plugins/Ping/src/options.cpp
+++ b/plugins/Ping/src/options.cpp
@@ -169,7 +169,7 @@ INT_PTR CALLBACK DlgProcDestEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- INT_PTR ret = CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)i, GSMDF_TCHAR);
+ TCHAR *ret = pcli->pfnGetStatusModeDescription(i, 0);
SendDlgItemMessage(hwndDlg, IDC_COMBO_DESTSTAT, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)ret);
SendDlgItemMessage(hwndDlg, IDC_COMBO_DESTSTAT2, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)ret);
}
diff --git a/plugins/Popup/src/headers.h b/plugins/Popup/src/headers.h
index 811cefa0b2..4db076f80a 100644
--- a/plugins/Popup/src/headers.h
+++ b/plugins/Popup/src/headers.h
@@ -64,7 +64,6 @@ http://miranda-ng.org/distr/
#include <win2k.h>
#include <m_clui.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_langpack.h>
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 8993b1578b..6c150cd6df 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -36,6 +36,7 @@ PLUGININFOEX pluginInfo={
{0xf93ba59c, 0x4f48, 0x4f2e, {0x8a, 0x91, 0x77, 0xa2, 0x80, 0x15, 0x27, 0xa3}}
};
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
HIMAGELIST hIml;
int hLangpack = 0;
@@ -78,6 +79,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
hQSShowDialog = CreateServiceFunction(MS_QC_SHOW_DIALOG, ShowDialog);
@@ -407,7 +409,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
}
// Make contact name
- TCHAR *tmp = (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *tmp = (TCHAR *) pcli->pfnGetContactDisplayName(hContact, 0);
mir_tstrncpy(contact->szname, tmp, _countof(contact->szname));
PROTOACCOUNT *acc = Proto_GetAccount(pszProto);
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp
index 9de7e40fc4..23777ee2d2 100644
--- a/plugins/QuickMessages/src/Utils.cpp
+++ b/plugins/QuickMessages/src/Utils.cpp
@@ -487,7 +487,7 @@ TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* pt
break;
case 'n':
- ptszName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ ptszName = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
NameLenght = (int)mir_tstrlen(ptszName);
p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(TCHAR));
if (!p)
diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp
index e68d39aff2..c4fabc73b8 100644
--- a/plugins/QuickMessages/src/main.cpp
+++ b/plugins/QuickMessages/src/main.cpp
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quickmessages.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hinstance;
int hLangpack;
@@ -324,6 +325,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID lpvReserved)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED,PluginInit);
HookEvent(ME_SYSTEM_PRESHUTDOWN,PreShutdown);
diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc
index 51e756aacd..009dcd6ba5 100644
--- a/plugins/QuickSearch/i_ok.inc
+++ b/plugins/QuickSearch/i_ok.inc
@@ -266,7 +266,6 @@ begin
mFreeMem(res.text);
with column^ do
begin
-
case setting_type of
QST_SCRIPT: begin
res.text:=ParseVarString(script,hContact);
@@ -390,10 +389,15 @@ begin
end;
end;
- QST_OTHER: case other of
+ QST_OTHER:
+ case other of
QSTO_LASTSEEN: begin
res.data:=BuildLastSeenTimeInt(hContact,'SeenModule');
- res.text:=BuildLastSeenTime (res.data);
+ res.text:=BuildLastSeenTime(res.data);
+ end;
+
+ QSTO_DISPLAYNAME: begin
+ StrDupW(res.text,cli^.pfnGetContactDisplayName(hContact, 0));
end;
QSTO_LASTEVENT: begin
@@ -419,7 +423,6 @@ begin
res.text:=int2strw(res.data);
end;
end;
-
end;
end;
end;
@@ -573,7 +576,7 @@ begin
begin
if ((SBData[i].flags and (QSF_ACCDEL or QSF_ACCOFF))<>0) then
begin
- icon:=Skin_LoadProtoIcon(0,ID_STATUS_OFFLINE,0);
+ icon:=Skin_LoadProtoIcon(nil,ID_STATUS_OFFLINE,0);
end
else
begin
diff --git a/plugins/QuickSearch/sr_global.pas b/plugins/QuickSearch/sr_global.pas
index b4e18a1b92..74c0a5e6ef 100644
--- a/plugins/QuickSearch/sr_global.pas
+++ b/plugins/QuickSearch/sr_global.pas
@@ -43,6 +43,7 @@ const //types
QSTO_LASTEVENT = 1;
QSTO_METACONTACT = 2;
QSTO_EVENTCOUNT = 3;
+ QSTO_DISPLAYNAME = 4;
const
COL_ON = $0001; // Show column
@@ -395,12 +396,8 @@ begin
StrDupW(title,TranslateW('Nickname'));
width :=76;
flags :=COL_ON+COL_FILTER;
- setting_type :=QST_SERVICE;
- StrDup(service.service,MS_CLIST_GETCONTACTDISPLAYNAME);
- service.flags :=ACF_TYPE_UNICODE;
- service.w_flags:=ACF_TYPE_PARAM;
- service.l_flags:=ACF_TYPE_NUMBER;
- StrDupW(pWideChar(service.lparam),'2'); // 0 for ANSI
+ setting_type :=QST_OTHER;
+ other :=QSTO_DISPLAYNAME;
end;
inc(i);
@@ -740,6 +737,13 @@ begin
StrCopy(p,so__title); title:=GetUnicode(buf);
StrCopy(p,so__width); width:=GetWord(buf,20);
StrCopy(p,so__flags); flags:=GetWord(buf,COL_ON) and not COL_REFRESH;
+
+ if (title='Nickname') then begin
+ setting_type:=QST_OTHER;
+ other:=QSTO_DISPLAYNAME;
+ continue;
+ end;
+
case setting_type of
QST_SETTING: begin
StrCopy(p,so__datatype); datatype:=GetWord(buf,0);
diff --git a/plugins/QuickSearch/sr_optdialog.pas b/plugins/QuickSearch/sr_optdialog.pas
index 727f19bbb6..b5ee06be06 100644
--- a/plugins/QuickSearch/sr_optdialog.pas
+++ b/plugins/QuickSearch/sr_optdialog.pas
@@ -37,6 +37,7 @@ const
stScript :PWideChar = 'Script';
stMetacontact:PWideChar = 'Metacontact';
stEventCount :PWideChar = 'EventCount';
+ stDisplayName:PWideChar = 'Display name';
stSetting :PWideChar = 'DB setting';
stOther :PWideChar = 'Other';
@@ -466,6 +467,7 @@ begin
CB_AddStrDataW(list,TranslateW(stLastEvent) ,QSTO_LASTEVENT);
CB_AddStrDataW(list,TranslateW(stMetacontact),QSTO_METACONTACT);
CB_AddStrDataW(list,TranslateW(stEventCount) ,QSTO_EVENTCOUNT);
+ CB_AddStrDataW(list,TranslateW(stDisplayName),QSTO_DISPLAYNAME);
SendMessage(list,CB_SETCURSEL,0,0);
end;
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index fea1c66b73..97f0c547b4 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -237,7 +237,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
for(curContact = DlgDat->Contacts->begin(); curContact != DlgDat->Contacts->end(); curContact++) {
if (curContact->second != NULL && db_get_b(curContact->second, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0 ) {
- TCHAR *cname = ( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)curContact->second, GCDNF_TCHAR);
+ TCHAR *cname = ( TCHAR* )pcli->pfnGetContactDisplayName(curContact->second, 0);
if ( cname == NULL )
continue;
diff --git a/plugins/RecentContacts/src/RecentContacts.h b/plugins/RecentContacts/src/RecentContacts.h
index fcce1fe640..43a21e8227 100644
--- a/plugins/RecentContacts/src/RecentContacts.h
+++ b/plugins/RecentContacts/src/RecentContacts.h
@@ -10,7 +10,6 @@
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_langpack.h>
#include <m_database.h>
#include <m_message.h>
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index a1b1dfa165..323e08f1d5 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -79,7 +79,7 @@ int SendSMSMenuCommand(WPARAM wParam,LPARAM lParam)
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (GetContactPhonesCount(hContact)) {
- SendDlgItemMessage(hwndSendSms,IDC_NAME,CB_ADDSTRING,0,(LPARAM)GetContactNameW(hContact));
+ SendDlgItemMessage(hwndSendSms, IDC_NAME, CB_ADDSTRING, 0, (LPARAM)pcli->pfnGetContactDisplayName(hContact, 0));
SendSMSWindowSMSContactAdd(hwndSendSms,hContact);
}
}
diff --git a/plugins/SMS/src/common.h b/plugins/SMS/src/common.h
index a83c711a42..5eae581d27 100644
--- a/plugins/SMS/src/common.h
+++ b/plugins/SMS/src/common.h
@@ -79,9 +79,6 @@ extern SMS_SETTINGS ssSMSSettings;
#define GET_DLG_ITEM_TEXT_LENGTH(hDlg,nIDDlgItem) SendDlgItemMessage(hDlg,nIDDlgItem,WM_GETTEXTLENGTH,NULL,NULL)
#define GET_CURRENT_COMBO_DATA(hWndDlg,ControlID) SendDlgItemMessage(hWndDlg,ControlID,CB_GETITEMDATA,SendDlgItemMessage(hWndDlg,ControlID,CB_GETCURSEL,0,0),0)
-
-#define GetContactNameW(Contact) (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)Contact,GCDNF_UNICODE)
-
#define DB_SMS_DeleteValue(Contact,valueName) db_unset(Contact,PROTOCOL_NAMEA,valueName)
#define DB_SMS_GetDword(Contact,valueName,parDefltValue) db_get_dw(Contact,PROTOCOL_NAMEA,valueName,parDefltValue)
#define DB_SMS_SetDword(Contact,valueName,parValue) db_set_dw(Contact,PROTOCOL_NAMEA,valueName,parValue)
diff --git a/plugins/SMS/src/main.cpp b/plugins/SMS/src/main.cpp
index 824d4a568e..e670a6fbb2 100644
--- a/plugins/SMS/src/main.cpp
+++ b/plugins/SMS/src/main.cpp
@@ -27,12 +27,12 @@ Enjoy the code and use it smartly!
#include "common.h"
+CLIST_INTERFACE *pcli;
int hLangpack;
HINSTANCE hInst;
SMS_SETTINGS ssSMSSettings;
-
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -79,6 +79,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED,OnModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN,OnPreShutdown);
diff --git a/plugins/SMS/src/options.cpp b/plugins/SMS/src/options.cpp
index 4d9cafd7e4..f4faad168b 100644
--- a/plugins/SMS/src/options.cpp
+++ b/plugins/SMS/src/options.cpp
@@ -38,7 +38,7 @@ INT_PTR CALLBACK DlgProcEditorOptions(HWND hWndDlg, UINT msg, WPARAM wParam, LPA
TranslateDialogDefault(hWndDlg);
if (DB_SMS_GetStaticStringW(NULL,"Signature",tszSign,_countof(tszSign),NULL)==FALSE)
- mir_sntprintf(tszSign,_countof(tszSign),TranslateT("From %s:\r\n\r\n"),GetContactNameW(NULL));
+ mir_sntprintf(tszSign, TranslateT("From %s:\r\n\r\n"), pcli->pfnGetContactDisplayName(0, 0));
SetDlgItemText(hWndDlg,IDC_SIGNATURE,tszSign);
{
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp
index 84eb7cae6e..949f2f89b7 100644
--- a/plugins/SMS/src/receive.cpp
+++ b/plugins/SMS/src/receive.cpp
@@ -238,7 +238,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
}
else {
memcpy(pszServiceFunctionName,SMS_READ,sizeof(SMS_READ));
- mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Message from %s"),GetContactNameW(hContact));
+ mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
@@ -261,7 +261,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
UINT iIcon;
if (GetDataFromMessage((LPSTR)dbei.pBlob, dbei.cbBlob, NULL, NULL, 0, NULL, &iIcon)) {
memcpy(pszServiceFunctionName,SMS_READ_ACK,sizeof(SMS_READ_ACK));
- mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Confirmation from %s"),GetContactNameW(hContact));
+ mir_sntprintf(szToolTip,_countof(szToolTip),TranslateT("SMS Confirmation from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp
index 230c65c3b8..f101df922b 100644
--- a/plugins/SMS/src/recvdlg.cpp
+++ b/plugins/SMS/src/recvdlg.cpp
@@ -219,7 +219,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact, DWORD dwEventType, LPWSTR lpwszPhone, s
dwPhoneSize++;
}
- lpwszContactDisplayName = GetContactNameW(hContact);
+ lpwszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
mir_sntprintf(wszTitle, _countof(wszTitle),_T("%s - %s"), lpwszContactDisplayName, lpwszTitlepart);
MultiByteToWideChar(CP_UTF8, 0, lpszMessage, (int)dwMessageSize, lpwszMessage, (int)dwMessageSize+MAX_PATH);
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp
index 34e1ec1177..63d353bdc2 100644
--- a/plugins/SMS/src/senddlg.cpp
+++ b/plugins/SMS/src/senddlg.cpp
@@ -573,7 +573,7 @@ HWND SendSMSWindowAdd(MCONTACT hContact)
ListMTItemAdd(&ssSMSSettings.lmtSendSMSWindowsListMT,&psswdWindowData->lmtListMTItem,psswdWindowData);
ListMTUnLock(&ssSMSSettings.lmtSendSMSWindowsListMT);
- LPTSTR lptszContactDisplayName=GetContactNameW(hContact);
+ LPTSTR lptszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tszTitle[MAX_PATH];
mir_sntprintf(tszTitle, _countof(tszTitle), _T("%s - %s"), lptszContactDisplayName, TranslateT("Send SMS"));
SetWindowText(psswdWindowData->hWnd,tszTitle);
@@ -1054,8 +1054,8 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lp
{
if (tvis.hParent==NULL)
{
- tvis.item.pszText=GetContactNameW(hContact);
- tvis.hParent=TreeView_InsertItem(hWndList,&tvis);
+ tvis.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ tvis.hParent=TreeView_InsertItem(hWndList, &tvis);
}
tvis.item.pszText=tszPhone;
TreeView_InsertItem(hWndList,&tvis);
@@ -1073,7 +1073,7 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lp
{
if (tvis.hParent==NULL)
{
- tvis.item.pszText=GetContactNameW(hContact);
+ tvis.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
tvis.hParent=TreeView_InsertItem(hWndList,&tvis);
}
tvis.item.pszText=tszPhone;
diff --git a/plugins/Scriver/src/commonheaders.h b/plugins/Scriver/src/commonheaders.h
index bd5432906c..390ef07fd0 100644
--- a/plugins/Scriver/src/commonheaders.h
+++ b/plugins/Scriver/src/commonheaders.h
@@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_database.h>
#include <m_langpack.h>
#include <m_button.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_clui.h>
#include <m_protosvc.h>
#include <m_skin.h>
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 54ee67bdf7..c7f27360e0 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -120,7 +120,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
}
}
if (hwnd == NULL || !IsWindowVisible(GetParent(hwnd))) {
- TCHAR *contactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *contactName = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR toolTip[256];
CLISTEVENT cle = { sizeof(cle) };
@@ -208,7 +208,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
- mir_sntprintf(szTip, _countof(szTip), TranslateT("%s is typing a message"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ mir_sntprintf(szTip, _countof(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
if ( ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags2 & SMF2_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn;
tn.szProto = NULL;
@@ -282,7 +282,7 @@ static void RestoreUnreadMessageAlerts(void)
else {
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
- mir_sntprintf(toolTip, _countof(toolTip), TranslateT("Message from %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ mir_sntprintf(toolTip, _countof(toolTip), TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
}
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index 25e004f09d..3eeabe0721 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -191,12 +191,13 @@ void addMsg2Queue(pUinKey ptr, WPARAM wParam, LPSTR szMsg)
void getContactNameA(MCONTACT hContact, LPSTR szName)
{
- mir_strcpy(szName, (LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
+ ptrA dn(mir_u2a((LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0)));
+ mir_strcpy(szName, dn);
}
void getContactName(MCONTACT hContact, LPSTR szName)
{
- mir_wstrcpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_UNICODE));
+ mir_wstrcpy((LPWSTR)szName, (LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0));
}
void getContactUinA(MCONTACT hContact, LPSTR szUIN)
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp
index f6f0a3396c..3bd02356dc 100644
--- a/plugins/SecureIM/src/crypt_popups.cpp
+++ b/plugins/SecureIM/src/crypt_popups.cpp
@@ -41,7 +41,7 @@ void showPopup(LPCSTR lpzText, MCONTACT hContact, HICON hIcon, UINT type)
POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
ppd.lchIcon = hIcon;
- LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_UNICODE);
+ LPWSTR lpwzContactName = (LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0);
wcsncpy(ppd.lpwzContactName, lpwzContactName, MAX_CONTACTNAME-1);
LPWSTR lpwzText = mir_a2u(lpzText);
wcsncpy(ppd.lpwzText, TranslateW(lpwzText),MAX_SECONDLINE-1);
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index 00d11bbb73..97ce846321 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -1,5 +1,6 @@
#include "commonheaders.h"
+CLIST_INTERFACE *pcli;
int hLangpack = 0;
PLUGININFOEX pluginInfoEx = {
@@ -303,6 +304,7 @@ static int onShutdown(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int __cdecl Load(void)
{
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
DisableThreadLibraryCalls(g_hInst);
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index e5ffbfcc9e..db02da5045 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -175,7 +175,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
hContact = (MCONTACT)lparam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lparam);
mir_sntprintf(sztemp, _countof(sztemp), _T("%s: %s"),
- CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
+ pcli->pfnGetContactDisplayName(hContact, 0),
TranslateT("last seen history"));
SetWindowText(hwndDlg, sztemp);
SendMessage(hwndDlg, WM_SETICON, (WPARAM)ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index 7fee9de885..67055107bd 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "seen.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInstance;
HANDLE ehmissed = NULL, ehuserinfo = NULL, ehmissed_proto = NULL;
HANDLE g_hShutdownEvent;
@@ -85,6 +86,7 @@ static int OnShutdown(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
g_pUserInfo = WindowList_Create();
g_hShutdownEvent = CreateEvent(0, TRUE, FALSE, 0);
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp
index 3ff3d8751c..f3f18587c6 100644
--- a/plugins/SeenPlugin/src/missed.cpp
+++ b/plugins/SeenPlugin/src/missed.cpp
@@ -107,7 +107,7 @@ int ShowMissed(void)
TCHAR sztemp[1024], szcount[7];
for (int loop = 0; loop < mcs.count; loop++) {
- mir_tstrncat(sztemp, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, mcs.wpcontact[loop], GCDNF_TCHAR), _countof(sztemp) - mir_tstrlen(sztemp));
+ mir_tstrncat(sztemp, (TCHAR*)pcli->pfnGetContactDisplayName(mcs.wpcontact[loop], 0), _countof(sztemp) - mir_tstrlen(sztemp));
if (db_get_b(NULL, S_MOD, "MissedOnes_Count", 0)) {
mir_sntprintf(szcount, _countof(szcount), _T(" [%i]"), mcs.times[loop]);
mir_tstrcat(sztemp, szcount);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 65a3d1f613..306d133dac 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -253,7 +253,7 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile)
goto LBL_2DigNum;
case 'n':
- charPtr = hcontact ? (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hcontact, GCDNF_TCHAR) : (wantempty ? _T("") : _T("---"));
+ charPtr = hcontact ? (TCHAR*)pcli->pfnGetContactDisplayName(hcontact, 0) : (wantempty ? _T("") : _T("---"));
goto LBL_charPtr;
case 'N':
@@ -297,7 +297,7 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile)
case 's':
if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "StatusTriger" : courProtoName, 0)) {
- _tcsncpy(szdbsetting, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)(isetting | 0x8000), GSMDF_TCHAR), _countof(szdbsetting));
+ _tcsncpy(szdbsetting, pcli->pfnGetStatusModeDescription(isetting | 0x8000, 0), _countof(szdbsetting));
if (!(isetting & 0x8000)) {
mir_tstrncat(szdbsetting, _T("/"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
mir_tstrncat(szdbsetting, TranslateT("Idle"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
@@ -317,7 +317,7 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile)
case 'o':
if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "OldStatus" : courProtoName, 0)) {
- _tcsncpy(szdbsetting, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)isetting, GSMDF_TCHAR), _countof(szdbsetting));
+ _tcsncpy(szdbsetting, pcli->pfnGetStatusModeDescription(isetting, 0), _countof(szdbsetting));
if (includeIdle && hcontact && db_get_b(hcontact, S_MOD, "OldIdle", 0)) {
mir_tstrncat(szdbsetting, _T("/"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
mir_tstrncat(szdbsetting, TranslateT("Idle"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 3b874fd311..e997646d10 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 ///////////////////////////////////////////////////////////////////////////
+CLIST_INTERFACE *pcli;
HINSTANCE g_hSendSS;
MGLOBAL g_myGlobals;
HANDLE g_hNetlibUser=0;//!< Netlib Register User
@@ -250,6 +251,8 @@ ATOM g_clsTargetHighlighter=0;
DLL_EXPORT int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
INT_PTR result=CallService(MS_IMG_GETINTERFACE,FI_IF_VERSION,(LPARAM)&FIP);
if(FIP==NULL || result!=S_OK) {
MessageBox(NULL, TranslateT("Image services (AdvaImg) not found.\nSendSS disabled."), TranslateT("SendSS"), MB_OK | MB_ICONERROR | MB_APPLMODAL);
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 23a20bc874..03fead478e 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -170,7 +170,7 @@ void TfrmMain::wmInitdialog(WPARAM wParam, LPARAM lParam) {
/// Taskbar and Window icon
SendMessage(m_hWnd, WM_SETICON, ICON_BIG, (LPARAM)GetIcon(ICO_MAIN));
SendMessage(m_hWnd, WM_SETICON, ICON_SMALL, (LPARAM)GetIcon(ICO_MAINXS));
- TCHAR *pt = mir_tstrdup((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)m_hContact, (LPARAM)GCDNF_TCHAR));
+ TCHAR *pt = mir_tstrdup(pcli->pfnGetContactDisplayName(m_hContact, 0));
if (pt && (m_hContact != 0)) {
CMString string;
string.AppendFormat(TranslateT("Send screenshot to %s"), pt);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 6790e1d553..403ff76dd1 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "sessions.h"
+CLIST_INTERFACE *pcli;
HINSTANCE g_hInst = NULL;
HGENMENU hmSaveCurrentSession;
@@ -839,6 +840,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD, LPVOID)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
CreateServiceFunction(MS_SESSIONS_SHOWFAVORITESMENU, BuildFavMenu);
CreateServiceFunction(MS_SESSIONS_OPENMANAGER, OpenSessionsManagerWindow);
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index 7cec0108b9..0828c6928a 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -55,7 +55,7 @@ int OpLoadSessionContacts(WPARAM, LPARAM lparam)
int i;
for (i = 0; session_list_t[i] != 0; i++)
- SendDlgItemMessage(g_opHdlg, IDC_OPCLIST, LB_ADDSTRING, 0, CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)session_list_t[i], GCDNF_TCHAR));
+ SendDlgItemMessage(g_opHdlg, IDC_OPCLIST, LB_ADDSTRING, 0, (LPARAM)pcli->pfnGetContactDisplayName(session_list_t[i], 0));
return i;
}
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index c71028a40d..b4d4b09ef1 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "shlcom.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
bool bIsVistaPlus;
@@ -161,6 +162,7 @@ STDAPI DllUnregisterServer()
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
InvokeThreadServer();
HookEvent(ME_OPT_INITIALISE, OnOptionsInit);
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index 0ace778b30..a1ecc1c505 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -299,25 +299,19 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode)
dwContacts = i;
qsort(pContacts, dwContacts, sizeof(TSlotInfo), SortContact);
- DBVARIANT dbv;
- int n, rc;
// create an IPC slot for each contact and store display name, etc
for (i=0; i < dwContacts; i++) {
- char *szContact = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)pContacts[i].hContact, 0);
+ ptrA szContact(mir_t2a(pcli->pfnGetContactDisplayName(pContacts[i].hContact, 0)));
if (szContact != NULL) {
- n = 0;
- rc = 1;
- if (bGroupMode) {
- rc = db_get_s(pContacts[i].hContact, "CList", "Group", &dbv);
- if (!rc)
- n = lstrlenA(dbv.pszVal) + 1;
- }
+ ptrA szGroup;
+ if (bGroupMode)
+ szGroup = db_get_sa(pContacts[i].hContact, "CList", "Group");
+
int cch = lstrlenA(szContact) + 1;
- TSlotIPC *pct = ipcAlloc(ipch, cch + 1 + n);
- if (pct == NULL) {
- db_free(&dbv);
+ TSlotIPC *pct = ipcAlloc(ipch, cch + 1 + lstrlenA(szGroup) + 1);
+ if (pct == NULL)
break;
- }
+
// lie about the actual size of the TSlotIPC
pct->cbStrSection = cch;
LPSTR szSlot = LPSTR(pct) + sizeof(TSlotIPC);
@@ -330,10 +324,9 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode)
if (ipch->ContactsBegin == NULL)
ipch->ContactsBegin = pct;
szSlot += cch + 1;
- if (rc == 0) {
- pct->hGroup = murmur_hash(dbv.pszVal);
- lstrcpyA(szSlot, dbv.pszVal);
- db_free(&dbv);
+ if (szGroup != 0) {
+ pct->hGroup = murmur_hash(szGroup);
+ lstrcpyA(szSlot, szGroup);
}
else {
pct->hGroup = 0;
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index c4b35e8611..196fc1b722 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -16,6 +16,7 @@ Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
#include "Common.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hinstance;
HGENMENU hToggle, hEnableMenu;
@@ -261,6 +262,7 @@ IconItemT iconList[] =
extern "C" int __declspec(dllexport)Load(void)
{
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
CreateServiceFunction(protocolname"/ToggleAutoanswer",Toggle);
diff --git a/plugins/SimpleAR/src/Options.cpp b/plugins/SimpleAR/src/Options.cpp
index 011b19ee72..81e896d3d9 100644
--- a/plugins/SimpleAR/src/Options.cpp
+++ b/plugins/SimpleAR/src/Options.cpp
@@ -26,7 +26,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
for (INT c = ID_STATUS_ONLINE; c < ID_STATUS_IDLE; c++)
{
mir_snprintf(tszStatus, _countof(tszStatus), "%d", c);
- pszStatus=(TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM)c,GSMDF_TCHAR);
+ pszStatus = pcli->pfnGetStatusModeDescription(c, 0);
if (c == ID_STATUS_ONLINE || c == ID_STATUS_FREECHAT || c == ID_STATUS_INVISIBLE)
continue;
else
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 0b1a123f28..b3c12e4415 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -105,7 +105,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
{
TCHAR str[256], format[128];
- TCHAR *contactName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)dat->hContact, GCDNF_TCHAR);
+ TCHAR *contactName = (TCHAR *)pcli->pfnGetContactDisplayName(dat->hContact, 0);
char *szProto = GetContactProto(dat->hContact);
WORD dwStatus = db_get_w(dat->hContact, szProto, "Status", ID_STATUS_OFFLINE);
TCHAR *status = pcli->pfnGetStatusModeDescription(dwStatus, 0);
@@ -233,7 +233,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL;
WindowList_Add(hWindowList2, hwndDlg, dat->hContact);
- contactName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)dat->hContact, GCDNF_TCHAR);
+ contactName = (TCHAR *)pcli->pfnGetContactDisplayName(dat->hContact, 0);
GetWindowText(hwndDlg, format, _countof(format));
mir_sntprintf(str, _countof(str), format, contactName);
SetWindowText(hwndDlg, str);
diff --git a/plugins/SimpleStatusMsg/src/commonheaders.h b/plugins/SimpleStatusMsg/src/commonheaders.h
index be3c7fc63a..43f26c7e74 100644
--- a/plugins/SimpleStatusMsg/src/commonheaders.h
+++ b/plugins/SimpleStatusMsg/src/commonheaders.h
@@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <newpluginapi.h>
#include <m_database.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_skin.h>
#include <m_options.h>
#include <m_langpack.h>
diff --git a/plugins/Spamotron/src/common.h b/plugins/Spamotron/src/common.h
index ad4169fc21..acdc965c80 100644
--- a/plugins/Spamotron/src/common.h
+++ b/plugins/Spamotron/src/common.h
@@ -116,13 +116,6 @@ int LogToSystemHistory(char *message, char *origmessage);
#define POPUP_APPROVED 2
#define POPUP_CHALLENGE 3
-#ifdef _UNICODE
-#define CONTACT_NAME(a) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)a, GCDNF_NOMYHANDLE | GCDNF_UNICODE | GCDNF_NOCACHE)
-#else
-#define CONTACT_NAME(a) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)a, GCDNF_NOMYHANDLE | GCDNF_NOCACHE)
-#endif
-
-
/* bayes.c */
#include "sqlite3\sqlite3.h"
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index 4101d8db4c..c0d76a9a9f 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -1,5 +1,6 @@
#include "common.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
HANDLE hOptInitialize, hModulesLoaded, hDBContactAdded, hDBEventAdded, hDBEventFilterAdd;
time_t last_queue_check = 0;
@@ -19,8 +20,6 @@ PLUGININFOEX pluginInfo = {
{0x14331048, 0x5a73, 0x4fdb, {0xb9, 0x09, 0x2d, 0x7e, 0x18, 0x25, 0xa0, 0x12}}
};
-
-
extern int OnOptInitialize(WPARAM wParam, LPARAM lParam);
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
@@ -36,18 +35,6 @@ int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-int OnDBContactAdded(WPARAM, LPARAM)
-{
- //MessageBox(NULL, _T("OnDBContactAdded"), _T("Event"), MB_OK);
- return 0;
-}
-
-int OnDBEventAdded(WPARAM wParam, LPARAM lParam)
-{
-
- return 0;
-}
-
int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = wParam;
@@ -523,6 +510,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
srand((unsigned)time(0));
bayesdb = NULL;
if (_getOptB("BayesEnabled", defaultBayesEnabled)) {
@@ -536,8 +525,6 @@ extern "C" __declspec(dllexport) int Load()
}
hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- hDBContactAdded = HookEvent(ME_DB_CONTACT_ADDED, OnDBContactAdded);
- hDBEventAdded = HookEvent(ME_DB_EVENT_ADDED, OnDBEventAdded);
hDBEventFilterAdd = HookEvent(ME_DB_EVENT_FILTER_ADD, OnDBEventFilterAdd);
return 0;
}
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp
index 74e3f96bd5..98e1fa2901 100644
--- a/plugins/Spamotron/src/utils.cpp
+++ b/plugins/Spamotron/src/utils.cpp
@@ -428,7 +428,7 @@ int _notify(MCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage)
{
char *tmp, *tmporig;
TCHAR msg[MAX_BUFFER_LENGTH];
- mir_sntprintf(msg, _countof(msg), message, CONTACT_NAME(hContact));
+ mir_sntprintf(msg, _countof(msg), message, pcli->pfnGetContactDisplayName(hContact, 0));
if (_getOptB("LogActions", defaultLogActions)) {
tmp = mir_u2a(msg);
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h
index c60109a533..c9afe39df8 100644
--- a/plugins/SplashScreen/src/debug.h
+++ b/plugins/SplashScreen/src/debug.h
@@ -24,7 +24,7 @@ int inline _DebugPopup(MCONTACT hContact, TCHAR *fmt, ...)
ppd.lchContact = hContact;
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
if(hContact != 0)
- mir_tstrncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ mir_tstrncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
else
mir_tstrncpy(ppd.lptzContactName, _T(PlugName), MAX_CONTACTNAME);
mir_tstrncpy(ppd.lptzText, debug, MAX_SECONDLINE - 20);
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index 1633baeccc..26e362ab92 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -19,8 +19,8 @@
#include "headers.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst = 0;
-
int hLangpack;
static HMODULE hAdvaimg = NULL;
@@ -275,6 +275,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
index 2be09d66f3..548d07cb7b 100644
--- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
@@ -933,7 +933,7 @@ static int ProcessPopup(int reason, LPARAM lParam)
for (int i = 0; i < connectionSettings.getCount(); i++) {
if (mir_tstrlen(ps[i]->tszAccName) > 0 && mir_strlen(ps[i]->szName) > 0) {
if (db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) {
- mir_sntprintf(protoInfoLine, _countof(protoInfoLine), TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, GSMDF_TCHAR));
+ mir_sntprintf(protoInfoLine, _countof(protoInfoLine), TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, 0));
mir_tstrncat(protoInfo, protoInfoLine, _countof(protoInfo) - mir_tstrlen(protoInfo) - 1);
}
}
diff --git a/plugins/StatusPlugins/commonstatus.h b/plugins/StatusPlugins/commonstatus.h
index 7904b56774..e43c7b5e25 100644
--- a/plugins/StatusPlugins/commonstatus.h
+++ b/plugins/StatusPlugins/commonstatus.h
@@ -37,7 +37,6 @@
#include <m_database.h>
#include <m_protosvc.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_string.h>
#include <m_langpack.h>
#include <m_popup.h>
diff --git a/plugins/StopSpamMod/src/headers.h b/plugins/StopSpamMod/src/headers.h
index 6366907403..29b48d043d 100755
--- a/plugins/StopSpamMod/src/headers.h
+++ b/plugins/StopSpamMod/src/headers.h
@@ -1,8 +1,8 @@
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
-
-using namespace std;
+
+using namespace std;
#include <fstream>
#include <string>
@@ -12,7 +12,7 @@ using namespace std;
#include <m_protosvc.h>
#include <m_options.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_skin.h>
#include <m_contacts.h>
#include <m_system_cpp.h>
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index 5ec631990f..804854bce6 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -264,7 +264,7 @@ void LogSpamToFile(MCONTACT hContact, tstring message)
// Name, UID and Protocol Log line
LogProtocol=DBGetContactSettingStringPAN(hContact,"Protocol","p",_T(""));
- LogContactName=(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ LogContactName=(TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
LogContactId=(LogProtocol==_T(""))?_T(""):GetContactUid(hContact,LogProtocol);
// Name, UID and Protocol Log line
@@ -380,7 +380,7 @@ void HistoryLogFunc(MCONTACT hContact, std::string message)
std::string msg = message;
msg.append("\n");
msg.append("Protocol: ").append(GetContactProto(hContact)).append(" Contact: ");
- msg.append(toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR))).append(" ID: ");
+ msg.append(toUTF8((TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0))).append(" ID: ");
msg.append(toUTF8(GetContactUid(hContact,toUTF16(GetContactProto(hContact)))));
HistoryLog(NULL, (char*)msg.c_str(), EVENTTYPE_MESSAGE, DBEF_READ);
}
diff --git a/plugins/TabSRMM/src/commonheaders.h b/plugins/TabSRMM/src/commonheaders.h
index 2aa8eb0347..dd1417ab60 100644
--- a/plugins/TabSRMM/src/commonheaders.h
+++ b/plugins/TabSRMM/src/commonheaders.h
@@ -61,7 +61,7 @@
#include <m_icolib.h>
#include <m_clc.h>
#include <m_clui.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_userinfo.h>
#include <m_history.h>
#include <m_addcontact.h>
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 24337f7518..e862ecac62 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -1661,7 +1661,7 @@ INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam,
SetWindowText(hwndDlg, TranslateT("Choose status modes"));
{
for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- SetDlgItemText(hwndDlg, i, pcli->pfnGetStatusModeDescription(i, GSMDF_TCHAR));
+ SetDlgItemText(hwndDlg, i, pcli->pfnGetStatusModeDescription(i, 0));
if (dwStatusMask != -1 && (dwStatusMask & (1 << (i - ID_STATUS_ONLINE))))
CheckDlgButton(hwndDlg, i, BST_CHECKED);
Utils::enableDlgControl(hwndDlg, i, dwStatusMask != -1);
diff --git a/plugins/TipperYM/src/common.h b/plugins/TipperYM/src/common.h
index 75ad8e55d1..f63d290ee7 100644
--- a/plugins/TipperYM/src/common.h
+++ b/plugins/TipperYM/src/common.h
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA.
#include <newpluginapi.h>
#include <m_avatars.h>
#include <m_awaymsg.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_clc.h>
#include <m_clui.h>
#include <m_cluiframes.h>
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 1f63f93768..6032b3e7c2 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -1626,7 +1626,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
bTitlePainted = true;
}
- TCHAR *swzNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *swzNick = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
if (opt.iFavoriteContFlags & FAVCONT_APPEND_PROTO) {
TCHAR *swzProto = a2t(proto);
mir_sntprintf(swzName, _countof(swzName), _T("%s (%s)"), swzNick, swzProto);
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 0d97d50af1..65c642dd64 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -305,7 +305,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
if (!hSubContact)
return false;
- TCHAR *swzNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hSubContact, GCDNF_TCHAR);
+ TCHAR *swzNick = (TCHAR *)pcli->pfnGetContactDisplayName(hSubContact, 0);
if (swzNick) _tcsncpy(buff, swzNick, bufflen);
return true;
}
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 649d9c07ef..08a8e0864f 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -861,37 +861,30 @@ BOOL CTooltipNotify::ContactsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
}
-
-
TCHAR *CTooltipNotify::StatusToString(int iStatus, TCHAR *szStatus, int iBufSize)
{
- if((iStatus>=ID_STATUS_OFFLINE) && (iStatus<=ID_STATUS_OUTTOLUNCH))
- {
- mir_tstrncpy(szStatus, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,iStatus,GSMDF_TCHAR), iBufSize);
- }
- else
- {
- switch(iStatus)
- {
- case ID_TTNTF_STATUS_TYPING:
- mir_tstrncpy(szStatus, TranslateT("Typing"), iBufSize);
- break;
+ if (iStatus >= ID_STATUS_OFFLINE && iStatus <= ID_STATUS_OUTTOLUNCH)
+ mir_tstrncpy(szStatus, pcli->pfnGetStatusModeDescription(iStatus, 0), iBufSize);
+ else {
+ switch(iStatus) {
+ case ID_TTNTF_STATUS_TYPING:
+ mir_tstrncpy(szStatus, TranslateT("Typing"), iBufSize);
+ break;
- case ID_TTNTF_STATUS_IDLE:
- mir_tstrncpy(szStatus, TranslateT("Idle"), iBufSize);
- break;
+ case ID_TTNTF_STATUS_IDLE:
+ mir_tstrncpy(szStatus, TranslateT("Idle"), iBufSize);
+ break;
- case ID_TTNTF_STATUS_NOT_IDLE:
- mir_tstrncpy(szStatus, TranslateT("Not Idle"), iBufSize);
- break;
+ case ID_TTNTF_STATUS_NOT_IDLE:
+ mir_tstrncpy(szStatus, TranslateT("Not Idle"), iBufSize);
+ break;
- default:
- mir_tstrncpy(szStatus, TranslateT("Unknown"), iBufSize);
- break;
+ default:
+ mir_tstrncpy(szStatus, TranslateT("Unknown"), iBufSize);
+ break;
}
}
return szStatus;
-
}
TCHAR *CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR *szString, int iBufSize)
@@ -906,7 +899,7 @@ TCHAR *CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR *
const char* szProto =
hContact==0 ? "Proto" : (char*)::GetContactProto(hContact);
const TCHAR* szContactName =
- (TCHAR *)::CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ (TCHAR *)::pcli->pfnGetContactDisplayName(hContact, 0);
memset(szString, 0, iBufSize*sizeof(TCHAR));
diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp
index d53c350fea..24c2e25929 100644
--- a/plugins/TooltipNotify/src/main.cpp
+++ b/plugins/TooltipNotify/src/main.cpp
@@ -21,7 +21,7 @@ HINSTANCE g_hInstDLL = 0;
// Main global object
static CTooltipNotify *g_pTooltipNotify = 0;
int hLangpack;
-
+CLIST_INTERFACE *pcli;
//================================================================================
// plugin init/deinit routines
@@ -56,6 +56,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&sPluginInfo);
+ mir_getCLI();
g_pTooltipNotify = new CTooltipNotify();
assert(g_pTooltipNotify!=0);
diff --git a/plugins/TopToolBar/src/common.h b/plugins/TopToolBar/src/common.h
index a7a9322a7d..a5f5666b77 100644
--- a/plugins/TopToolBar/src/common.h
+++ b/plugins/TopToolBar/src/common.h
@@ -16,7 +16,6 @@
#include <m_clui.h>
#include <m_cluiframes.h>
#include <m_clc.h>
-#include <m_clistint.h>
#include <m_findadd.h>
#include <m_langpack.h>
#include <m_options.h>
diff --git a/plugins/UserInfoEx/src/commonheaders.h b/plugins/UserInfoEx/src/commonheaders.h
index d8df6855c7..2fbfbafe67 100644
--- a/plugins/UserInfoEx/src/commonheaders.h
+++ b/plugins/UserInfoEx/src/commonheaders.h
@@ -52,7 +52,7 @@ using namespace std;
#include <newpluginapi.h>
#include <m_button.h>
#include <m_clui.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_database.h>
#include <m_hotkeys.h>
#include <m_langpack.h>
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
index c5ac1b20a8..e1c707d590 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
@@ -52,7 +52,7 @@ static void DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WO
return;
}
else {
- disp = (LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ExImContact->hContact, NULL);
+ disp = (LPCSTR)pcli->pfnGetContactDisplayName(ExImContact->hContact, NULL);
}
break;
case EXIM_SUBGROUP:
diff --git a/plugins/Utils.pas/mircontacts.pas b/plugins/Utils.pas/mircontacts.pas
index 5eca8bb927..dc43b8d84e 100644
--- a/plugins/Utils.pas/mircontacts.pas
+++ b/plugins/Utils.pas/mircontacts.pas
@@ -570,8 +570,7 @@ begin
begin
StrCopyW(buf,format);
if lName then
- StrReplaceW(buf,'%name%',
- PWideChar(CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_UNICODE)));
+ StrReplaceW(buf,'%name%', cli^.pfnGetContactDisplayName(hContact,0));
if lGroup then
begin
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index 1bd05d180d..f295c0cea0 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -132,7 +132,7 @@ TCHAR* getContactInfoT(BYTE type, MCONTACT hContact)
}
case CCNF_STATUS:
- return mir_tstrdup((TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), GSMDF_UNICODE));
+ return mir_tstrdup(pcli->pfnGetStatusModeDescription(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0));
case CCNF_INTERNALIP:
case CCNF_EXTERNALIP:
diff --git a/plugins/Variables/src/main.cpp b/plugins/Variables/src/main.cpp
index 2480565a8c..449dc65cde 100644
--- a/plugins/Variables/src/main.cpp
+++ b/plugins/Variables/src/main.cpp
@@ -18,8 +18,8 @@
*/
#include "variables.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
-
int hLangpack = 0;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
@@ -31,7 +31,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaPluginInfoEx - returns the extended information about a plugin
-PLUGININFOEX pluginInfoEx = {
+PLUGININFOEX pluginInfoEx =
+{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -55,7 +56,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP( &pluginInfoEx );
+ mir_getLP(&pluginInfoEx);
+ mir_getCLI();
LoadVarModule();
return 0;
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index d66ed6d3c1..8f76d91169 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -25,7 +25,7 @@ static TCHAR* parseCodeToStatus(ARGUMENTSINFO *ai)
return NULL;
unsigned int status = ttoi(ai->targv[1]);
- TCHAR *szStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, GSMDF_TCHAR);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
if (szStatus != NULL)
return mir_tstrdup(szStatus);
@@ -376,7 +376,7 @@ static TCHAR* parseLastSeenStatus(ARGUMENTSINFO *ai)
if (status == 0)
return NULL;
- TCHAR *szStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, GSMDF_TCHAR);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
if (szStatus != NULL)
return mir_tstrdup(szStatus);
@@ -407,7 +407,7 @@ static TCHAR* parseMyStatus(ARGUMENTSINFO *ai)
else
status = CallProtoService(_T2A(ai->targv[1]), PS_GETSTATUS, 0, 0);
- TCHAR *szStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, GSMDF_TCHAR);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
return (szStatus != NULL) ? mir_tstrdup(szStatus) : NULL;
}
@@ -700,7 +700,7 @@ static TCHAR *parseContactNameString(ARGUMENTSINFO *ai)
return NULL;
ai->flags |= AIF_DONTPARSE;
- TCHAR *ret = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ai->fi->hContact, GCDNF_TCHAR);
+ TCHAR *ret = (TCHAR*)pcli->pfnGetContactDisplayName(ai->fi->hContact, 0);
return (ret == NULL) ? NULL : mir_tstrdup(ret);
}
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas
index c3d993f0ce..0919cb7967 100644
--- a/plugins/Watrack/proto/proto.pas
+++ b/plugins/Watrack/proto/proto.pas
@@ -238,7 +238,7 @@ begin
// Action
StrCopyW(buf,TranslateW('Music Info from '));
- StrCatW (buf,PWideChar(CallService(MS_CLIST_GETCONTACTDISPLAYNAME,ccs^.hContact,GCDNF_UNICODE)));
+ StrCatW(buf,cli^.pfnGetContactDisplayName(ccs^.hContact,0));
MessageBoxW(0,TranslateW(pos_template),buf,MB_ICONINFORMATION);
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index 3fa95e3616..fd251c49cb 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -206,7 +206,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
HFONT hfntold = ( HFONT )SelectObject(hdc, hfnt);
SIZE fontSize;
- TCHAR *nick = ( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)data->hContact, GCDNF_TCHAR);
+ TCHAR *nick = ( TCHAR* )pcli->pfnGetContactDisplayName(data->hContact, 0);
GetTextExtentPoint32(hdc, _T("|"), 1, &fontSize);
diff --git a/plugins/WebView/src/stdafx.h b/plugins/WebView/src/stdafx.h
index fbd7b84666..670c13046a 100644
--- a/plugins/WebView/src/stdafx.h
+++ b/plugins/WebView/src/stdafx.h
@@ -18,7 +18,7 @@
#include <newpluginapi.h>
#include <m_system.h>
#include <m_clist.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_clui.h>
#include <m_database.h>
#include <m_protocols.h>
diff --git a/plugins/WhenWasIt/src/commonheaders.h b/plugins/WhenWasIt/src/commonheaders.h
index 1bf7b34c5a..39d5161d8c 100644
--- a/plugins/WhenWasIt/src/commonheaders.h
+++ b/plugins/WhenWasIt/src/commonheaders.h
@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_skin.h>
#include <m_options.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_contacts.h>
#include <m_popup.h>
#include <m_fontservice.h>
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 <m_options.h>
#include <m_protocols.h>
#include <m_protosvc.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_skin.h>
#include <m_icolib.h>
#include <m_netlib.h>
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<WCHAR *>(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<WCHAR *>(CallService(MS_CLIST_GETCONTACTDISPLAYNAME, reinterpret_cast<unsigned int>(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)
{
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp
index 68a86ced56..f893d65aab 100644
--- a/plugins/XSoundNotify/src/dialog.cpp
+++ b/plugins/XSoundNotify/src/dialog.cpp
@@ -40,7 +40,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
break;
}
- TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *nick = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR value[100];
mir_sntprintf(value, _countof(value), TranslateT("Custom sound for %s (%s)"), nick, uid);
SetWindowText(hwndDlg, value);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index 8f70bf6c77..3e528ba273 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -77,7 +77,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
mir_tstrcpy(uid, TranslateT("(Unknown contact)"));
}
- TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR *nick = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
size_t value_max_len = (mir_tstrlen(uid) + mir_tstrlen(nick) + 4);
TCHAR *value = (TCHAR *)mir_alloc(sizeof(TCHAR) * value_max_len);
mir_sntprintf(value, value_max_len, _T("%s (%s)"), nick, uid);
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index 8d9a9f078c..dc23fae00a 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -16,6 +16,7 @@ HGENMENU hChangeSound = NULL;
MWindowList hChangeSoundDlgList = NULL;
BYTE isIgnoreSound = 0, isOwnSound = 0;
+CLIST_INTERFACE *pcli;
CHAT_MANAGER *pci;
PLUGININFOEX pluginInfo = {
@@ -77,7 +78,7 @@ void InitSelfSounds()
TCHAR infobuf[256];
mir_sntprintf(infobuf, _countof(infobuf), _T("%s [%s]"), TranslateT("Self status"), protos[i]->tszAccountName);
- SkinAddNewSoundExT(namebuf, infobuf, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, selfSounds[j].iStatus, GSMDF_TCHAR));
+ SkinAddNewSoundExT(namebuf, infobuf, pcli->pfnGetStatusModeDescription(selfSounds[j].iStatus, 0));
}
}
}
@@ -208,6 +209,7 @@ static int OnPreShutdown(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
CreateServiceFunction("XSoundNotify/ContactMenuCommand", ShowDialog);
diff --git a/plugins/YAPP/src/common.h b/plugins/YAPP/src/common.h
index 08b5ba124b..f1305489f0 100644
--- a/plugins/YAPP/src/common.h
+++ b/plugins/YAPP/src/common.h
@@ -22,7 +22,6 @@
#include <m_skin.h>
#include <m_clui.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_fontservice.h>
#include <m_avatars.h>
#include <m_popup.h>
diff --git a/plugins/YAPP/src/options.cpp b/plugins/YAPP/src/options.cpp
index 2f9021ca60..6ebd9ce7f7 100644
--- a/plugins/YAPP/src/options.cpp
+++ b/plugins/YAPP/src/options.cpp
@@ -180,7 +180,7 @@ static INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
int i = 0;
for (; i < 10; i++) {
- lvI.pszText = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, ID_STATUS_OFFLINE + i, GSMDF_TCHAR);
+ lvI.pszText = pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + i, 0);
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
ListView_SetCheckState(hwndList, i, options.disable_status[i]);
diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h
index c2f40604ce..030d64a3eb 100644
--- a/plugins/YARelay/src/stdafx.h
+++ b/plugins/YARelay/src/stdafx.h
@@ -24,7 +24,7 @@ Features:
#include <malloc.h>
#include <newpluginapi.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_contacts.h>
diff --git a/plugins/YahooGroups/src/YahooGroups.cpp b/plugins/YahooGroups/src/YahooGroups.cpp
index 00177c628a..4cec4c963d 100644
--- a/plugins/YahooGroups/src/YahooGroups.cpp
+++ b/plugins/YahooGroups/src/YahooGroups.cpp
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
+CLIST_INTERFACE *pcli;
char ModuleName[] = "YahooGroups";
HINSTANCE hInstance;
@@ -48,6 +49,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
LogInit();
currentCodePage = Langpack_GetDefaultCodePage();
@@ -64,7 +67,6 @@ extern "C" int __declspec(dllexport) Unload()
DestroyServices();
UnhookEvents();
-
return 0;
}
@@ -72,9 +74,7 @@ bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
hInstance = hinstDLL;
if (fdwReason == DLL_PROCESS_ATTACH)
- {
- DisableThreadLibraryCalls(hinstDLL);
- }
+ DisableThreadLibraryCalls(hinstDLL);
return TRUE;
}
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp
index f4dd3fd7c1..a22c01baf3 100644
--- a/plugins/YahooGroups/src/utils.cpp
+++ b/plugins/YahooGroups/src/utils.cpp
@@ -326,7 +326,7 @@ MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
GetContactProtocol(hContact, cProtocol, sizeof(cProtocol));
szHandle = GetContactID(hContact, cProtocol);
- tmp = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ tmp = pcli->pfnGetContactDisplayName(hContact, 0);
_tcsncpy(dispName, tmp, _countof(dispName));
if ((szHandle) && ((mir_tstrcmpi(szHandle, szID) == 0) || (mir_tstrcmpi(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0)))
diff --git a/plugins/ZeroSwitch/src/stdafx.h b/plugins/ZeroSwitch/src/stdafx.h
index 8f36ebb340..2531d2596b 100644
--- a/plugins/ZeroSwitch/src/stdafx.h
+++ b/plugins/ZeroSwitch/src/stdafx.h
@@ -11,7 +11,6 @@
#include <newpluginapi.h>
#include <m_clist.h>
#include <m_clui.h>
-#include <m_clistint.h>
#include <m_skin.h>
#include <m_langpack.h>
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp
index 4a622a4559..f296d74ac7 100644
--- a/plugins/wbOSD/src/events.cpp
+++ b/plugins/wbOSD/src/events.cpp
@@ -63,7 +63,7 @@ int ProtoAck(WPARAM,LPARAM lparam)
DWORD ann = db_get_dw( NULL, THIS_MODULE, "announce", DEFAULT_ANNOUNCE );
if ( ann & ( 1 << ( ack->lParam - ID_STATUS_OFFLINE ))) {
TCHAR buffer[512];
- mir_sntprintf(buffer, _countof(buffer), TranslateT("%s is %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ack->hContact, GCDNF_TCHAR), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM) ack->lParam,GSMDF_TCHAR));
+ mir_sntprintf(buffer, _countof(buffer), TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(ack->hContact, 0), pcli->pfnGetStatusModeDescription(ack->lParam, 0));
ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), ack->hContact);
} } }
@@ -122,7 +122,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam)
return 0;
TCHAR bufferW[512];
- mir_sntprintf(bufferW, _countof(bufferW), TranslateT("%s is %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,newStatus,GSMDF_TCHAR));
+ mir_sntprintf(bufferW, _countof(bufferW), TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(wParam, 0), pcli->pfnGetStatusModeDescription(newStatus, 0));
ShowOSD(bufferW, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), hContact);
return 0;
}
@@ -184,12 +184,12 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
TCHAR *c1 = 0, *c2 = 0;
if ( i1 == 1 )
- c1 = mir_tstrdup(( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR));
+ c1 = mir_tstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
else if ( i1 == 2 )
c1 = DbGetEventTextT( &dbe, 0 );
if ( i2 == 1 )
- c2 = mir_tstrdup(( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR));
+ c2 = mir_tstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
else if ( i2 == 2 )
c2 = DbGetEventTextT( &dbe, 0 );
diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp
index ee7e35b252..8c2658fbbf 100644
--- a/plugins/wbOSD/src/main.cpp
+++ b/plugins/wbOSD/src/main.cpp
@@ -14,6 +14,7 @@ HINSTANCE hI;
HWND hwnd=0;
HANDLE hservosda;
int hLangpack = 0;
+CLIST_INTERFACE *pcli;
HANDLE hHookedNewEvent, hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged, hpluginShutDown;
void logmsg2(char *str);
@@ -45,6 +46,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
logmsg("Load");
hHookedInit = HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp
index 56a7791b45..b007e46f2f 100644
--- a/plugins/wbOSD/src/options.cpp
+++ b/plugins/wbOSD/src/options.cpp
@@ -23,7 +23,7 @@ void FillCheckBoxTree(HWND hwndTree,DWORD style)
tvis.item.mask = TVIF_PARAM|TVIF_TEXT|TVIF_STATE;
for ( WORD status = ID_STATUS_OFFLINE; status <=ID_STATUS_OUTTOLUNCH; status++ ) {
tvis.item.lParam = status - ID_STATUS_OFFLINE;
- tvis.item.pszText = (TCHAR*) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM) status,GSMDF_TCHAR);
+ tvis.item.pszText = pcli->pfnGetStatusModeDescription(status, 0);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK(( style & ( 1 << tvis.item.lParam )) != 0 ? 2 : 1 );
TreeView_InsertItem( hwndTree, &tvis );
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp
index 6650975186..2355754267 100644
--- a/protocols/AimOscar/src/aim.cpp
+++ b/protocols/AimOscar/src/aim.cpp
@@ -22,6 +22,7 @@ char AIM_CAP_MIRANDA[16] = "MirandaA";
int hLangpack;
+CLIST_INTERFACE *pcli;
HINSTANCE hInstance;
/////////////////////////////////////////////////////////////////////////////
@@ -100,6 +101,7 @@ static int protoUninit(PROTO_INTERFACE* ppro)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp
index 09ab42eecc..9d43570ab6 100644
--- a/protocols/AimOscar/src/chat.cpp
+++ b/protocols/AimOscar/src/chat.cpp
@@ -69,8 +69,8 @@ void CAimProto::chat_event(const char* id, const char* sn, int evt, const TCHAR*
TCHAR* snt = mir_a2t(sn);
MCONTACT hContact = contact_from_sn(sn);
- TCHAR* nick = hContact ? (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,
- WPARAM(hContact), GCDNF_TCHAR) : snt;
+ TCHAR* nick = hContact ? (TCHAR*)pcli->pfnGetContactDisplayName(
+ WPARAM(hContact), 0) : snt;
GCDEST gcd = { m_szModuleName, idt, evt };
GCEVENT gce = { sizeof(gce), &gcd };
diff --git a/protocols/AimOscar/src/stdafx.h b/protocols/AimOscar/src/stdafx.h
index f9d92fbd30..dfb105bd1c 100644
--- a/protocols/AimOscar/src/stdafx.h
+++ b/protocols/AimOscar/src/stdafx.h
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_avatars.h>
#include <m_button.h>
#include <m_chat.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_database.h>
#include <m_history.h>
#include <m_idle.h>
diff --git a/protocols/Dummy/src/stdafx.h b/protocols/Dummy/src/stdafx.h
index 7416c2aeef..305d636215 100644
--- a/protocols/Dummy/src/stdafx.h
+++ b/protocols/Dummy/src/stdafx.h
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_avatars.h>
#include <m_chat.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_database.h>
#include <m_extraicons.h>
#include <m_file.h>
diff --git a/protocols/FacebookRM/src/stdafx.h b/protocols/FacebookRM/src/stdafx.h
index bcbf0f6298..c76ce9bba2 100644
--- a/protocols/FacebookRM/src/stdafx.h
+++ b/protocols/FacebookRM/src/stdafx.h
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <newpluginapi.h>
#include <m_avatars.h>
#include <m_chat.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_database.h>
#include <m_idle.h>
#include <m_ignore.h>
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index efe7df5d0a..f5558e99ad 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -834,7 +834,7 @@ retry:
gce.ptszUID = id;
TCHAR* messageT = mir_utf8decodeT(e->event.msg.message);
gce.ptszText = messageT;
- gce.ptszNick = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) getcontact(e->event.msg.sender, 1, 0, NULL), GCDNF_TCHAR);
+ gce.ptszNick = (TCHAR*) pcli->pfnGetContactDisplayName( getcontact(e->event.msg.sender, 1, 0, NULL), 0);
gce.time = (!(e->event.msg.msgclass & GG_CLASS_OFFLINE) || e->event.msg.time > (t - timeDeviation)) ? t : e->event.msg.time;
gce.dwFlags = GCEF_ADDTOLOG;
debugLog(_T("mainthread() (%x): Conference message to room %s & id %s."), this, chat, id);
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h
index 308946b7c1..b0c567ada9 100644
--- a/protocols/Gadu-Gadu/src/gg.h
+++ b/protocols/Gadu-Gadu/src/gg.h
@@ -57,7 +57,6 @@
#include <m_utils.h>
#include <m_ignore.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_options.h>
#include <m_userinfo.h>
#include <m_clui.h>
diff --git a/protocols/IcqOscarJ/src/stdafx.h b/protocols/IcqOscarJ/src/stdafx.h
index b28a33ae00..f6cfeaec68 100644
--- a/protocols/IcqOscarJ/src/stdafx.h
+++ b/protocols/IcqOscarJ/src/stdafx.h
@@ -72,7 +72,6 @@
#include <m_idle.h>
#include <m_skin.h>
#include <m_popup.h>
-#include <m_clistint.h>
#include <m_cluiframes.h>
#include <m_ignore.h>
#include <m_icolib.h>
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp
index 3ea12a967b..108c482721 100644
--- a/protocols/IcqOscarJ/src/stdpackets.cpp
+++ b/protocols/IcqOscarJ/src/stdpackets.cpp
@@ -1346,7 +1346,7 @@ DWORD CIcqProto::icq_sendSMSServ(const char *szPhoneNumber, const char *szMsg)
strftime(szTime, sizeof(szTime), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now));
/* Sun, 00 Jan 0000 00:00:00 GMT */
- char *szMyNick = null_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)(HANDLE)NULL, 0));
+ char *szMyNick = null_strdup(_T2A(pcli->pfnGetContactDisplayName(NULL, 0)));
size_t nBufferSize = 1 + mir_strlen(szMyNick) + mir_strlen(szPhoneNumber) + mir_strlen(szMsg) + sizeof("<icq_sms_message><destination></destination><text></text><codepage>1252</codepage><encoding>utf8</encoding><senders_UIN>0000000000</senders_UIN><senders_name></senders_name><delivery_receipt>Yes</delivery_receipt><time>Sun, 00 Jan 0000 00:00:00 GMT</time></icq_sms_message>");
if (szBuffer = (char *)_alloca(nBufferSize)) {
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index 9071a5a8bd..3fa2e718c1 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -561,7 +561,7 @@ char* NickFromHandle(MCONTACT hContact)
if (hContact == INVALID_CONTACT_ID)
return null_strdup(Translate("<invalid>"));
- return null_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
+ return null_strdup((char *)pcli->pfnGetContactDisplayName(hContact, 0));
}
char* NickFromHandleUtf(MCONTACT hContact)
@@ -569,7 +569,7 @@ char* NickFromHandleUtf(MCONTACT hContact)
if (hContact == INVALID_CONTACT_ID)
return ICQTranslateUtf(LPGEN("<invalid>"));
- return tchar_to_utf8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ return tchar_to_utf8((TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0));
}
char* strUID(DWORD dwUIN, char *pszUID)
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h
index d92cad8c6c..02eb632d1d 100644
--- a/protocols/JabberG/src/stdafx.h
+++ b/protocols/JabberG/src/stdafx.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_button.h>
#include <m_chat.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_cluiframes.h>
#include <m_contacts.h>
#include <m_database.h>
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp
index 758669b69b..2d63e092ce 100644
--- a/protocols/MRA/src/MraChat.cpp
+++ b/protocols/MRA/src/MraChat.cpp
@@ -37,7 +37,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact)
GCSESSION gcw = { sizeof(gcw) };
gcw.iType = GCW_CHATROOM;
gcw.pszModule = m_szModuleName;
- gcw.ptszName = GetContactNameW(hContact);
+ gcw.ptszName = pcli->pfnGetContactDisplayName(hContact, 0);
gcw.ptszID = wszEMail;
gcw.ptszStatusbarText = _T("status bar");
gcw.dwItemData = (DWORD)hContact;
@@ -114,7 +114,7 @@ INT_PTR CMraProto::MraChatSessionEventSendByHandle(MCONTACT hContactChatSession,
MCONTACT hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, NULL);
wszUID = lpszUID;
if (hContactSender)
- gce.ptszNick = GetContactNameW(hContactSender);
+ gce.ptszNick = pcli->pfnGetContactDisplayName(hContactSender, 0);
else
gce.ptszNick = wszUID;
}
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index 94a41372e4..ffc0918b64 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -357,7 +357,7 @@ int CMraProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hCo
for (int i = 0; i < nContacts; i++) {
if (IsContactMra(hContactsList[i]))
if (mraGetStringW(hContactsList[i], "e-mail", wszEmail))
- wszData += wszEmail + ';' + GetContactNameW(hContactsList[i]) + ';';
+ wszData += wszEmail + ';' + pcli->pfnGetContactDisplayName(hContactsList[i], 0) + ';';
}
bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
diff --git a/protocols/MRA/src/MraSelectEMail.cpp b/protocols/MRA/src/MraSelectEMail.cpp
index f956bddbec..f43beb4a9d 100644
--- a/protocols/MRA/src/MraSelectEMail.cpp
+++ b/protocols/MRA/src/MraSelectEMail.cpp
@@ -103,7 +103,7 @@ INT_PTR CALLBACK MraSelectEMailDlgProc(HWND hWndDlg, UINT message, WPARAM wParam
case MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD:
{
CMStringA szUrl;
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", GetContactNameA(dat->hContact), szEmail);
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", pcli->pfnGetContactDisplayName(dat->hContact, 0), szEmail);
dat->ppro->MraMPopSessionQueueAddUrl(dat->ppro->hMPopSessionQueue, szUrl);
}
break;
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index 2ee94802f0..ef7ded50ad 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -1114,7 +1114,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w
// reply to some user blog
if (dat->hContact) {
- szBuff.Format(TranslateT("Reply to %s blog status"), GetContactNameW(dat->hContact));
+ szBuff.Format(TranslateT("Reply to %s blog status"), pcli->pfnGetContactDisplayName(dat->hContact, 0));
SetWindowText(hWndDlg, szBuff.c_str());
}
else SetWindowText(hWndDlg, TranslateT("Set my blog status"));
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index ce92e1781c..b6cc63c25e 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -131,7 +131,7 @@ INT_PTR CMraProto::MraSendPostcard(WPARAM wParam, LPARAM)
CMStringA szUrl, szEmail;
if (GetContactFirstEMail(wParam, FALSE, szEmail)) {
szEmail.MakeLower();
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", GetContactNameA((HANDLE)wParam), szEmail);
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%S&rcptemail=%s", pcli->pfnGetContactDisplayName(wParam, 0), szEmail);
MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
}
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 3279852f6a..6b42437dbf 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -693,7 +693,7 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf)
if (dwTemp == ID_STATUS_OFFLINE) { // was/now invisible
CMStringW szEmail, szBuff;
mraGetStringW(hContact, "e-mail", szEmail);
- szBuff.Format(L"%s <%s> - %s", GetContactNameW(hContact), szEmail, TranslateT("invisible status changed"));
+ szBuff.Format(L"%s <%s> - %s", pcli->pfnGetContactDisplayName(hContact, 0), szEmail, TranslateT("invisible status changed"));
MraPopupShowFromContactW(hContact, MRA_POPUP_TYPE_INFORMATION, 0, szBuff);
MraSetContactStatus(hContact, ID_STATUS_INVISIBLE);
@@ -1261,7 +1261,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf)
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS),
dwID, dwGroupID, dwContactFlag, dwContactSeverFlags, dwTemp, NULL, &wszNick, &szCustomPhones);
if (wszNick.IsEmpty()) { // set the server-side nick
- wszNick = GetContactNameW(hContact);
+ wszNick = pcli->pfnGetContactDisplayName(hContact, 0);
MraModifyContact(hContact, &dwID, &dwContactFlag, &dwGroupID, &szEmail, &wszNick, &szCustomPhones);
}
}
@@ -1312,7 +1312,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf)
SetExtraIcons(hContact);
MraSetContactStatus(hContact, ID_STATUS_ONLINE);
- CMStringW wszCustomName = GetContactNameW(hContact);
+ CMStringW wszCustomName = pcli->pfnGetContactDisplayName(hContact, 0);
MraAddContact(hContact, (CONTACT_FLAG_VISIBLE | CONTACT_FLAG_MULTICHAT), -1, szEmail, wszCustomName);
}
else {
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index 44b6dde3ac..0440cfa9eb 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -202,7 +202,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam)
// always store custom nick
CMStringW wszNick;
if (cws->value.type == DBVT_DELETED) {
- wszNick = GetContactNameW(hContact);
+ wszNick = pcli->pfnGetContactDisplayName(hContact, 0);
db_set_ws(hContact, "CList", "MyHandle", wszNick);
}
else if (cws->value.pszVal) {
diff --git a/protocols/MRA/src/stdafx.h b/protocols/MRA/src/stdafx.h
index f5b3741957..8262f8ef69 100644
--- a/protocols/MRA/src/stdafx.h
+++ b/protocols/MRA/src/stdafx.h
@@ -25,7 +25,6 @@
#include <m_system_cpp.h>
#include <m_protocols.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_cluiframes.h>
#include <m_clui.h>
#include <m_genmenu.h>
@@ -179,9 +178,6 @@ void InitExtraIcons();
CMStringA MraGetSelfVersionString();
-#define GetContactNameA(Contact) (LPSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, 0)
-#define GetContactNameW(Contact) (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, GCDNF_UNICODE)
-
#define SetBit(bytes, bitpos) bytes |= (1<<bitpos)
#define GetBit(bytes, bitpos) ((bytes&(1<<bitpos))? TRUE:FALSE)
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp
index 1b0f0b43a6..d7e4f56f94 100644
--- a/protocols/MSN/src/msn.cpp
+++ b/protocols/MSN/src/msn.cpp
@@ -24,8 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "msn_proto.h"
#include "version.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
-
int hLangpack;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -111,6 +111,7 @@ static int msnProtoUninit(CMsnProto* ppro)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp
index a29db7b667..f9e956780a 100644
--- a/protocols/MSN/src/msn_std.cpp
+++ b/protocols/MSN/src/msn_std.cpp
@@ -46,7 +46,7 @@ void CMsnProto::setStringUtf(MCONTACT hContact, const char* name, const char* va
TCHAR* CMsnProto::GetContactNameT(MCONTACT hContact)
{
if (hContact)
- return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR);
+ return (TCHAR*)pcli->pfnGetContactDisplayName(WPARAM(hContact), 0);
CONTACTINFO ci = { 0 };
ci.cbSize = sizeof(ci);
diff --git a/protocols/MSN/src/stdafx.h b/protocols/MSN/src/stdafx.h
index 5bdd6c9098..1f34366308 100644
--- a/protocols/MSN/src/stdafx.h
+++ b/protocols/MSN/src/stdafx.h
@@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clui.h>
#include <m_contacts.h>
#include <m_idle.h>
diff --git a/protocols/MinecraftDynmap/src/stdafx.h b/protocols/MinecraftDynmap/src/stdafx.h
index 008157da25..301af3bf93 100644
--- a/protocols/MinecraftDynmap/src/stdafx.h
+++ b/protocols/MinecraftDynmap/src/stdafx.h
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_system.h>
#include <m_system_cpp.h>
#include <m_chat.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_langpack.h>
#include <m_netlib.h>
#include <m_options.h>
diff --git a/protocols/Omegle/src/stdafx.h b/protocols/Omegle/src/stdafx.h
index aaf7530ce4..722a3520fe 100644
--- a/protocols/Omegle/src/stdafx.h
+++ b/protocols/Omegle/src/stdafx.h
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_system.h>
#include <m_system_cpp.h>
#include <m_chat.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_langpack.h>
#include <m_netlib.h>
#include <m_options.h>
diff --git a/protocols/Sametime/src/StdAfx.h b/protocols/Sametime/src/StdAfx.h
index d1e286e1d4..c98e61d137 100644
--- a/protocols/Sametime/src/StdAfx.h
+++ b/protocols/Sametime/src/StdAfx.h
@@ -37,7 +37,6 @@ extern "C" {
#include <mw_session.h>
#include <mw_cipher.h>
#include <mw_st_list.h>
-//#include <mw_util.h>
#include <mw_service.h>
#include <mw_channel.h>
#include <mw_srvc_im.h>
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index a800096d0d..863430b20d 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -17,7 +17,7 @@ PLUGININFOEX pluginInfo =
{ 0xf1b0ba1b, 0xc91, 0x4313, { 0x85, 0xeb, 0x22, 0x50, 0x69, 0xd4, 0x4d, 0x1 } } // {F1B0BA1B-0C91-4313-85EB-225069D44D01}
};
-
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
LIST<CSametimeProto> g_Instances(1, PtrKeySortT);
int hLangpack;
@@ -265,6 +265,9 @@ static int sametime_proto_uninit(PROTO_INTERFACE* ppro)
extern "C" int __declspec(dllexport) Load(void)
{
+ mir_getLP(&pluginInfo);
+ mir_getCLI();
+
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
pd.type = PROTOTYPE_PROTOCOL;
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp
index c9fd84f4a9..8daf9494a9 100644
--- a/protocols/Sametime/src/session_announce_win.cpp
+++ b/protocols/Sametime/src/session_announce_win.cpp
@@ -46,7 +46,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
if (db_get_b(hContact, proto->m_szModuleName, "ChatRoom", 0) == 0
&& db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
lvI.lParam = (LPARAM)hContact;
- lvI.pszText = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ lvI.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_LST_ANTO), &lvI);
lvI.iItem++;
}
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h
index f8dbacb6b4..c5256b9dc0 100644
--- a/protocols/SkypeWeb/src/stdafx.h
+++ b/protocols/SkypeWeb/src/stdafx.h
@@ -45,7 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_chat.h>
#include <m_genmenu.h>
#include <m_clc.h>
-#include <m_clistint.h>
#include <m_string.h>
#include <m_json.h>
#include <m_gui.h>
diff --git a/protocols/Tlen/src/tlen.h b/protocols/Tlen/src/tlen.h
index 2c1f51c5f4..b0bf31b044 100644
--- a/protocols/Tlen/src/tlen.h
+++ b/protocols/Tlen/src/tlen.h
@@ -63,7 +63,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protoint.h>
#include <m_contacts.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clui.h>
#include <m_options.h>
#include <m_userinfo.h>
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 6406889bb9..fda51c425e 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -934,7 +934,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
jid = dbv.pszVal;
if ((item=TlenListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL) {
if (cws->value.type == DBVT_DELETED) {
- newNick = mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_NOMYHANDLE));
+ newNick = mir_strdup((char *) pcli->pfnGetContactDisplayName(hContact, GCDNF_NOMYHANDLE));
} else if (cws->value.pszVal != NULL) {
newNick = settingToChar(cws);
} else {
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp
index 3842268777..a08e1c1c17 100644
--- a/protocols/Tlen/src/tlen_voice.cpp
+++ b/protocols/Tlen/src/tlen_voice.cpp
@@ -934,7 +934,7 @@ static char *getDisplayName(TlenProtocol *proto, const char *id)
mir_snprintf(jid, _countof(jid), "%s@%s", id, dbv.pszVal);
db_free(&dbv);
if ((hContact = TlenHContactFromJID(proto, jid)) != NULL)
- return mir_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
+ return mir_strdup((char *)pcli->pfnGetContactDisplayName(hContact, 0));
}
return mir_strdup(id);
}
diff --git a/protocols/Tox/src/stdafx.h b/protocols/Tox/src/stdafx.h
index 3a5cfafe8b..93c73cdf65 100644
--- a/protocols/Tox/src/stdafx.h
+++ b/protocols/Tox/src/stdafx.h
@@ -34,7 +34,6 @@
#include <m_genmenu.h>
#include <m_clc.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_gui.h>
#include <m_folders.h>
#include <m_assocmgr.h>
diff --git a/protocols/Twitter/src/stdafx.h b/protocols/Twitter/src/stdafx.h
index 2a2287db6b..506177b634 100644
--- a/protocols/Twitter/src/stdafx.h
+++ b/protocols/Twitter/src/stdafx.h
@@ -41,7 +41,6 @@ typedef std::basic_string<TCHAR> tstring;
#include <m_button.h>
#include <m_chat.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clui.h>
#include <m_database.h>
#include <m_folders.h>
diff --git a/protocols/VKontakte/src/stdafx.h b/protocols/VKontakte/src/stdafx.h
index 475b19372c..0db91b86dc 100644
--- a/protocols/VKontakte/src/stdafx.h
+++ b/protocols/VKontakte/src/stdafx.h
@@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_avatars.h>
#include <m_chat.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_database.h>
#include <m_extraicons.h>
#include <m_file.h>
diff --git a/protocols/WhatsApp/src/common.h b/protocols/WhatsApp/src/common.h
index c602a4fc09..abd76ecf13 100644
--- a/protocols/WhatsApp/src/common.h
+++ b/protocols/WhatsApp/src/common.h
@@ -39,7 +39,6 @@ Copyright © 2013-14 Uli Hecht
#include <m_chat.h>
#include <m_clc.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clui.h>
#include <m_database.h>
#include <m_history.h>
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp
index 07c8fb6d10..e7a2ba1fe3 100644
--- a/protocols/Yahoo/src/chat.cpp
+++ b/protocols/Yahoo/src/chat.cpp
@@ -237,7 +237,7 @@ void CYahooProto::ChatEvent(const char* room, const char* who, int evt, const TC
TCHAR* snt = mir_a2t(who);
MCONTACT hContact = getbuddyH(who);
- TCHAR* nick = hContact ? (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR) : snt;
+ TCHAR* nick = hContact ? (TCHAR*)pcli->pfnGetContactDisplayName(WPARAM(hContact), 0) : snt;
GCDEST gcd = { m_szModuleName, idt, evt };
GCEVENT gce = { sizeof(gce), &gcd };
diff --git a/protocols/Yahoo/src/yahoo.h b/protocols/Yahoo/src/yahoo.h
index d90d1abcb7..89ec1af90b 100644
--- a/protocols/Yahoo/src/yahoo.h
+++ b/protocols/Yahoo/src/yahoo.h
@@ -38,7 +38,6 @@
#include <m_netlib.h>
#include <m_idle.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_protosvc.h>
#include <m_protoint.h>
#include <m_langpack.h>
diff --git a/src/core/stdauth/src/commonheaders.h b/src/core/stdauth/src/commonheaders.h
index 9ac9abbf2a..209a0a9813 100644
--- a/src/core/stdauth/src/commonheaders.h
+++ b/src/core/stdauth/src/commonheaders.h
@@ -51,7 +51,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_crypto.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stdaway/src/commonheaders.h b/src/core/stdaway/src/commonheaders.h
index cac3b84b67..9003105e93 100644
--- a/src/core/stdaway/src/commonheaders.h
+++ b/src/core/stdaway/src/commonheaders.h
@@ -49,7 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_netlib.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stdchat/src/chat.h b/src/core/stdchat/src/chat.h
index d2706c8605..da9ed84090 100644
--- a/src/core/stdchat/src/chat.h
+++ b/src/core/stdchat/src/chat.h
@@ -48,7 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_button.h>
#include <m_protosvc.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clui.h>
#include <m_message.h>
#include <m_icolib.h>
diff --git a/src/core/stdclist/src/commonheaders.h b/src/core/stdclist/src/commonheaders.h
index fb41436634..deff5b4d14 100644
--- a/src/core/stdclist/src/commonheaders.h
+++ b/src/core/stdclist/src/commonheaders.h
@@ -40,7 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <win2k.h>
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clui.h>
#include <m_system.h>
#include <m_database.h>
diff --git a/src/core/stdemail/src/commonheaders.h b/src/core/stdemail/src/commonheaders.h
index 5d64b310f8..9515f7b34d 100644
--- a/src/core/stdemail/src/commonheaders.h
+++ b/src/core/stdemail/src/commonheaders.h
@@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_utils.h>
#include <m_netlib.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stdfile/src/commonheaders.h b/src/core/stdfile/src/commonheaders.h
index c028084e09..7c71d453e0 100644
--- a/src/core/stdfile/src/commonheaders.h
+++ b/src/core/stdfile/src/commonheaders.h
@@ -53,7 +53,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_crypto.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 21842deb6e..84808b6c2b 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -136,7 +136,7 @@ void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOO
REPLACEVARSARRAY rvaVarsToReplace[4];
rvaVarsToReplace[0].key.t = _T("nick");
- rvaVarsToReplace[0].value.t = mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ rvaVarsToReplace[0].value.t = mir_tstrdup((TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0));
rvaVarsToReplace[1].key.t = _T("userid");
rvaVarsToReplace[1].value.t = GetContactID(hContact);
rvaVarsToReplace[2].key.t = _T("proto");
diff --git a/src/core/stdhelp/src/commonheaders.h b/src/core/stdhelp/src/commonheaders.h
index ef3c230d8f..cc3471325e 100644
--- a/src/core/stdhelp/src/commonheaders.h
+++ b/src/core/stdhelp/src/commonheaders.h
@@ -49,7 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_netlib.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stdidle/src/commonheaders.h b/src/core/stdidle/src/commonheaders.h
index 565408f1ba..defe5a7a76 100644
--- a/src/core/stdidle/src/commonheaders.h
+++ b/src/core/stdidle/src/commonheaders.h
@@ -50,7 +50,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_netlib.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stdmsg/src/commonheaders.h b/src/core/stdmsg/src/commonheaders.h
index 82b52cbfc3..db3d85499d 100644
--- a/src/core/stdmsg/src/commonheaders.h
+++ b/src/core/stdmsg/src/commonheaders.h
@@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_langpack.h>
#include <m_button.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clc.h>
#include <m_clui.h>
#include <m_options.h>
diff --git a/src/core/stdssl/src/commonheaders.h b/src/core/stdssl/src/commonheaders.h
index 1ad4b81011..fcfad31b67 100644
--- a/src/core/stdssl/src/commonheaders.h
+++ b/src/core/stdssl/src/commonheaders.h
@@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_langpack.h>
#include <m_button.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_clc.h>
#include <m_clui.h>
#include <m_options.h>
diff --git a/src/core/stduihist/src/commonheaders.h b/src/core/stduihist/src/commonheaders.h
index 52ab245752..1779af3b6b 100644
--- a/src/core/stduihist/src/commonheaders.h
+++ b/src/core/stduihist/src/commonheaders.h
@@ -49,7 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_netlib.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stdurl/commonheaders.h b/src/core/stdurl/commonheaders.h
index 3acf6d5748..38a6e03725 100644
--- a/src/core/stdurl/commonheaders.h
+++ b/src/core/stdurl/commonheaders.h
@@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_netlib.h>
#include <m_crypto.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stduserinfo/src/commonheaders.h b/src/core/stduserinfo/src/commonheaders.h
index 49583b6a21..7f9b1dd414 100644
--- a/src/core/stduserinfo/src/commonheaders.h
+++ b/src/core/stduserinfo/src/commonheaders.h
@@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clui.h>
#include <m_crypto.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/core/stduseronline/src/commonheaders.h b/src/core/stduseronline/src/commonheaders.h
index df5c89598e..e654e02b1c 100644
--- a/src/core/stduseronline/src/commonheaders.h
+++ b/src/core/stduseronline/src/commonheaders.h
@@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_database.h>
#include <m_netlib.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_clist.h>
#include <m_button.h>
#include <m_protosvc.h>
#include <m_protocols.h>
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index 9d54905a72..7ce932340c 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -110,21 +110,6 @@ TCHAR* fnGetStatusModeDescription(int mode, int flags)
return (flags & GSMDF_UNTRANSLATED) ? descr : TranslateTS(descr);
}
-static INT_PTR GetStatusModeDescription(WPARAM wParam, LPARAM lParam)
-{
- TCHAR *buf1 = cli.pfnGetStatusModeDescription(wParam, lParam);
-
- if (!(lParam & GSMDF_TCHAR)) {
- static char szMode[64];
- char *buf2 = mir_u2a(buf1);
- strncpy_s(szMode, buf2, _TRUNCATE);
- mir_free(buf2);
- return (INT_PTR)szMode;
- }
-
- return (INT_PTR)buf1;
-}
-
static int ProtocolAck(WPARAM, LPARAM lParam)
{
ACKDATA *ack = (ACKDATA *) lParam;
@@ -491,8 +476,6 @@ int LoadContactListModule2(void)
CreateServiceFunction(MS_CLIST_CONTACTDOUBLECLICKED, ContactDoubleClicked);
CreateServiceFunction(MS_CLIST_CONTACTFILESDROPPED, ContactFilesDropped);
- CreateServiceFunction(MS_CLIST_GETSTATUSMODEDESCRIPTION, GetStatusModeDescription);
- CreateServiceFunction(MS_CLIST_GETCONTACTDISPLAYNAME, GetContactDisplayName);
CreateServiceFunction(MS_CLIST_INVALIDATEDISPLAYNAME, InvalidateDisplayName);
CreateServiceFunction(MS_CLIST_CONTACTSCOMPARE, CompareContacts);
CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP, ContactChangeGroup);
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp
index 66792adb9a..050c67a9a3 100644
--- a/src/mir_app/src/clistsettings.cpp
+++ b/src/mir_app/src/clistsettings.cpp
@@ -140,56 +140,6 @@ TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode)
return (cacheEntry == NULL) ? mir_tstrdup(buffer) : buffer;
}
-INT_PTR GetContactDisplayName(WPARAM hContact, LPARAM lParam)
-{
- static char retVal[200];
- ClcCacheEntry *cacheEntry = NULL;
-
- if (lParam & GCDNF_UNICODE)
- return (INT_PTR)cli.pfnGetContactDisplayName(hContact, lParam & ~GCDNF_UNICODE);
-
- if (lParam & GCDNF_NOCACHE)
- lParam &= ~GCDNF_NOCACHE;
- else if (lParam != GCDNF_NOMYHANDLE) {
- cacheEntry = cli.pfnGetCacheEntry(hContact);
- if (cacheEntry->tszName) {
- strncpy_s(retVal, _T2A(cacheEntry->tszName), _TRUNCATE);
- return (INT_PTR)retVal;
- }
- }
-
- CONTACTINFO ci = { 0 };
- ci.cbSize = sizeof(ci);
- ci.hContact = hContact;
- if (ci.hContact == NULL) // killme !!!!!!!!!!
- ci.szProto = "ICQ";
- ci.dwFlag = ((lParam == GCDNF_NOMYHANDLE) ? CNF_DISPLAYNC : CNF_DISPLAY) | CNF_TCHAR;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci)) {
- if (ci.type == CNFT_ASCIIZ) {
- strncpy_s(retVal, _T2A(ci.pszVal), _TRUNCATE);
- if (cacheEntry == NULL) {
- mir_free(ci.pszVal);
- return (INT_PTR)mir_strdup(retVal);
- }
-
- cacheEntry->tszName = ci.pszVal;
- return (INT_PTR)retVal;
- }
- if (ci.type == CNFT_DWORD) {
- _ltoa(ci.dVal, retVal, 10);
- if (cacheEntry == NULL)
- return (INT_PTR)mir_strdup(retVal);
-
- cacheEntry->tszName = mir_a2u(retVal);
- return (INT_PTR)retVal;
- }
- }
-
- CallContactService(hContact, PSS_GETINFO, SGIF_MINIMAL, 0);
- char* result = Translate("(Unknown contact)");
- return (INT_PTR)((cacheEntry == NULL) ? mir_strdup(result) : result);
-}
-
INT_PTR InvalidateDisplayName(WPARAM wParam, LPARAM)
{
cli.pfnInvalidateDisplayNameCacheEntry(wParam);
diff --git a/src/mir_app/src/path.cpp b/src/mir_app/src/path.cpp
index 058d9b4284..73189cc361 100644
--- a/src/mir_app/src/path.cpp
+++ b/src/mir_app/src/path.cpp
@@ -80,7 +80,7 @@ static __forceinline char *mir_a2x(const char*, const char *s) { return mir_strd
static __forceinline char *GetContactNickX(const char*, MCONTACT hContact)
{
- return mir_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
+ return mir_strdup(_T2A(cli.pfnGetContactDisplayName(hContact, 0)));
}
static __forceinline char *GetContactIDX(const char*, MCONTACT hContact)
@@ -167,7 +167,7 @@ static __forceinline TCHAR* mir_a2x(const TCHAR *, const char *s) { return mir_a
static __forceinline TCHAR* GetContactNickX(const TCHAR*, MCONTACT hContact)
{
- return mir_tstrdup((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ return mir_tstrdup(cli.pfnGetContactDisplayName(hContact, 0));
}
static __forceinline TCHAR* GetContactIDX(const TCHAR*, MCONTACT hContact)
diff --git a/src/mir_app/src/stdafx.h b/src/mir_app/src/stdafx.h
index b619bcf35a..935e2dd4c1 100644
--- a/src/mir_app/src/stdafx.h
+++ b/src/mir_app/src/stdafx.h
@@ -68,7 +68,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_crypto.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_avatars.h>
#include <m_button.h>
#include <m_protosvc.h>