summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-27 21:32:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-27 21:32:12 +0300
commit426e2f9755a14023223e2e3ebfa8e78f6e8677a8 (patch)
treeae387e1079fe63cea4d928a0e2564f218836d548
parentea45fcc6216051c084a762a8fd2d170e095bb1ba (diff)
fix for a function name:
Clist_IsHidden => Contact_IsHidden Clist_HideContact => Contact_Hide
-rw-r--r--include/m_clist.h6
-rw-r--r--include/m_contacts.h6
-rw-r--r--libs/win32/mir_app.libbin194100 -> 194084 bytes
-rw-r--r--libs/win64/mir_app.libbin189752 -> 189738 bytes
-rw-r--r--plugins/AVS/src/options.cpp12
-rw-r--r--plugins/AVS/src/stdafx.h1
-rw-r--r--plugins/AVS/src/utils.cpp2
-rw-r--r--plugins/AutoShutdown/src/stdafx.h1
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp10
-rw-r--r--plugins/BuddyExpectator/src/stdafx.h1
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/stdafx.h1
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp4
-rw-r--r--plugins/Clist_nicer/src/clc.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp2
-rw-r--r--plugins/KeyboardNotify/src/ignore.cpp2
-rw-r--r--plugins/KeyboardNotify/src/stdafx.h1
-rw-r--r--plugins/MenuItemEx/src/main.cpp6
-rw-r--r--plugins/MenuItemEx/src/stdafx.h1
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp2
-rw-r--r--plugins/MirFox/src/MirfoxMiranda.cpp4
-rw-r--r--plugins/MirFox/src/common.h2
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp4
-rw-r--r--plugins/MirandaG15/src/CContactList.cpp4
-rw-r--r--plugins/MirandaG15/src/CEventScreen.cpp2
-rw-r--r--plugins/MirandaG15/src/StdAfx.h1
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/stdafx.h1
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp2
-rw-r--r--plugins/SecureIM/src/commonheaders.h1
-rw-r--r--plugins/SecureIM/src/crypt_check.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp2
-rw-r--r--plugins/Sessions/Src/Utils.cpp2
-rw-r--r--plugins/Sessions/Src/stdafx.h1
-rw-r--r--plugins/ShellExt/src/shlcom.cpp2
-rw-r--r--plugins/ShellExt/src/stdafx.h2
-rw-r--r--plugins/Spamotron/src/spamotron.cpp8
-rw-r--r--plugins/Spamotron/src/stdafx.h1
-rwxr-xr-xplugins/StopSpamMod/src/stopspam.cpp6
-rw-r--r--plugins/StopSpamPlus/src/events.cpp6
-rw-r--r--plugins/StopSpamPlus/src/stdafx.h1
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp4
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp2
-rw-r--r--plugins/TooltipNotify/src/stdafx.h1
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp2
-rw-r--r--plugins/WhenWasIt/src/hooked_events.cpp2
-rw-r--r--plugins/mRadio/i_myservice.inc2
-rw-r--r--plugins/mRadio/i_search.inc119
-rw-r--r--plugins/wbOSD/src/events.cpp2
-rw-r--r--plugins/wbOSD/src/stdafx.h1
-rw-r--r--protocols/Discord/src/groupchat.cpp2
-rw-r--r--protocols/Discord/src/stdafx.h1
-rw-r--r--protocols/Dummy/src/dummy_proto.cpp4
-rw-r--r--protocols/Dummy/src/stdafx.h1
-rw-r--r--protocols/EmLanProto/src/mlan.cpp8
-rw-r--r--protocols/EmLanProto/src/stdafx.h1
-rw-r--r--protocols/FacebookRM/src/contacts.cpp2
-rw-r--r--protocols/FacebookRM/src/proto.cpp2
-rw-r--r--protocols/FacebookRM/src/stdafx.h1
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg.h2
-rw-r--r--protocols/ICQ-WIM/src/groupchats.cpp2
-rw-r--r--protocols/ICQ-WIM/src/ignore.cpp2
-rw-r--r--protocols/ICQ-WIM/src/stdafx.h1
-rw-r--r--protocols/ICQCorp/src/protocol.cpp4
-rw-r--r--protocols/ICQCorp/src/services.cpp4
-rw-r--r--protocols/ICQCorp/src/stdafx.h2
-rw-r--r--protocols/IRCG/src/clist.cpp6
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp6
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp4
-rw-r--r--protocols/JabberG/src/jabber_events.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_iqid.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_misc.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
-rw-r--r--protocols/MSN/src/msn_commands.cpp2
-rw-r--r--protocols/MSN/src/msn_contact.cpp2
-rw-r--r--protocols/MSN/src/msn_proto.cpp8
-rw-r--r--protocols/MSN/src/msn_soapab.cpp2
-rw-r--r--protocols/NewsAggregator/Src/Options.cpp4
-rw-r--r--protocols/NewsAggregator/Src/stdafx.h1
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp4
-rw-r--r--protocols/Sametime/src/userlist.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp4
-rw-r--r--protocols/VKontakte/src/misc.cpp4
-rw-r--r--protocols/VKontakte/src/stdafx.h1
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp4
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp2
-rw-r--r--protocols/Weather/src/stdafx.h1
-rw-r--r--protocols/Weather/src/weather_addstn.cpp2
-rw-r--r--protocols/Weather/src/weather_mwin.cpp4
-rw-r--r--protocols/WebView/src/stdafx.h3
-rw-r--r--protocols/WebView/src/webview_services.cpp4
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3comm.cpp4
-rw-r--r--protocols/YAMN/src/services.cpp2
-rw-r--r--protocols/YAMN/src/stdafx.h13
-rw-r--r--src/core/stduseronline/src/useronline.cpp2
-rw-r--r--src/mir_app/src/chat_manager.cpp2
-rw-r--r--src/mir_app/src/chat_tools.cpp4
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clcitems.cpp2
-rw-r--r--src/mir_app/src/clcutils.cpp15
-rw-r--r--src/mir_app/src/clistsettings.cpp4
-rw-r--r--src/mir_app/src/clui.cpp2
-rw-r--r--src/mir_app/src/contact.cpp2
-rw-r--r--src/mir_app/src/contacts.cpp14
-rw-r--r--src/mir_app/src/ignore.cpp6
-rw-r--r--src/mir_app/src/meta_menu.cpp4
-rw-r--r--src/mir_app/src/meta_utils.cpp2
-rw-r--r--src/mir_app/src/mir_app.def4
-rw-r--r--src/mir_app/src/mir_app64.def4
115 files changed, 190 insertions, 288 deletions
diff --git a/include/m_clist.h b/include/m_clist.h
index c4b74e8397..3142a497ed 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -489,12 +489,6 @@ EXTERN_C MIR_APP_DLL(int) Clist_ContactCompare(MCONTACT hContact1, MCONTACT hCon
EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetContactDisplayName(MCONTACT hContact, int mode = 0);
/////////////////////////////////////////////////////////////////////////////////////////
-// gets / sets hidden status for a contact
-
-EXTERN_C MIR_APP_DLL(bool) Clist_IsHidden(MCONTACT hContact);
-EXTERN_C MIR_APP_DLL(void) Clist_HideContact(MCONTACT hContact, bool bHidden = true);
-
-/////////////////////////////////////////////////////////////////////////////////////////
// DRAG-N-DROP SUPPORT
/////////////////////////////////////////////////////////////////////////////////////////
// a contact is being dragged outside the main window
diff --git a/include/m_contacts.h b/include/m_contacts.h
index 37c4213618..9459beccb7 100644
--- a/include/m_contacts.h
+++ b/include/m_contacts.h
@@ -82,6 +82,12 @@ EXTERN_C MIR_APP_DLL(wchar_t*) Contact_GetInfo(
EXTERN_C MIR_APP_DLL(int) Contact_GetStatus(MCONTACT hContact);
/////////////////////////////////////////////////////////////////////////////////////////
+// gets / sets hidden status for a contact
+
+EXTERN_C MIR_APP_DLL(bool) Contact_IsHidden(MCONTACT hContact);
+EXTERN_C MIR_APP_DLL(void) Contact_Hide(MCONTACT hContact, bool bHidden = true);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// Add contact's dialog
// passing hWnd == NULL will result in a dialog that is created modeless
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 16a99e57b1..d9c0a55bb4 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 70a92bf384..b5996e0a9d 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 93ef446f50..a16c83a7fa 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -496,7 +496,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ShowWindow(hwndDlg, SW_SHOWNORMAL);
InvalidateRect(GetDlgItem(hwndDlg, IDC_PROTOPIC), nullptr, FALSE);
CheckDlgButton(hwndDlg, IDC_PROTECTAVATAR, db_get_b(hContact, "ContactPhoto", "Locked", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HIDEAVATAR, Clist_IsHidden(hContact) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HIDEAVATAR, Contact_IsHidden(hContact) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_BKG_NUM_POINTS), 0);
SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_SETRANGE, 0, MAKELONG(8, 2));
@@ -528,8 +528,8 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
bool locked = IsDlgButtonChecked(hwndDlg, IDC_PROTECTAVATAR) != 0;
bool hidden = IsDlgButtonChecked(hwndDlg, IDC_HIDEAVATAR) != 0;
SetAvatarAttribute(hContact, AVS_HIDEONCLIST, hidden);
- if (hidden != Clist_IsHidden(hContact))
- Clist_HideContact(hContact, hidden);
+ if (hidden != Contact_IsHidden(hContact))
+ Contact_Hide(hContact, hidden);
if (!locked && db_get_b(hContact, "ContactPhoto", "NeedUpdate", 0))
QueueAdd(hContact);
@@ -750,7 +750,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
TranslateDialogDefault(hwndDlg);
SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0);
CheckDlgButton(hwndDlg, IDC_PROTECTAVATAR, db_get_b(hContact, "ContactPhoto", "Locked", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HIDEAVATAR, Clist_IsHidden(hContact) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HIDEAVATAR, Contact_IsHidden(hContact) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_BKG_NUM_POINTS), 0);
SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_SETRANGE, 0, MAKELONG(8, 2));
@@ -785,8 +785,8 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
{
bool hidden = IsDlgButtonChecked(hwndDlg, IDC_HIDEAVATAR) != 0;
SetAvatarAttribute(hContact, AVS_HIDEONCLIST, hidden);
- if (hidden != Clist_IsHidden(hContact))
- Clist_HideContact(hContact, hidden);
+ if (hidden != Contact_IsHidden(hContact))
+ Contact_Hide(hContact, hidden);
}
break;
diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h
index c1084192f4..fe61d19107 100644
--- a/plugins/AVS/src/stdafx.h
+++ b/plugins/AVS/src/stdafx.h
@@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <win2k.h>
#include <newpluginapi.h>
#include <m_clist.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_options.h>
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index 80b8add728..53a9d7e651 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -158,7 +158,7 @@ int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, const char *sz
GetObject(ace->hbmPic, sizeof(bminfo), &bminfo);
ace->dwFlags = AVS_BITMAP_VALID;
- if (hContact != NULL && Clist_IsHidden(hContact))
+ if (hContact != NULL && Contact_IsHidden(hContact))
ace->dwFlags |= AVS_HIDEONCLIST;
ace->hContact = hContact;
ace->bmHeight = bminfo.bmHeight;
diff --git a/plugins/AutoShutdown/src/stdafx.h b/plugins/AutoShutdown/src/stdafx.h
index 0e58bbf11a..e541eacbb1 100644
--- a/plugins/AutoShutdown/src/stdafx.h
+++ b/plugins/AutoShutdown/src/stdafx.h
@@ -43,6 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <raserror.h> /* error codes for RAS */
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_skin.h>
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 87cba96fde..85de2aa7df 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -182,7 +182,7 @@ static BOOL CheckAllContactsOffline(void)
if (db_get_b(hContact, pszProto, "ChatRoom", 0)) continue;
if (db_get_w(hContact, pszProto, "Status", 0) != ID_STATUS_OFFLINE) {
if (fSmartCheck) {
- if (Clist_IsHidden(hContact)) continue;
+ if (Contact_IsHidden(hContact)) continue;
if (db_get_b(hContact, "CList", "NotOnList", 0)) continue;
}
fAllOffline = FALSE;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 82dd5204fb..c5f236747c 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -100,7 +100,7 @@ LRESULT CALLBACK HidePopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
switch (message) {
case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED) {
- Clist_HideContact(PUGetContact(hWnd));
+ Contact_Hide(PUGetContact(hWnd));
PUDeletePopup(hWnd);
}
break;
@@ -112,7 +112,7 @@ LRESULT CALLBACK HidePopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
case UM_POPUPACTION:
if (wParam == 2) {
- Clist_HideContact(PUGetContact(hWnd));
+ Contact_Hide(PUGetContact(hWnd));
PUDeletePopup(hWnd);
}
if (wParam == 3) {
@@ -223,7 +223,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
if (options.hideInactive)
if (daysSinceMessage >= options.iSilencePeriod)
- if (!Clist_IsHidden(hContact) && !g_plugin.getByte(hContact, "NeverHide", 0)) {
+ if (!Contact_IsHidden(hContact) && !g_plugin.getByte(hContact, "NeverHide", 0)) {
POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
@@ -252,7 +252,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
void ReturnNotify(MCONTACT hContact, wchar_t *message)
{
- if (db_get_b(hContact, "CList", "NotOnList", 0) == 1 || Clist_IsHidden(hContact))
+ if (db_get_b(hContact, "CList", "NotOnList", 0) == 1 || Contact_IsHidden(hContact))
return;
Skin_PlaySound("buddyExpectatorReturn");
@@ -291,7 +291,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message)
void GoneNotify(MCONTACT hContact, wchar_t *message)
{
- if (db_get_b(hContact, "CList", "NotOnList", 0) == 1 || Clist_IsHidden(hContact))
+ if (db_get_b(hContact, "CList", "NotOnList", 0) == 1 || Contact_IsHidden(hContact))
return;
if (options.iShowPopup2 > 0) {
diff --git a/plugins/BuddyExpectator/src/stdafx.h b/plugins/BuddyExpectator/src/stdafx.h
index 4604eb43d1..32063d5756 100644
--- a/plugins/BuddyExpectator/src/stdafx.h
+++ b/plugins/BuddyExpectator/src/stdafx.h
@@ -30,6 +30,7 @@
#include <newpluginapi.h>
#include <m_skin.h>
#include <m_clistint.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_options.h>
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 7cbd225163..655f626bd8 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -212,7 +212,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
if (!hContactOrMeta)
hContactOrMeta = hContact;
- if (hContact && Clist_IsHidden(hContactOrMeta))
+ if (hContact && Contact_IsHidden(hContactOrMeta))
return 0;
int PerContactSetting = hContact ? g_plugin.getByte(hContact, DB_CCN_NOTIFY, NOTIFY_USEGLOBAL) : NOTIFY_ALWAYS; // NOTIFY_ALWAYS for preview
diff --git a/plugins/ClientChangeNotify/src/stdafx.h b/plugins/ClientChangeNotify/src/stdafx.h
index 676c1bbeaf..b152ec70e5 100644
--- a/plugins/ClientChangeNotify/src/stdafx.h
+++ b/plugins/ClientChangeNotify/src/stdafx.h
@@ -32,6 +32,7 @@
#include <commdlg.h>
#include "newpluginapi.h"
+#include "m_contacts.h"
#include "statusmodes.h"
#include "m_popup.h"
#include "m_skin.h"
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index a9afcacfd1..7c33e6833c 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1308,7 +1308,7 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wPara
flags = contact->flags;
}
Clist_DeleteItemFromTree(hwnd, wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Clist_IsHidden(wParam)) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Contact_IsHidden(wParam)) {
NMCLISTCONTROL nm;
g_clistApi.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
if (Clist_FindItem(hwnd, dat, wParam, &contact)) {
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 87a0c84cd1..7eeaf93654 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -326,7 +326,7 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact)
pdnce->hContact = hContact;
pdnce->szProto = GetContactProto(hContact);
- pdnce->bIsHidden = Clist_IsHidden(hContact);
+ pdnce->bIsHidden = Contact_IsHidden(hContact);
pdnce->m_bIsSub = db_mc_isSub(hContact) != 0;
pdnce->m_bNoHiddenOffline = g_plugin.getByte(hContact, "noOffline");
pdnce->IdleTS = db_get_dw(hContact, pdnce->szProto, "IdleTS", 0);
@@ -396,7 +396,7 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly)
int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
{
- int dbHidden = Clist_IsHidden(hContact); // default hidden state, always respect it.
+ int dbHidden = Contact_IsHidden(hContact); // default hidden state, always respect it.
int filterResult = 1;
int searchResult = 0;
ClcCacheEntry *pdnce = Clist_GetCacheEntry(hContact);
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index fe8faf6126..ec0104e8ce 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -131,7 +131,7 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam)
if (!__strcmp(szProto, cws->szModule)) {
// was a unique setting key written?
if (!__strcmp(cws->szSetting, "Status")) {
- if (!Clist_IsHidden(hContact))
+ if (!Contact_IsHidden(hContact))
if (cws->value.wVal == ID_STATUS_OFFLINE)
if (g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT))
return 0;
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 283691b06a..2586c4bf0d 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -373,7 +373,7 @@ void LoadSkinItemToCache(TExtraCache *cEntry)
int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData *dat)
{
- int dbHidden = Clist_IsHidden(hContact); // default hidden state, always respect it.
+ int dbHidden = Contact_IsHidden(hContact); // default hidden state, always respect it.
// always hide subcontacts (but show them on embedded contact lists)
if (dat != nullptr && dat->bHideSubcontacts && cfg::dat.bMetaEnabled && db_mc_isSub(hContact))
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp
index 9d2c57df76..4fd2ba56f2 100644
--- a/plugins/KeyboardNotify/src/ignore.cpp
+++ b/plugins/KeyboardNotify/src/ignore.cpp
@@ -32,7 +32,7 @@ static DWORD GetMask(MCONTACT hContact)
if(hContact == NULL)
mask=0;
else {
- if (Clist_IsHidden(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
+ if (Contact_IsHidden(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
mask = g_plugin.getDword("Mask1", 0);
else
mask = g_plugin.getDword("Default1", 0);
diff --git a/plugins/KeyboardNotify/src/stdafx.h b/plugins/KeyboardNotify/src/stdafx.h
index cce961e02f..f68d0edfae 100644
--- a/plugins/KeyboardNotify/src/stdafx.h
+++ b/plugins/KeyboardNotify/src/stdafx.h
@@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <Uxtheme.h>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_options.h>
#include <m_icolib.h>
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 68c10c84f4..f758cf7c81 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -377,7 +377,7 @@ static INT_PTR onSetVis(WPARAM wparam, LPARAM)
static INT_PTR onHide(WPARAM wparam, LPARAM)
{
MCONTACT hContact = (MCONTACT)wparam;
- Clist_HideContact(hContact, !Clist_IsHidden(hContact));
+ Contact_Hide(hContact, !Contact_IsHidden(hContact));
return 0;
}
@@ -643,7 +643,7 @@ static int isIgnored(MCONTACT hContact, int type)
static INT_PTR onIgnore(WPARAM wparam, LPARAM lparam)
{
if (g_plugin.getByte("ignorehide", 0) && (lparam == IGNOREEVENT_ALL))
- Clist_HideContact(wparam, !isIgnored((MCONTACT)wparam, lparam));
+ Contact_Hide(wparam, !isIgnored((MCONTACT)wparam, lparam));
if (isIgnored(wparam, lparam))
Ignore_Allow(wparam, lparam);
@@ -696,7 +696,7 @@ static int BuildMenu(WPARAM wparam, LPARAM)
bEnabled = bShowAll || (flags & VF_HFL);
Menu_ShowItem(hmenuHide, bEnabled);
if (bEnabled) {
- if (Clist_IsHidden(hContact))
+ if (Contact_IsHidden(hContact))
Menu_ModifyItem(hmenuHide, LPGENW("Show in list"), IcoLib_GetIconHandle("miex_showil"));
else
Menu_ModifyItem(hmenuHide, LPGENW("Hide from list"), IcoLib_GetIconHandle("miex_hidefl"));
diff --git a/plugins/MenuItemEx/src/stdafx.h b/plugins/MenuItemEx/src/stdafx.h
index 7092a72bbf..701134cafd 100644
--- a/plugins/MenuItemEx/src/stdafx.h
+++ b/plugins/MenuItemEx/src/stdafx.h
@@ -9,6 +9,7 @@
#include <win2k.h>
#include <m_system.h>
#include <m_options.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_protosvc.h>
#include <m_langpack.h>
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index ac402cfab0..d529f38f89 100644
--- a/plugins/MirFox/src/MirfoxData.cpp
+++ b/plugins/MirFox/src/MirfoxData.cpp
@@ -616,7 +616,7 @@ void MirfoxData::initializeMirandaContacts()
for (auto &hContact : Contacts()){
//"Hidden" contacts not allowed in MirfoxData and SM, "NotOnList" contacts allowed and enabled
- if (Clist_IsHidden(hContact))
+ if (Contact_IsHidden(hContact))
continue;
//add to MirfoxData list
diff --git a/plugins/MirFox/src/MirfoxMiranda.cpp b/plugins/MirFox/src/MirfoxMiranda.cpp
index 015fecfc7f..bf13976d6b 100644
--- a/plugins/MirFox/src/MirfoxMiranda.cpp
+++ b/plugins/MirFox/src/MirfoxMiranda.cpp
@@ -127,7 +127,7 @@ void CMirfoxMiranda::onContactAdded_async(void* threadArg)
canAdd = false;
// execute
- if (canAdd && Clist_IsHidden(onContactAsyncThreadArgStruct->hContact))
+ if (canAdd && Contact_IsHidden(onContactAsyncThreadArgStruct->hContact))
canAdd = false;
// add
@@ -188,7 +188,7 @@ void CMirfoxMiranda::onContactSettingChanged_async(void* threadArg){
canAdd = false;
// edit
- if (canAdd && Clist_IsHidden(onContactAsyncThreadArgStruct->hContact))
+ if (canAdd && Contact_IsHidden(onContactAsyncThreadArgStruct->hContact))
canAdd = false;
if (canAdd)
diff --git a/plugins/MirFox/src/common.h b/plugins/MirFox/src/common.h
index 2334d4f1bf..b664accb69 100644
--- a/plugins/MirFox/src/common.h
+++ b/plugins/MirFox/src/common.h
@@ -8,7 +8,7 @@
// Miranda headers
#include <win2k.h>
#include <newpluginapi.h>
-#include <m_system.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_options.h>
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 1942853761..e30975cc82 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -1123,7 +1123,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
Event.hContact = NULL;
// Ignore events from hidden chatrooms, except for join events
- if (gce->pszID.w != nullptr && Clist_IsHidden(Event.hContact)) {
+ if (gce->pszID.w != nullptr && Contact_IsHidden(Event.hContact)) {
if (gce->iType == GC_EVENT_JOIN && pHistory)
pHistory->LUsers.push_back(toTstring(gce->pszNick.w));
@@ -1645,7 +1645,7 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam)
else if (!strcmp(dbcws->szModule, "CList")) {
if (!strcmp(dbcws->szSetting, "Hidden")) {
Event.eType = EVENT_CONTACT_HIDDEN;
- Event.iValue = Clist_IsHidden(hContact);
+ Event.iValue = Contact_IsHidden(hContact);
}
else if (!strcmp(dbcws->szSetting, "Group")) {
Event.eType = EVENT_CONTACT_GROUP;
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp
index 1331ef94e9..e50c5d57f8 100644
--- a/plugins/MirandaG15/src/CContactList.cpp
+++ b/plugins/MirandaG15/src/CContactList.cpp
@@ -202,12 +202,12 @@ bool CContactList::IsVisible(CContactListEntry *pEntry)
return true;
if (CConfig::GetBoolSetting(CLIST_USEIGNORE)) {
- if (Clist_IsHidden(pEntry->hHandle))
+ if (Contact_IsHidden(pEntry->hHandle))
return false;
if (db_mc_isSub(pEntry->hHandle)) {
MCONTACT hMetaContact = db_mc_getMeta(pEntry->hHandle);
- if (Clist_IsHidden(hMetaContact))
+ if (Contact_IsHidden(hMetaContact))
return false;
}
}
diff --git a/plugins/MirandaG15/src/CEventScreen.cpp b/plugins/MirandaG15/src/CEventScreen.cpp
index c307a5715b..324f508369 100644
--- a/plugins/MirandaG15/src/CEventScreen.cpp
+++ b/plugins/MirandaG15/src/CEventScreen.cpp
@@ -186,7 +186,7 @@ void CEventScreen::OnLCDButtonDown(int iButton)
char *szProto = GetContactProto(pEntry->hContact);
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(toTstring(szProto));
- if (pIRCCon && db_get_b(pEntry->hContact, szProto, "ChatRoom", 0) != 0 && Clist_IsHidden(pEntry->hContact))
+ if (pIRCCon && db_get_b(pEntry->hContact, szProto, "ChatRoom", 0) != 0 && Contact_IsHidden(pEntry->hContact))
return;
CAppletManager::GetInstance()->ActivateChatScreen(pEntry->hContact);
diff --git a/plugins/MirandaG15/src/StdAfx.h b/plugins/MirandaG15/src/StdAfx.h
index 29978e1e66..61fed0dbd1 100644
--- a/plugins/MirandaG15/src/StdAfx.h
+++ b/plugins/MirandaG15/src/StdAfx.h
@@ -17,6 +17,7 @@
using namespace std;
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_message.h>
#include <m_protosvc.h>
#include <m_database.h>
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 7754fd161e..ab6f591208 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -262,7 +262,7 @@ wchar_t* GetStr(STATUSMSGINFO *n, const wchar_t *tmplt)
bool SkipHiddenContact(MCONTACT hContact)
{
- return (!opt.HiddenContactsToo && Clist_IsHidden(hContact));
+ return (!opt.HiddenContactsToo && Contact_IsHidden(hContact));
}
void LogSMsgToDB(STATUSMSGINFO *smi, const wchar_t *tmplt)
diff --git a/plugins/NewXstatusNotify/src/stdafx.h b/plugins/NewXstatusNotify/src/stdafx.h
index af10c6de0a..48aec9fce8 100644
--- a/plugins/NewXstatusNotify/src/stdafx.h
+++ b/plugins/NewXstatusNotify/src/stdafx.h
@@ -38,6 +38,7 @@
#include <win2k.h>
#include <m_button.h>
#include <m_clc.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_genmenu.h>
#include <m_history.h>
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index 58c30723a1..0f13da626e 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -350,7 +350,7 @@ void ExtraStatusChanged(XSTATUSCHANGE *xsc)
mir_snprintf(buff, "%d", ID_STATUS_EXTRASTATUS);
if ((g_plugin.getByte(buff, 1) == 0)
|| (db_get_w(xsc->hContact, xsc->szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
- || (!opt.HiddenContactsToo && Clist_IsHidden(xsc->hContact))
+ || (!opt.HiddenContactsToo && Contact_IsHidden(xsc->hContact))
|| (Proto_GetStatus(xsc->szProto) == ID_STATUS_OFFLINE))
{
FreeXSC(xsc);
diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h
index e2ac1fcc5f..794d5dd4db 100644
--- a/plugins/SecureIM/src/commonheaders.h
+++ b/plugins/SecureIM/src/commonheaders.h
@@ -21,6 +21,7 @@
#include <win2k.h>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_protosvc.h>
#include <m_langpack.h>
diff --git a/plugins/SecureIM/src/crypt_check.cpp b/plugins/SecureIM/src/crypt_check.cpp
index fb9c691e6b..0b5116682d 100644
--- a/plugins/SecureIM/src/crypt_check.cpp
+++ b/plugins/SecureIM/src/crypt_check.cpp
@@ -96,7 +96,7 @@ bool isProtoSmallPackets(MCONTACT hContact)
bool isContactInvisible(MCONTACT hContact)
{
- if (!db_mc_isSub(hContact) && Clist_IsHidden(hContact))
+ if (!db_mc_isSub(hContact) && Contact_IsHidden(hContact))
return true;
pUinKey p = findUinKey(hContact);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index a4e37838ea..bf7c68f8e5 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -439,7 +439,7 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
if (Ignore_IsIgnored(hcontact, IGNOREEVENT_USERONLINE))
return;
- if (!g_plugin.getByte("UsePopups", 0) || !Clist_IsHidden(hcontact))
+ if (!g_plugin.getByte("UsePopups", 0) || !Contact_IsHidden(hcontact))
return;
DBVARIANT dbv;
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index e19a4f87ab..a6a715198e 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -289,7 +289,7 @@ void OffsetWindow(HWND parent, HWND hwnd, int dx, int dy)
int CheckContactVisibility(MCONTACT hContact)
{
- return db_mc_isSub(hContact) || !Clist_IsHidden(hContact);
+ return db_mc_isSub(hContact) || !Contact_IsHidden(hContact);
}
void RenameUserDefSession(int ses_count, wchar_t* ptszNewName)
diff --git a/plugins/Sessions/Src/stdafx.h b/plugins/Sessions/Src/stdafx.h
index 2d319c94f9..f365495e02 100644
--- a/plugins/Sessions/Src/stdafx.h
+++ b/plugins/Sessions/Src/stdafx.h
@@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <malloc.h>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_options.h>
#include <m_clc.h>
#include <m_utils.h>
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index 03928e69c5..f0cef53c39 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -272,7 +272,7 @@ bool ipcGetSortedContacts(THeaderIPC * ipch, int* pSlot, bool bGroupMode)
// is HIT on?
if (BST_UNCHECKED == g_plugin.getByte(SHLExt_UseHITContacts, BST_UNCHECKED)) {
// don't show people who are hidden, "NotOnList" or ignored
- if (Clist_IsHidden(hContact) ||
+ if (Contact_IsHidden(hContact) ||
db_get_b(hContact, "CList", "NotOnList", 0) == 1 ||
Ignore_IsIgnored(hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_FILE) != 0)
continue;
diff --git a/plugins/ShellExt/src/stdafx.h b/plugins/ShellExt/src/stdafx.h
index aaa7a751a2..16c08b3fc1 100644
--- a/plugins/ShellExt/src/stdafx.h
+++ b/plugins/ShellExt/src/stdafx.h
@@ -9,7 +9,7 @@
#include <stddef.h>
#include <newpluginapi.h>
-#include <m_system.h>
+#include <m_contacts.h>
#include <m_protocols.h>
#include <m_protosvc.h>
#include <m_file.h>
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index 1e85e029a9..f45d88aaa3 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -101,7 +101,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
// Hide the contact until verified if option set.
if (g_plugin.getByte("HideUnverified", defaultHideUnverified))
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
// Fetch the incoming message body
char *msgblob;
@@ -145,7 +145,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
if (bCorrectResponse) {
g_plugin.setByte(hContact, "Verified", 1);
if (g_plugin.getByte("HideUnverified", defaultHideUnverified))
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
if (g_plugin.getByte("AddPermanently", defaultAddPermanently))
db_unset(hContact, "CList", "NotOnList");
db_unset(hContact, "CList", "Delete");
@@ -210,7 +210,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
{
g_plugin.setByte(hContact, "Verified", 1);
if (g_plugin.getByte("HideUnverified", defaultHideUnverified))
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
if (g_plugin.getByte("AddPermanently", defaultAddPermanently))
db_unset(hContact, "CList", "NotOnList");
db_unset(hContact, "CList", "Delete");
@@ -313,7 +313,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
_notify(hContact, POPUP_APPROVED, TranslateT("Contact %s approved."), message);
g_plugin.setByte(hContact, "Verified", 1);
if (g_plugin.getByte("HideUnverified", defaultHideUnverified))
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
if (g_plugin.getByte("AddPermanently", defaultAddPermanently))
db_unset(hContact, "CList", "NotOnList");
db_unset(hContact, "CList", "Delete");
diff --git a/plugins/Spamotron/src/stdafx.h b/plugins/Spamotron/src/stdafx.h
index 87ceb09808..b587286647 100644
--- a/plugins/Spamotron/src/stdafx.h
+++ b/plugins/Spamotron/src/stdafx.h
@@ -6,6 +6,7 @@
#include <time.h>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_system.h>
#include <m_utils.h>
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp
index 6d0c8e937c..bab6eb4db1 100755
--- a/plugins/StopSpamMod/src/stopspam.cpp
+++ b/plugins/StopSpamMod/src/stopspam.cpp
@@ -44,7 +44,7 @@ int OnDbEventAdded(WPARAM hContact, LPARAM hDbEvent)
// ...send message
if (gbHideContacts)
- Clist_HideContact(hcntct);
+ Contact_Hide(hcntct);
if (gbSpecialGroup)
Clist_SetGroup(hcntct, gbSpammersGroup.c_str());
BYTE msg = 1;
@@ -156,7 +156,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
if (answered) {
// unhide contact
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
g_plugin.delSetting(hContact, "MathAnswer");
@@ -270,7 +270,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
}
}
if (gbHideContacts)
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
if (gbSpecialGroup)
Clist_SetGroup(hContact, gbSpammersGroup.c_str());
db_set_b(hContact, "CList", "NotOnList", 1);
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index 27c44c374b..a854f547a0 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -34,7 +34,7 @@ int OnDbEventAdded(WPARAM, LPARAM lParam)
CallProtoService(dbei.szModule, PS_AUTHDENY, hDbEvent, (LPARAM)_T2A(variables_parse(g_sets.getReply(), hcntct).c_str()));
db_set_b(hcntct, "CList", "NotOnList", 1);
- Clist_HideContact(hcntct);
+ Contact_Hide(hcntct);
if (!g_sets.HistLog)
db_event_delete(0, hDbEvent);
return 1;
@@ -105,7 +105,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
// if message equal right answer...
if (g_sets.AnswNotCaseSens ? !mir_wstrcmpi(message.c_str(), answer.c_str()) : !mir_wstrcmp(message.c_str(), answer.c_str())) {
// unhide contact
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
// mark contact as Answered
g_plugin.setByte(hContact, DB_KEY_ANSWERED, 1);
@@ -147,7 +147,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
// hide contact from contact list
db_set_b(hContact, "CList", "NotOnList", 1);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
// save message from contact
dbei->flags |= DBEF_READ;
diff --git a/plugins/StopSpamPlus/src/stdafx.h b/plugins/StopSpamPlus/src/stdafx.h
index c3b187c5dc..2574ed6da7 100644
--- a/plugins/StopSpamPlus/src/stdafx.h
+++ b/plugins/StopSpamPlus/src/stdafx.h
@@ -10,6 +10,7 @@
#include <list>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_protosvc.h>
#include <m_options.h>
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index c92e11d842..3fce611e01 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -309,8 +309,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
if (bHighlight) {
gce->iType |= GC_EVENT_HIGHLIGHT;
params->sound = "ChatHighlight";
- if (Clist_IsHidden(si->hContact) != 0)
- Clist_HideContact(si->hContact, false);
+ if (Contact_IsHidden(si->hContact) != 0)
+ Contact_Hide(si->hContact, false);
if (params->bInactive) {
bFlagUnread = true;
DoTrayIcon(si, gce);
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 2a4f630dbb..5314e2d912 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -81,7 +81,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
void TN_TypingMessage(MCONTACT hContact, int iMode)
{
// hidden & ignored contacts check
- if (Clist_IsHidden(hContact) || (db_get_dw(hContact, "Ignore", "Mask1", 0) & 1)) // 9 - online notification
+ if (Contact_IsHidden(hContact) || (db_get_dw(hContact, "Ignore", "Mask1", 0) & 1)) // 9 - online notification
return;
if (Disabled)
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index b8349415b9..fd47f107a4 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -203,7 +203,7 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam)
idle = true;
else return 0;
- if (Clist_IsHidden(hContact))
+ if (Contact_IsHidden(hContact))
return 0;
const char *pszProto = cws->szModule;
diff --git a/plugins/TooltipNotify/src/stdafx.h b/plugins/TooltipNotify/src/stdafx.h
index cd67137e26..2edef92a43 100644
--- a/plugins/TooltipNotify/src/stdafx.h
+++ b/plugins/TooltipNotify/src/stdafx.h
@@ -15,6 +15,7 @@
#include <newpluginapi.h>
#include <m_clistint.h>
+#include <m_contacts.h>
#include <m_skin.h>
#include <m_database.h>
#include <m_ignore.h>
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 2ab71be4a1..6a02c83877 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -523,7 +523,7 @@ static bool CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNoti
static void CheckContact(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer = nullptr)
{
// ignore meta subcontacts here as their birthday information are collected explicitly
- if (hContact && (!gRemindOpts.bCheckVisibleOnly || !Clist_IsHidden(hContact)) && !db_mc_isSub(hContact)) {
+ if (hContact && (!gRemindOpts.bCheckVisibleOnly || !Contact_IsHidden(hContact)) && !db_mc_isSub(hContact)) {
CEvent ca;
if (CheckBirthday(hContact, Now, ca, bNotify, LastAnwer) || CheckAnniversaries(hContact, Now, ca, bNotify)) {
diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp
index 638b6d31fd..9fc1ac1aaf 100644
--- a/plugins/WhenWasIt/src/hooked_events.cpp
+++ b/plugins/WhenWasIt/src/hooked_events.cpp
@@ -91,7 +91,7 @@ int RefreshContactListIcons(MCONTACT hContact)
if (hContact == 0)
return 0;
- bool hidden = Clist_IsHidden(hContact);
+ bool hidden = Contact_IsHidden(hContact);
int ignored = db_get_dw(hContact, "Ignore", "Mask1", 0);
ignored = ((ignored & 0x3f) != 0) ? 1 : 0;
int ok = 1;
diff --git a/plugins/mRadio/i_myservice.inc b/plugins/mRadio/i_myservice.inc
index d53663c024..5c89c674c6 100644
--- a/plugins/mRadio/i_myservice.inc
+++ b/plugins/mRadio/i_myservice.inc
@@ -283,8 +283,6 @@ begin
if result<>0 then
begin
Proto_AddToContact(result,PluginName);
- //
-// DBWriteByte(result,strCList,'Hidden' ,0);
DBWriteByte(result,strCList,'NotOnList',1);
// URL
DBWriteUnicode(result,PluginName,optStationURL,@buf);
diff --git a/plugins/mRadio/i_search.inc b/plugins/mRadio/i_search.inc
index 6bb67cd658..bd5be91a25 100644
--- a/plugins/mRadio/i_search.inc
+++ b/plugins/mRadio/i_search.inc
@@ -1,90 +1,5 @@
{search station code}
-(*
-procedure SetAvatar(hContact:THANDLE);
-var
- success:boolean;
- fname:pAnsiChar;
- url:pWideChar;
- buf,buf1,buf2:array [0..MAX_PATH-1] of AnsiChar;
- ext:array [0..15] of AnsiChar;
- section:pAnsiChar;
- pc:pAnsiChar;
- i:integer;
-begin
- // get url
- url:=DBReadUnicode(hContact,PluginName,optStationURL);
- // translate to Ansi
- FastWideToAnsiBuf(url,buf);
- mFreeMem(url);
-
- // search in INI
- i:=GetFSize(storage);
- if i=0 then
- i:=32767;
- mGetMem(pc,i+1);
- pc^:=#0;
- GetPrivateProfileSectionNamesA(pc,i,storage);
- section:=pc;
-
- while section^<>#0 do
- begin
- GetPrivateProfileStringA(section,'URL','',buf1,SizeOf(buf1),storage);
- if StrCmp(@buf,@buf1)=0 then
- break;
- while section^<>#0 do inc(section);
- inc(section);
- end;
- mFreeMem(pc);
-
- if section^<>#0 then
- begin
- // get avatar link
- buf[0]:=#0;
- GetPrivateProfileStringA(section,'Avatar','',buf,SizeOf(buf),storage);
-
- if buf[0]<>#0 then
- begin
- // Here we trying to get Avatar chache directory
- // (create it if needs)
- // and copy (load) owr avatars there
- // in : buf = source avatar path
- // out: fname = destination (file name in cache)
- // rule for name is?..
-
-
- if StrPos(buf,'://')=nil then
- begin
- fname:=@buf;
- success:=FileExists(fname);
- // need to copy this file to avatar cache
- end
- else
- begin
- // download file
-{
- GetTempPathA(MAX_PATH,pAnsiChar(@buf1));
- pc:=extract(pAnsiChar(@buf),true);
- StrCat(pAnsiChar(@buf1),pc);
- mFreeMem(pc);
-}
- //mrAvt
-
- GetExt(pAnsiChar(@buf),pAnsiChar(@ext));
- GetTempPathA(MAX_PATH,pAnsiChar(@buf2));
- GetTempFileNameA(pAnsiChar(@buf2),'mrAvt',GetCurrentTime,pAnsiChar(@buf1));
- ChangeExt(pAnsiChar(@buf1),PAnsiChar(@ext));
- //
- fname:=@buf1;
- success:=GetFile(pAnsiChar(@buf),fname);
- end;
-
- if success then
- CallService(MS_AV_SETAVATAR,hContact,LPARAM(fname));
- end;
- end;
-end;
-*)
type
TMySearchFilter = record
lStation,
@@ -239,11 +154,10 @@ begin
with filter do
begin
-// CallService(MS_UTILS_PATHTOABSOLUTE,TWPARAM(@ini1),TLPARAM(@ini));
lBitrate:=GetDlgItemInt(wnd,IDC_BITRATE,ltmp,false);
if IsDlgButtonChecked(wnd,IDC_LT)=BST_CHECKED then lBitrateMode:=-1
else if IsDlgButtonChecked(wnd,IDC_EQ)=BST_CHECKED then lBitrateMode:=0
- else{if IsDlgButtonChecked(lParam,IDC_GT)=BST_CHECKED} lBitrateMode:=1;
+ else lBitrateMode:=1;
lStation:=GetDlgText(wnd,IDC_STATION,true);
if lStation<>nil then
@@ -326,16 +240,6 @@ type
y:word;
cx:word;
cy:word;
-{
- sz_Or_Ord menu;
- sz_Or_Ord windowClass;
- title:array [0..titleLen] of WideChar;
- pointsize:word;
- weight:word;
- italic:byte;
- charset:byte;
- typeface:array [0..stringLen] of WideChar;
-}
end;
var
@@ -378,25 +282,6 @@ begin
if lurl<>nil then
begin
-{
-// find contact
- hContact:=db_find_first(PluginName);
- while hContact<>0 do
- begin
- p:=DBReadString(hContact,PluginName,optStationURL);
- l:=StrCmp(p,lurl)=0;
- mFreeMem(p);
- if l then
- begin
- db_unset(hContact,strCList,'NotOnList');
- db_unset(hContact,strCList,'Hidden');
- result:=hContact;
- exit;
- end;
- hContact:=db_find_next(hContact,PluginName);
- end;
-// if not found
-}
hContact:=db_add_contact();
if hContact<>0 then
begin
@@ -429,8 +314,6 @@ begin
SetStatus(hContact,ID_STATUS_OFFLINE);
-// SetAvatar(hContact);
-
Ignore_Ignore(hContact,IGNOREEVENT_USERONLINE);
result:=hContact;
end;
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp
index 778d2763b5..50c5ee03fd 100644
--- a/plugins/wbOSD/src/events.cpp
+++ b/plugins/wbOSD/src/events.cpp
@@ -117,7 +117,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam)
logmsg("ContactStatusChanged2");
- if (db_get_b(hContact, "CList", "NotOnList", 0) || Clist_IsHidden(hContact) || (Ignore_IsIgnored(wParam, IGNOREEVENT_USERONLINE) && newStatus == ID_STATUS_ONLINE))
+ if (db_get_b(hContact, "CList", "NotOnList", 0) || Contact_IsHidden(hContact) || (Ignore_IsIgnored(wParam, IGNOREEVENT_USERONLINE) && newStatus == ID_STATUS_ONLINE))
return 0;
wchar_t bufferW[512];
diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h
index 0f029ab5f0..2443ce67ca 100644
--- a/plugins/wbOSD/src/stdafx.h
+++ b/plugins/wbOSD/src/stdafx.h
@@ -14,6 +14,7 @@ Distributed under GNU's GPL 2 or later
#include <commctrl.h>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_langpack.h>
#include <m_database.h>
#include <m_options.h>
diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp
index 8d1f584fe4..cab7874fbd 100644
--- a/protocols/Discord/src/groupchat.cpp
+++ b/protocols/Discord/src/groupchat.cpp
@@ -82,7 +82,7 @@ void CDiscordProto::Chat_SendPrivateMessage(GCHOOK *gch)
setId(hContact, DB_KEY_ID, userId);
setId(hContact, DB_KEY_CHANNELID, _wtoi64(gch->ptszID));
setWString(hContact, "Nick", gch->ptszNick);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
else hContact = pUser->hContact;
diff --git a/protocols/Discord/src/stdafx.h b/protocols/Discord/src/stdafx.h
index 7f23c5d300..fe0f33691c 100644
--- a/protocols/Discord/src/stdafx.h
+++ b/protocols/Discord/src/stdafx.h
@@ -21,6 +21,7 @@
#include <newpluginapi.h>
#include <m_chat_int.h>
#include <m_clist.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_folders.h>
#include <m_history.h>
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp
index 6fc7b953cf..5806991b23 100644
--- a/protocols/Dummy/src/dummy_proto.cpp
+++ b/protocols/Dummy/src/dummy_proto.cpp
@@ -154,11 +154,11 @@ MCONTACT CDummyProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
Proto_AddToContact(hContact, m_szModuleName);
if (flags & PALF_TEMPORARY) {
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
db_set_b(hContact, "CList", "NotOnList", 1);
}
else if (db_get_b(hContact, "CList", "NotOnList", 0)) {
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
db_unset(hContact, "CList", "NotOnList");
}
setWString(hContact, uniqueIdSetting, psr->id.w);
diff --git a/protocols/Dummy/src/stdafx.h b/protocols/Dummy/src/stdafx.h
index 3655b635ae..0b5ef8d72d 100644
--- a/protocols/Dummy/src/stdafx.h
+++ b/protocols/Dummy/src/stdafx.h
@@ -31,6 +31,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_contacts.h>
#include <m_database.h>
#include <m_extraicons.h>
#include <m_file.h>
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp
index 27a3d9508e..2f72daf65d 100644
--- a/protocols/EmLanProto/src/mlan.cpp
+++ b/protocols/EmLanProto/src/mlan.cpp
@@ -207,7 +207,7 @@ MCONTACT CMLan::FindContact(in_addr addr, const char *nick, bool add_to_list, bo
if (make_permanent)
db_unset(res, "CList", "NotOnList");
if (make_visible)
- Clist_HideContact(res, false);
+ Contact_Hide(res, false);
return res;
}
}
@@ -221,7 +221,7 @@ MCONTACT CMLan::FindContact(in_addr addr, const char *nick, bool add_to_list, bo
if (!make_permanent)
db_set_b(res, "CList", "NotOnList", 1);
if (!make_visible)
- Clist_HideContact(res);
+ Contact_Hide(res);
g_plugin.setWord(res, "Status", status);
return res;
@@ -340,7 +340,7 @@ void CMLan::OnRecvPacket(u_char *mes, int len, in_addr from)
void CMLan::RecvMessageUrl(CCSDATA *ccs)
{
- Clist_HideContact(ccs->hContact, false);
+ Contact_Hide(ccs->hContact, false);
PROTORECVEVENT *pre = (PROTORECVEVENT*)ccs->lParam;
ptrA szMessage(mir_utf8encode(pre->szMessage));
@@ -924,7 +924,7 @@ void CMLan::RecvFile(CCSDATA *ccs)
{
PROTORECVEVENT *pre = (PROTORECVEVENT *)ccs->lParam;
- Clist_HideContact(ccs->hContact, false);
+ Contact_Hide(ccs->hContact, false);
char *szFile = pre->szMessage + sizeof(DWORD);
char *szDesc = szFile + mir_strlen(szFile) + 1;
diff --git a/protocols/EmLanProto/src/stdafx.h b/protocols/EmLanProto/src/stdafx.h
index 550e2dfaf3..527a5b57c2 100644
--- a/protocols/EmLanProto/src/stdafx.h
+++ b/protocols/EmLanProto/src/stdafx.h
@@ -12,6 +12,7 @@
#include <prsht.h>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_options.h>
#include <m_protosvc.h>
#include <m_database.h>
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index 3c42865fe2..4c03674cb1 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -234,7 +234,7 @@ MCONTACT FacebookProto::AddToContactList(facebook_user* fbu, bool force_add, boo
if (hContact) {
// Save these values only when adding new contact, not when updating existing
if (add_temporarily) {
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
db_set_b(hContact, "CList", "NotOnList", 1);
}
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 12b5f3c80f..dc9655839b 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -282,7 +282,7 @@ MCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
// Reset NotOnList flag if present and we're adding this contact not temporarily
if (hContact && !add_temporarily && db_get_b(hContact, "CList", "NotOnList", 0)) {
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
db_unset(hContact, "CList", "NotOnList");
}
diff --git a/protocols/FacebookRM/src/stdafx.h b/protocols/FacebookRM/src/stdafx.h
index 75241dfa99..67cec1b4d3 100644
--- a/protocols/FacebookRM/src/stdafx.h
+++ b/protocols/FacebookRM/src/stdafx.h
@@ -41,6 +41,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_contacts.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 3a2644f0b6..4e3135be50 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1317,7 +1317,7 @@ int GaduProto::dbsettingchanged(WPARAM hContact, LPARAM lParam)
// If not on list changed
if (!strcmp(cws->szSetting, "NotOnList"))
{
- if (Clist_IsHidden(hContact))
+ if (Contact_IsHidden(hContact))
return 0;
// Notify user normally this time if added to the list permanently
@@ -1461,7 +1461,7 @@ MCONTACT GaduProto::getcontact(uin_t uin, int create, int inlist, wchar_t *szNic
if ((uin_t)getDword(hContact, GG_KEY_UIN, 0) == uin && !isChatRoom(hContact)) {
if (inlist) {
db_unset(hContact, "CList", "NotOnList");
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
return hContact;
}
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h
index 5f88e07527..2da3bbb811 100644
--- a/protocols/Gadu-Gadu/src/gg.h
+++ b/protocols/Gadu-Gadu/src/gg.h
@@ -43,7 +43,7 @@
// Miranda NG headers
#include <newpluginapi.h>
-#include <m_system.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_netlib.h>
#include <m_protocols.h>
diff --git a/protocols/ICQ-WIM/src/groupchats.cpp b/protocols/ICQ-WIM/src/groupchats.cpp
index c0f477b122..7d6f991a3d 100644
--- a/protocols/ICQ-WIM/src/groupchats.cpp
+++ b/protocols/ICQ-WIM/src/groupchats.cpp
@@ -258,7 +258,7 @@ void CIcqProto::Chat_SendPrivateMessage(GCHOOK *gch)
if (pCache == nullptr) {
hContact = CreateContact(gch->ptszUID, true);
setWString(hContact, "Nick", gch->ptszNick);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
else hContact = pCache->m_hContact;
diff --git a/protocols/ICQ-WIM/src/ignore.cpp b/protocols/ICQ-WIM/src/ignore.cpp
index cdf83cc517..3fcddcad13 100644
--- a/protocols/ICQ-WIM/src/ignore.cpp
+++ b/protocols/ICQ-WIM/src/ignore.cpp
@@ -50,7 +50,7 @@ void CIcqProto::ProcessPermissions(const JSONNode &ev)
auto *p = FindContactByUIN(wszId);
if (p == nullptr) {
auto hContact = CreateContact(wszId, false);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
p = FindContactByUIN(wszId);
}
p->m_iApparentMode = ID_STATUS_OFFLINE;
diff --git a/protocols/ICQ-WIM/src/stdafx.h b/protocols/ICQ-WIM/src/stdafx.h
index 1e08c2f1b7..22d32fa2db 100644
--- a/protocols/ICQ-WIM/src/stdafx.h
+++ b/protocols/ICQ-WIM/src/stdafx.h
@@ -48,6 +48,7 @@
#include <m_avatars.h>
#include <m_chat_int.h>
#include <m_clistint.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_gui.h>
#include <m_idle.h>
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp
index 6aeebfe8f5..ad23549195 100644
--- a/protocols/ICQCorp/src/protocol.cpp
+++ b/protocols/ICQCorp/src/protocol.cpp
@@ -1257,7 +1257,7 @@ ICQUser* ICQ::addUser(unsigned int uin, bool persistent)
if (u->dwUIN == uin) {
if (persistent) {
db_unset(u->hContact, "CList", "NotOnList");
- Clist_HideContact(u->hContact, false);
+ Contact_Hide(u->hContact, false);
}
return u;
}
@@ -1275,7 +1275,7 @@ ICQUser* ICQ::addUser(unsigned int uin, bool persistent)
getUserInfo(u, true);
else {
db_set_b(u->hContact, "CList", "NotOnList", 1);
- Clist_HideContact(u->hContact);
+ Contact_Hide(u->hContact);
}
updateContactList();
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp
index a33c243606..76995ff9ef 100644
--- a/protocols/ICQCorp/src/services.cpp
+++ b/protocols/ICQCorp/src/services.cpp
@@ -189,7 +189,7 @@ static INT_PTR icqRecvMessage(WPARAM, LPARAM lParam)
Netlib_Logf(hNetlibUser, "[ ] receive message\n");
CCSDATA *ccs = (CCSDATA*)lParam;
- Clist_HideContact(ccs->hContact, false);
+ Contact_Hide(ccs->hContact, false);
PROTORECVEVENT *pre = (PROTORECVEVENT*)ccs->lParam;
ptrA szMsg(mir_utf8encode(pre->szMessage));
@@ -362,7 +362,7 @@ static INT_PTR icqRecvFile(WPARAM, LPARAM lParam)
Netlib_Logf(hNetlibUser, "[ ] receive file\n");
CCSDATA *ccs = (CCSDATA *)lParam;
- Clist_HideContact(ccs->hContact, false);
+ Contact_Hide(ccs->hContact, false);
PROTORECVEVENT *pre = (PROTORECVEVENT *)ccs->lParam;
char *szFile = pre->szMessage + sizeof(DWORD);
diff --git a/protocols/ICQCorp/src/stdafx.h b/protocols/ICQCorp/src/stdafx.h
index f32175904f..fb733d654a 100644
--- a/protocols/ICQCorp/src/stdafx.h
+++ b/protocols/ICQCorp/src/stdafx.h
@@ -28,7 +28,7 @@
#include <time.h>
#include <newpluginapi.h>
-#include <m_system.h>
+#include <m_contacts.h>
#include <m_protosvc.h>
#include <m_langpack.h>
#include <m_database.h>
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp
index 43011ce264..5c16b03065 100644
--- a/protocols/IRCG/src/clist.cpp
+++ b/protocols/IRCG/src/clist.cpp
@@ -31,7 +31,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMStringW& name, const CMStringW& hostmas
CONTACT usertemp = { name, nullptr, nullptr, false, false, true };
MCONTACT hc = CList_FindContact(&usertemp);
- if (hc && db_get_b(hc, "CList", "NotOnList", 0) == 0 && Clist_IsHidden(hc) == 0)
+ if (hc && db_get_b(hc, "CList", "NotOnList", 0) == 0 && Contact_IsHidden(hc) == 0)
bFlag = true;
CMStringW contactname = name; contactname += DCCSTRING;
@@ -90,7 +90,7 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
if (InList)
db_unset(hContact, "CList", "NotOnList");
setWString(hContact, "Nick", user->name);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
if (SetOnline && getWord(hContact, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
setWord(hContact, "Status", ID_STATUS_ONLINE);
return hContact;
@@ -105,7 +105,7 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
db_unset(hContact, "CList", "NotOnList");
else
db_set_b(hContact, "CList", "NotOnList", 1);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
setWString(hContact, "Nick", user->name);
setWString(hContact, "Default", user->name);
setWord(hContact, "Status", SetOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE);
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index c21cdc0e65..014b34b2c5 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -146,7 +146,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD)
continue;
BYTE bDCC = ppro->getByte(hContact, "DCC", 0);
- bool bHidden = Clist_IsHidden(hContact);
+ bool bHidden = Contact_IsHidden(hContact);
if (bDCC || bHidden)
continue;
if (ppro->getWString(hContact, "Default", &dbv))
@@ -691,7 +691,7 @@ bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage *pmsg)
if ((m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'q'))) {
MCONTACT hContact = CList_FindContact(&user);
- if (!hContact || (hContact && Clist_IsHidden(hContact)))
+ if (!hContact || (hContact && Contact_IsHidden(hContact)))
return true;
}
@@ -1063,7 +1063,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage *pmsg)
MCONTACT hContact = CList_FindContact(&user);
// check if it should be ignored
- if (m_DCCChatIgnore == 1 || m_DCCChatIgnore == 2 && hContact && db_get_b(hContact, "CList", "NotOnList", 0) == 0 && !Clist_IsHidden(hContact)) {
+ if (m_DCCChatIgnore == 1 || m_DCCChatIgnore == 2 && hContact && db_get_b(hContact, "CList", "NotOnList", 0) == 0 && !Contact_IsHidden(hContact)) {
CMStringW host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
CList_AddDCCChat(pmsg->prefix.sNick, host, dwAdr, iPort); // add a CHAT event to the clist
}
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 402d007463..915ef15c64 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -330,7 +330,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, const TiXmlElement *
else
Chat_Control(m_szModuleName, wszRoomJid, SESSION_OFFLINE);
- Clist_HideContact(item->hContact, false);
+ Contact_Hide(item->hContact, false);
item->bChatActive = false;
if (m_bJabberOnline) {
@@ -1346,7 +1346,7 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co
if (r)
ppro->setWord(hContact, "Status", r->m_iStatus);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
ppro->setUString(hContact, "Nick", nick);
db_set_dw(hContact, "Ignore", "Mask1", 0);
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index 8aac09a5cc..5acd5913c6 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -151,7 +151,7 @@ void __cdecl CJabberProto::OnAddContactForever(MCONTACT hContact)
SendGetVcard(hContact);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index 686e531a28..3859b35fa8 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -257,7 +257,7 @@ BOOL CJabberProto::OnRosterPushRequest(const TiXmlElement*, CJabberIqInfo *pInfo
UpdateSubscriptionInfo(item->hContact, item);
}
else if (isChatRoom(item->hContact))
- Clist_HideContact(item->hContact, false);
+ Contact_Hide(item->hContact, false);
else
UpdateSubscriptionInfo(item->hContact, item);
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index c15d6cc78b..ea41d5eaa4 100755
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -431,7 +431,7 @@ void CJabberProto::OnIqResultGetRoster(const TiXmlElement *iqNode, CJabberIqInfo
if (char *p = strchr(wszTitle, '@')) *p = 0;
Chat_NewSession(GCW_CHATROOM, m_szModuleName, Utf2T(jid), Utf2T(wszTitle));
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
chatRooms.insert((HANDLE)hContact);
}
else UpdateSubscriptionInfo(hContact, item);
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 736e60e854..c5f2534707 100755
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -46,7 +46,7 @@ void CJabberProto::AddContactToRoster(const char *jid, const char *nick, const c
void CJabberProto::DBAddAuthRequest(const char *jid, const char *nick)
{
MCONTACT hContact = DBCreateContact(jid, nick, true, true);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
DB_AUTH_BLOB blob(hContact, nick, nullptr, nullptr, jid, nullptr);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index bdca637d77..5e31b10f3d 100755
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -358,7 +358,7 @@ MCONTACT CJabberProto::AddToListByJID(const char *newJid, DWORD flags)
MCONTACT hContact = DBCreateContact(newJid, nullptr, true, false);
if (flags & PALF_TEMPORARY)
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
return hContact;
}
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 54a751bc27..9516d5e02a 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -524,7 +524,7 @@ void CMsnProto::MSN_ProcessYFind(char* buf, size_t len)
MSN_AddUser(hContact, szEmail, netId, LIST_PL + LIST_REMOVE);
MSN_AddUser(hContact, szEmail, netId, LIST_BL + LIST_REMOVE);
MSN_AddUser(hContact, szEmail, netId, LIST_AL);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
MSN_SetContactDb(hContact, szEmail);
}
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp
index 46e96c72c3..863a8e99f3 100644
--- a/protocols/MSN/src/msn_contact.cpp
+++ b/protocols/MSN/src/msn_contact.cpp
@@ -80,7 +80,7 @@ void CMsnProto::MSN_SetContactDb(MCONTACT hContact, const char *szEmail)
if (listId & LIST_FL) {
if (db_get_b(hContact, "CList", "NotOnList", 0) == 1) {
db_unset(hContact, "CList", "NotOnList");
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
if (listId & (LIST_BL | LIST_AL)) {
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 56fa7c818b..fd78f32d77 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -195,17 +195,17 @@ MCONTACT CMsnProto::AddToListByEmail(const char *email, const char *nick, DWORD
if (flags & PALF_TEMPORARY) {
if (db_get_b(hContact, "CList", "NotOnList", 0) == 1)
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
}
else {
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
if (msnLoggedIn) {
int netId = strncmp(email, "tel:", 4) ? NETID_MSN : NETID_MOB;
if (MSN_AddUser(hContact, email, netId, LIST_FL)) {
MSN_AddUser(hContact, email, netId, LIST_PL + LIST_REMOVE);
MSN_AddUser(hContact, email, netId, LIST_BL + LIST_REMOVE);
MSN_AddUser(hContact, email, netId, LIST_AL);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
MSN_SetContactDb(hContact, email);
@@ -660,7 +660,7 @@ MEVENT CMsnProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
char tEmail[MSN_MAX_EMAIL_LEN];
if (!db_get_static(hContact, m_szModuleName, "wlid", tEmail, sizeof(tEmail)) || !db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail)))
if (Lists_IsInList(LIST_FL, tEmail) && db_get_b(hContact, "MetaContacts", "IsSubcontact", 0) == 0)
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
return CSuper::RecvMsg(hContact, pre);
}
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp
index 6e84d40ea2..ec8fee4c9a 100644
--- a/protocols/MSN/src/msn_soapab.cpp
+++ b/protocols/MSN/src/msn_soapab.cpp
@@ -917,7 +917,7 @@ bool CMsnProto::MSN_ABRefreshClist(unsigned int nTry)
else
delSetting(hContact, "Nick");
if (mir_strcmpi(ezxml_txt(ezxml_child(pers, "onHideList")), "true") == 0)
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
setString(hContact, "ID", ezxml_txt(ezxml_child(pers, "id")));
SetAbParam(hContact, "CID", cid);
diff --git a/protocols/NewsAggregator/Src/Options.cpp b/protocols/NewsAggregator/Src/Options.cpp
index c6e1967edc..9f902c52b2 100644
--- a/protocols/NewsAggregator/Src/Options.cpp
+++ b/protocols/NewsAggregator/Src/Options.cpp
@@ -880,9 +880,9 @@ bool COptionsMain::OnApply()
if (mir_wstrcmp(dbNick, nick) == 0) {
g_plugin.setByte(hContact, "CheckState", m_feeds.GetCheckState(i));
if (!m_feeds.GetCheckState(i))
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
else
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
}
}
diff --git a/protocols/NewsAggregator/Src/stdafx.h b/protocols/NewsAggregator/Src/stdafx.h
index e2af12c08c..e583659595 100644
--- a/protocols/NewsAggregator/Src/stdafx.h
+++ b/protocols/NewsAggregator/Src/stdafx.h
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA.
// Miranda header files
#include <newpluginapi.h>
#include <m_clist.h>
+#include <m_contacts.h>
#include <m_langpack.h>
#include <m_options.h>
#include <m_protosvc.h>
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp
index 7feebbafc2..ca657be854 100644
--- a/protocols/Sametime/src/sametime_proto.cpp
+++ b/protocols/Sametime/src/sametime_proto.cpp
@@ -170,7 +170,7 @@ int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILE* pre)
{
debugLogW(L"CSametimeProto::RecvFile() hContact=[%x]", hContact);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
db_unset(hContact, "CList", "NotOnList");
return CSuper::RecvFile(hContact, pre);
@@ -180,7 +180,7 @@ MEVENT CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
debugLogW(L"CSametimeProto::RecvMsg() hContact=[%x]", hContact);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
db_unset(hContact, "CList", "NotOnList");
return CSuper::RecvMsg(hContact, pre);
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp
index ea482a1122..0ebbce3d22 100644
--- a/protocols/Sametime/src/userlist.cpp
+++ b/protocols/Sametime/src/userlist.cpp
@@ -70,7 +70,7 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
}
else if (!temporary) {
db_unset(hContact, "CList", "NotOnList");
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
@@ -105,11 +105,11 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
if (temporary) {
db_set_b(hContact, "CList", "NotOnList", 1);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
}
else {
db_unset(hContact, "CList", "NotOnList");
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
return hContact;
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index cfc268094f..70039c6853 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -107,7 +107,7 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
if (hContact == NULL) {
hContact = AddContact(user_id, true);
setWord(hContact, "Status", ID_STATUS_ONLINE);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
setWString(hContact, "Nick", gch->ptszUID);
}
CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index 2060eac5ab..c8a63041a7 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -280,7 +280,7 @@ void CSkypeProto::OnBlockContact(const NETLIBHTTPREQUEST *response, void *p)
{
MCONTACT hContact = (DWORD_PTR)p;
if (response != nullptr)
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
}
INT_PTR CSkypeProto::UnblockContact(WPARAM hContact, LPARAM)
@@ -295,6 +295,6 @@ void CSkypeProto::OnUnblockContact(const NETLIBHTTPREQUEST *response, void *p)
return;
MCONTACT hContact = (DWORD_PTR)p;
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
delSetting(hContact, "IsBlocked");
}
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 9a06c9b164..21c3d3448f 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -1500,7 +1500,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType)
hContact, wszType.c_str(),
(int)m_vkOptions.bShowVkDeactivateEvents,
(int)getBool(hContact, "ShowVkDeactivateEvents", true),
- (int)(!Clist_IsHidden(hContact)));
+ (int)(!Contact_IsHidden(hContact)));
CVKDeactivateEvent vkDeactivateEvent[] = {
{ L"", Translate("User restored control over own page") },
@@ -1528,7 +1528,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType)
(
m_vkOptions.bShowVkDeactivateEvents
&& getBool(hContact, "ShowVkDeactivateEvents", true)
- && (!Clist_IsHidden(hContact))
+ && (!Contact_IsHidden(hContact))
) ? 0 : DBEF_READ);
db_event_add(hContact, &dbei);
}
diff --git a/protocols/VKontakte/src/stdafx.h b/protocols/VKontakte/src/stdafx.h
index d55c2bd606..ae34ce87d8 100644
--- a/protocols/VKontakte/src/stdafx.h
+++ b/protocols/VKontakte/src/stdafx.h
@@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_avatars.h>
#include <m_chat_int.h>
#include <m_clistint.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_file.h>
#include <m_genmenu.h>
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 4e5ff332e4..91c2c2b5e7 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -475,7 +475,7 @@ int CVkProto::OnChatEvent(WPARAM, LPARAM lParam)
MCONTACT hContact = FindUser(_wtoi(gch->ptszUID));
if (hContact == 0) {
hContact = FindUser(_wtoi(gch->ptszUID), true);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
db_set_b(hContact, "CList", "NotOnList", 1);
db_set_dw(hContact, "Ignore", "Mask1", 0);
RetrieveUserInfo(_wtoi(gch->ptszUID));
@@ -723,7 +723,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch)
hContact = FindUser(cu->m_uid);
if (hContact == 0) {
hContact = FindUser(cu->m_uid, true);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
db_set_b(hContact, "CList", "NotOnList", 1);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index b73a88103f..127800c45d 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -357,7 +357,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, VKContactTy
return 0;
if (vkContactType == VKContactType::vkContactMUCUser) {
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
db_set_b(hContact, "CList", "NotOnList", 1);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h
index 7a8156af5e..226abc0980 100644
--- a/protocols/Weather/src/stdafx.h
+++ b/protocols/Weather/src/stdafx.h
@@ -34,6 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <malloc.h>
#include <newpluginapi.h>
+#include <m_contacts.h>
#include <m_icolib.h>
#include <m_options.h>
#include <m_langpack.h>
diff --git a/protocols/Weather/src/weather_addstn.cpp b/protocols/Weather/src/weather_addstn.cpp
index 96ab251cf6..ff4287a988 100644
--- a/protocols/Weather/src/weather_addstn.cpp
+++ b/protocols/Weather/src/weather_addstn.cpp
@@ -50,7 +50,7 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
// and add them on the list
if (db_get_b(hContact, "CList", "NotOnList", 1)) {
db_unset(hContact, "CList", "NotOnList");
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
db_free(&dbv);
// contact is added, function quitting
diff --git a/protocols/Weather/src/weather_mwin.cpp b/protocols/Weather/src/weather_mwin.cpp
index 1ab04f0811..c837648c09 100644
--- a/protocols/Weather/src/weather_mwin.cpp
+++ b/protocols/Weather/src/weather_mwin.cpp
@@ -250,7 +250,7 @@ static void addWindow(MCONTACT hContact)
int frameID = g_plugin.addFrame(&Frame);
g_plugin.setDword(hContact, "mwin", frameID);
- Clist_HideContact(hContact);
+ Contact_Hide(hContact);
}
void removeWindow(MCONTACT hContact)
@@ -261,7 +261,7 @@ void removeWindow(MCONTACT hContact)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
g_plugin.setDword(hContact, "mwin", 0);
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
void UpdateMwinData(MCONTACT hContact)
diff --git a/protocols/WebView/src/stdafx.h b/protocols/WebView/src/stdafx.h
index 91a1ac63c1..5e351b77ed 100644
--- a/protocols/WebView/src/stdafx.h
+++ b/protocols/WebView/src/stdafx.h
@@ -15,9 +15,8 @@
#include <wchar.h>
#include <newpluginapi.h>
-#include <m_system.h>
-#include <m_clist.h>
#include <m_clist.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_protocols.h>
#include <m_protosvc.h>
diff --git a/protocols/WebView/src/webview_services.cpp b/protocols/WebView/src/webview_services.cpp
index f0af2a30fe..c3b412c7e5 100644
--- a/protocols/WebView/src/webview_services.cpp
+++ b/protocols/WebView/src/webview_services.cpp
@@ -353,7 +353,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
sameurl++;
if (db_get_b(hContact, "CList", "NotOnList", 1)) {
db_unset(hContact, "CList", "NotOnList");
- Clist_HideContact(hContact, false);
+ Contact_Hide(hContact, false);
}
}
db_free(&dbv);
@@ -404,7 +404,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
samename++;
if (db_get_b(hContact2, "CList", "NotOnList", 1)) {
db_unset(hContact2, "CList", "NotOnList");
- Clist_HideContact(hContact2, false);
+ Contact_Hide(hContact2, false);
}
db_free(&dbv);
}
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp
index 2eb6f725f7..526ffaad03 100644
--- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp
+++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp
@@ -289,10 +289,10 @@ int RegisterPOP3Plugin(WPARAM, LPARAM)
g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE);
db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message"));
if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT))
- Clist_HideContact(Finder->hContact, false);
+ Contact_Hide(Finder->hContact, false);
if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT))
- Clist_HideContact(Finder->hContact);
+ Contact_Hide(Finder->hContact);
}
db_free(&dbv);
}
diff --git a/protocols/YAMN/src/services.cpp b/protocols/YAMN/src/services.cpp
index 0ba33321ee..7e2a684400 100644
--- a/protocols/YAMN/src/services.cpp
+++ b/protocols/YAMN/src/services.cpp
@@ -433,7 +433,7 @@ void RefreshContact(void)
CAccount *Finder;
for (Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) {
if (Finder->hContact != NULL) {
- Clist_HideContact(Finder->hContact, !(Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT));
+ Contact_Hide(Finder->hContact, !(Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT));
}
else if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) {
Finder->hContact = db_add_contact();
diff --git a/protocols/YAMN/src/stdafx.h b/protocols/YAMN/src/stdafx.h
index 44bb1037dd..6d56c51a15 100644
--- a/protocols/YAMN/src/stdafx.h
+++ b/protocols/YAMN/src/stdafx.h
@@ -10,17 +10,18 @@
#include <win2k.h>
#include <newpluginapi.h>
-#include <m_skin.h>
-#include <m_langpack.h>
#include <m_clistint.h>
-#include <m_options.h>
+#include <m_contacts.h>
#include <m_database.h>
-#include <m_protosvc.h>
+#include <m_hotkeys.h>
#include <m_icolib.h>
-#include <m_popup.h>
+#include <m_langpack.h>
#include <m_messages.h>
#include <m_netlib.h>
-#include <m_hotkeys.h>
+#include <m_options.h>
+#include <m_popup.h>
+#include <m_protosvc.h>
+#include <m_skin.h>
#include <m_timezones.h>
#include <m_toptoolbar.h>
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index e68906c188..cd108b11bb 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -36,7 +36,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
int oldStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
g_plugin.setWord(hContact, "OldStatus", (WORD)newStatus);
if (Ignore_IsIgnored(hContact, IGNOREEVENT_USERONLINE)) return 0;
- if (Clist_IsHidden(hContact)) return 0;
+ if (Contact_IsHidden(hContact)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
// Remove the event from the queue if it exists since they are now offline
MEVENT lastEvent = g_plugin.getDword(hContact, "LastEvent");
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 913615bee5..717a9878c5 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -326,7 +326,7 @@ BOOL SM_SetStatus(const char *pszModule, SESSION_INFO *si, int wStatus)
si->wStatus = wStatus;
if (si->hContact) {
if (si->iType != GCW_SERVER && wStatus != ID_STATUS_OFFLINE)
- Clist_HideContact(si->hContact, false);
+ Contact_Hide(si->hContact, false);
db_set_w(si->hContact, si->pszModule, "Status", (WORD)wStatus);
}
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 94ba775092..5d11deff98 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -293,8 +293,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
gce->iType |= GC_EVENT_HIGHLIGHT;
if (bInactive || !g_Settings->bSoundsFocus)
Skin_PlaySound("ChatHighlight");
- if (Clist_IsHidden(si->hContact))
- Clist_HideContact(si->hContact, false);
+ if (Contact_IsHidden(si->hContact))
+ Contact_Hide(si->hContact, false);
if (bInactive)
g_chatApi.DoTrayIcon(si, gce);
if (bInactive || !g_Settings->bPopupInactiveOnly)
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 10625482ce..b235334174 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -452,7 +452,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
flags = contact->flags;
}
Clist_DeleteItemFromTree(hwnd, wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Clist_IsHidden(wParam)) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Contact_IsHidden(wParam)) {
NMCLISTCONTROL nm;
g_clistApi.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
if (Clist_FindItem(hwnd, dat, wParam, &contact)) {
@@ -486,7 +486,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- int shouldShow = (style & CLS_SHOWHIDDEN || !Clist_IsHidden(wParam))
+ int shouldShow = (style & CLS_SHOWHIDDEN || !Contact_IsHidden(wParam))
&& (!Clist_IsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam);
contact = nullptr;
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 262ddf04f1..ac6e365177 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -342,7 +342,7 @@ MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem)
int fnGetContactHiddenStatus(MCONTACT hContact, char*, ClcData*)
{
- return Clist_IsHidden(hContact);
+ return Contact_IsHidden(hContact);
}
void fnRebuildEntireList(HWND hwnd, ClcData *dat)
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index 6573897669..cd26b13f54 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -861,21 +861,6 @@ MIR_APP_DLL(void) Clist_InvalidateItem(HWND hwnd, ClcData *dat, int iItem)
}
///////////////////////////////////////////////////////////////////////////////
-
-MIR_APP_DLL(bool) Clist_IsHidden(MCONTACT hContact)
-{
- return db_get_b(hContact, "CList", "Hidden", 0) != 0;
-}
-
-MIR_APP_DLL(void) Clist_HideContact(MCONTACT hContact, bool bHidden)
-{
- if (bHidden)
- db_set_b(hContact, "CList", "Hidden", 1);
- else
- db_unset(hContact, "CList", "Hidden");
-}
-
-///////////////////////////////////////////////////////////////////////////////
// row coord functions
int fnGetRowTopY(ClcData *dat, int item)
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp
index c02de30401..3e64540332 100644
--- a/src/mir_app/src/clistsettings.cpp
+++ b/src/mir_app/src/clistsettings.cpp
@@ -69,7 +69,7 @@ void fnCheckCacheItem(ClcCacheEntry *p)
p->szProto = GetContactProto(p->hContact);
if (p->bIsHidden == -1)
- p->bIsHidden = Clist_IsHidden(p->hContact);
+ p->bIsHidden = Contact_IsHidden(p->hContact);
}
void fnFreeCacheItem(ClcCacheEntry *p)
@@ -203,7 +203,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
g_clistApi.pfnCheckCacheItem(pdnce);
}
else if (!strcmp(cws->szSetting, "Status")) {
- if (!Clist_IsHidden(hContact))
+ if (!Contact_IsHidden(hContact))
Clist_ChangeContactIcon(hContact, g_clistApi.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact));
}
}
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index b8e2ba2a9d..ad85b8ad5b 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -203,7 +203,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
switch (action) {
case IDC_HIDE: // Archive contact
- Clist_HideContact(wParam);
+ Contact_Hide(wParam);
break;
case IDYES: // Delete contact
diff --git a/src/mir_app/src/contact.cpp b/src/mir_app/src/contact.cpp
index 0daf98592f..625192731c 100644
--- a/src/mir_app/src/contact.cpp
+++ b/src/mir_app/src/contact.cpp
@@ -32,7 +32,7 @@ MIR_APP_DLL(void) Clist_LoadContactTree(void)
int hideOffline = db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
for (auto &hContact : Contacts()) {
int status = Contact_GetStatus(hContact);
- if ((!hideOffline || status != ID_STATUS_OFFLINE) && !Clist_IsHidden(hContact))
+ if ((!hideOffline || status != ID_STATUS_OFFLINE) && !Contact_IsHidden(hContact))
Clist_ChangeContactIcon(hContact, g_clistApi.pfnIconFromStatusMode(GetContactProto(hContact), status, hContact));
}
Clist_EndRebuild();
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp
index dc7af82b37..daf95dbf86 100644
--- a/src/mir_app/src/contacts.cpp
+++ b/src/mir_app/src/contacts.cpp
@@ -279,6 +279,20 @@ MIR_APP_DLL(int) Contact_GetStatus(MCONTACT hContact)
return db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
}
+///////////////////////////////////////////////////////////////////////////////
+
+MIR_APP_DLL(bool) Contact_IsHidden(MCONTACT hContact)
+{
+ return db_get_b(hContact, "CList", "Hidden", 0) != 0;
+}
+
+MIR_APP_DLL(void) Contact_Hide(MCONTACT hContact, bool bHidden)
+{
+ if (bHidden)
+ db_set_b(hContact, "CList", "Hidden", 1);
+ else
+ db_unset(hContact, "CList", "Hidden");
+}
/////////////////////////////////////////////////////////////////////////////////////////
// Options dialog
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp
index 888aef29e2..56c38e303f 100644
--- a/src/mir_app/src/ignore.cpp
+++ b/src/mir_app/src/ignore.cpp
@@ -38,7 +38,7 @@ static DWORD GetMask(MCONTACT hContact)
if (hContact == 0)
mask = 0;
else {
- if (Clist_IsHidden(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
+ if (Contact_IsHidden(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
mask = db_get_dw(0, "Ignore", "Mask1", 0);
else
mask = db_get_dw(0, "Ignore", "Default1", 0);
@@ -192,7 +192,7 @@ static void SetAllContactIcons(HWND hwndList)
}
else proto1Caps = proto4Caps = 0;
InitialiseItem(hwndList, hContact, hItem, proto1Caps, proto4Caps);
- if (!Clist_IsHidden(hContact))
+ if (!Contact_IsHidden(hContact))
SendMessage(hwndList, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
}
@@ -306,7 +306,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
- Clist_HideContact(hContact, !SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
+ Contact_Hide(hContact, !SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
}
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), 0, hItemAll, "Default1");
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index 3c9ac140bd..dba5fe7d7c 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -79,7 +79,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM)
// hide the contact if clist groups disabled (shouldn't create one anyway since menus disabled)
if (!db_mc_isEnabled())
- Clist_HideContact(hMetaContact);
+ Contact_Hide(hMetaContact);
return hMetaContact;
}
@@ -96,7 +96,7 @@ void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateI
DBCachedContact *ccSub = currDb->getCache()->GetCachedContact(Meta_GetContactHandle(ccMeta, number));
if (ccSub != nullptr) {
if (ccSub->parentID == ccMeta->contactID) {
- Clist_HideContact(ccSub->contactID, false);
+ Contact_Hide(ccSub->contactID, false);
// stop ignoring, if we were
if (g_metaOptions.bSuppressStatus)
diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp
index 09c61b98d1..e16a24d00b 100644
--- a/src/mir_app/src/meta_utils.cpp
+++ b/src/mir_app/src/meta_utils.cpp
@@ -403,7 +403,7 @@ int Meta_HideMetaContacts(bool bHide)
else
continue;
- Clist_HideContact(hContact, bSet);
+ Contact_Hide(hContact, bSet);
}
if (bHide) {
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 3f53cf195b..a31384307a 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -365,8 +365,8 @@ Chat_UpdateOptions @418 NONAME
?onDblClick_List@CSrmmBaseDialog@@IAEXPAVCCtrlListBox@@@Z @440 NONAME
?OnDestroy@CSrmmBaseDialog@@MAEXXZ @441 NONAME
Chat_AddMenuItems @442 NONAME
-Clist_IsHidden @443
-Clist_HideContact @444
+Contact_IsHidden @443
+Contact_Hide @444
Chat_DoEventHook @445 NONAME
_stubLogProc@16 @446 NONAME
_stubMessageProc@16 @447 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index b933dcd83a..c92292f409 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -365,8 +365,8 @@ Chat_UpdateOptions @418 NONAME
?onDblClick_List@CSrmmBaseDialog@@IEAAXPEAVCCtrlListBox@@@Z @440 NONAME
?OnDestroy@CSrmmBaseDialog@@MEAAXXZ @441 NONAME
Chat_AddMenuItems @442 NONAME
-Clist_IsHidden @443
-Clist_HideContact @444
+Contact_IsHidden @443
+Contact_Hide @444
Chat_DoEventHook @445 NONAME
stubLogProc @446 NONAME
stubMessageProc @447 NONAME