summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/src/options.cpp12
-rw-r--r--plugins/AVS/src/poll.cpp2
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp2
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp6
-rw-r--r--plugins/AvatarHistory/src/utils.cpp2
-rw-r--r--plugins/BasicHistory/src/EventList.cpp6
-rw-r--r--plugins/Boltun/src/boltun.cpp4
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp18
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_awaymsg.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clc.h2
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp6
-rw-r--r--plugins/Clist_nicer/src/clc.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp4
-rw-r--r--plugins/CmdLine/src/utils.cpp4
-rw-r--r--plugins/ContactsPlus/src/receive.cpp4
-rw-r--r--plugins/ContactsPlus/src/send.cpp2
-rw-r--r--plugins/ContactsPlus/src/utils.cpp2
-rw-r--r--plugins/FavContacts/src/contact_cache.cpp2
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp2
-rw-r--r--plugins/FloatingContacts/src/thumbs.cpp4
-rw-r--r--plugins/HistoryStats/src/_langext.h2
-rw-r--r--plugins/HistoryStats/src/colbase_words.cpp8
-rw-r--r--plugins/HistoryStats/src/colbase_words.h8
-rw-r--r--plugins/HistoryStats/src/column.h32
-rw-r--r--plugins/HistoryStats/src/column_chatduration.cpp24
-rw-r--r--plugins/HistoryStats/src/column_chatduration.h2
-rw-r--r--plugins/HistoryStats/src/column_events.cpp10
-rw-r--r--plugins/HistoryStats/src/column_events.h2
-rw-r--r--plugins/HistoryStats/src/column_group.cpp2
-rw-r--r--plugins/HistoryStats/src/column_group.h2
-rw-r--r--plugins/HistoryStats/src/column_inout.cpp42
-rw-r--r--plugins/HistoryStats/src/column_inout.h2
-rw-r--r--plugins/HistoryStats/src/column_inoutgraph.cpp12
-rw-r--r--plugins/HistoryStats/src/column_inoutgraph.h2
-rw-r--r--plugins/HistoryStats/src/column_nick.cpp2
-rw-r--r--plugins/HistoryStats/src/column_nick.h2
-rw-r--r--plugins/HistoryStats/src/column_protocol.cpp2
-rw-r--r--plugins/HistoryStats/src/column_protocol.h2
-rw-r--r--plugins/HistoryStats/src/column_rank.cpp2
-rw-r--r--plugins/HistoryStats/src/column_rank.h2
-rw-r--r--plugins/HistoryStats/src/column_split.cpp14
-rw-r--r--plugins/HistoryStats/src/column_split.h14
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.cpp18
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.h18
-rw-r--r--plugins/HistoryStats/src/column_timeline.cpp18
-rw-r--r--plugins/HistoryStats/src/column_timeline.h18
-rw-r--r--plugins/HistoryStats/src/column_wordcount.cpp8
-rw-r--r--plugins/HistoryStats/src/column_wordcount.h8
-rw-r--r--plugins/HistoryStats/src/column_words.cpp8
-rw-r--r--plugins/HistoryStats/src/column_words.h8
-rw-r--r--plugins/HistoryStats/src/contact.cpp16
-rw-r--r--plugins/HistoryStats/src/contact.h26
-rw-r--r--plugins/HistoryStats/src/dlgoption_subinput.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgoption_suboutput.cpp2
-rw-r--r--plugins/HistoryStats/src/iconlib.cpp2
-rw-r--r--plugins/HistoryStats/src/statistic.cpp142
-rw-r--r--plugins/HistoryStats/src/statistic.h30
-rw-r--r--plugins/IEHistory/src/dlgHandlers.cpp2
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp8
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp12
-rw-r--r--plugins/Import/src/import.cpp2
-rw-r--r--plugins/KeyboardNotify/src/ignore.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp10
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp2
-rw-r--r--plugins/MirFox/src/MirfoxMiranda.cpp4
-rw-r--r--plugins/MirLua/src/Modules/m_database.cpp2
-rw-r--r--plugins/MirLua/src/Modules/m_message.cpp2
-rw-r--r--plugins/MirOTR/src/dbfilter.cpp2
-rw-r--r--plugins/MirOTR/src/options.cpp2
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp2
-rw-r--r--plugins/MirOTR/src/svcs_srmm.cpp6
-rw-r--r--plugins/MirOTR/src/utils.cpp4
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp14
-rw-r--r--plugins/MirandaG15/src/CChatScreen.cpp4
-rw-r--r--plugins/MirandaG15/src/CContactList.cpp4
-rw-r--r--plugins/MirandaG15/src/CEventScreen.cpp2
-rw-r--r--plugins/Msg_Export/src/options.cpp2
-rw-r--r--plugins/Msg_Export/src/utils.cpp8
-rw-r--r--plugins/MyDetails/src/data.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp2
-rw-r--r--plugins/NewStory/src/history.cpp6
-rw-r--r--plugins/NewStory/src/options.cpp4
-rw-r--r--plugins/NewStory/src/templates.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp2
-rw-r--r--plugins/New_GPG/src/utilities.cpp6
-rw-r--r--plugins/NoHistory/src/dllmain.cpp6
-rw-r--r--plugins/NoHistory/src/options.cpp4
-rw-r--r--plugins/Nudge/src/main.cpp2
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp4
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp6
-rw-r--r--plugins/QuickMessages/src/Utils.cpp4
-rw-r--r--plugins/QuickSearch/src/window.cpp2
-rw-r--r--plugins/QuickSearch/src/window_row.cpp4
-rw-r--r--plugins/Scriver/src/msgdialog.cpp10
-rw-r--r--plugins/Scriver/src/msglog.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/Scriver/src/msgutils.cpp2
-rw-r--r--plugins/Scriver/src/utils.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_check.cpp8
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp2
-rw-r--r--plugins/SecureIM/src/options.cpp4
-rw-r--r--plugins/SeenPlugin/src/menu.cpp2
-rw-r--r--plugins/SeenPlugin/src/userinfo.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp8
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendEmail.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp2
-rw-r--r--plugins/Sessions/Src/Utils.cpp2
-rw-r--r--plugins/ShellExt/src/shlcom.cpp2
-rw-r--r--plugins/SimpleAR/src/Main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/Spamotron/src/spamotron.cpp20
-rw-r--r--plugins/StopSpamMod/src/stopspam.cpp20
-rw-r--r--plugins/StopSpamMod/src/utilities.cpp6
-rw-r--r--plugins/StopSpamPlus/src/events.cpp16
-rw-r--r--plugins/StopSpamPlus/src/services.cpp4
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp4
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp8
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp6
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp4
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp4
-rw-r--r--plugins/TipperYM/src/subst.cpp2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp4
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp4
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp2
-rw-r--r--plugins/Variables/src/contact.cpp4
-rw-r--r--plugins/Variables/src/parse_miranda.cpp2
-rw-r--r--plugins/WhenWasIt/src/hooked_events.cpp2
-rw-r--r--plugins/WhenWasIt/src/utils.cpp2
-rw-r--r--plugins/XSoundNotify/src/dialog.cpp2
-rw-r--r--plugins/XSoundNotify/src/options.cpp2
-rw-r--r--plugins/YARelay/src/main.cpp2
-rw-r--r--plugins/wbOSD/src/events.cpp2
141 files changed, 480 insertions, 480 deletions
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 7ab9d4d379..e53585ff12 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -505,7 +505,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, Contact_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));
@@ -536,8 +536,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 != Contact_IsHidden(hContact))
- Contact_Hide(hContact, hidden);
+ if (hidden != Contact::IsHidden(hContact))
+ Contact::Hide(hContact, hidden);
if (!locked && db_get_b(hContact, "ContactPhoto", "NeedUpdate", 0))
QueueAdd(hContact);
@@ -791,7 +791,7 @@ public:
SendMessage(m_hwnd, DM_SETAVATARNAME, 0, 0);
CheckDlgButton(m_hwnd, IDC_PROTECTAVATAR, db_get_b(m_hContact, "ContactPhoto", "Locked", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_HIDEAVATAR, Contact_IsHidden(m_hContact) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_HIDEAVATAR, Contact::IsHidden(m_hContact) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(m_hwnd, IDC_BKG_NUM_POINTS_SPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(m_hwnd, IDC_BKG_NUM_POINTS), 0);
SendDlgItemMessage(m_hwnd, IDC_BKG_NUM_POINTS_SPIN, UDM_SETRANGE, 0, MAKELONG(8, 2));
@@ -831,8 +831,8 @@ public:
{
bool hidden = IsDlgButtonChecked(m_hwnd, IDC_HIDEAVATAR) != 0;
SetAvatarAttribute(m_hContact, AVS_HIDEONCLIST, hidden);
- if (hidden != Contact_IsHidden(m_hContact))
- Contact_Hide(m_hContact, hidden);
+ if (hidden != Contact::IsHidden(m_hContact))
+ Contact::Hide(m_hContact, hidden);
}
void onClick_Protect(CCtrlButton *)
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp
index ba3d30cf11..276f6a5a34 100644
--- a/plugins/AVS/src/poll.cpp
+++ b/plugins/AVS/src/poll.cpp
@@ -94,7 +94,7 @@ static BOOL PollContactCanHaveAvatar(MCONTACT hContact, const char *szProto)
{
int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return (Proto_IsFetchingWhenContactOfflineAllowed(szProto) || status != ID_STATUS_OFFLINE)
- && Contact_OnList(hContact) && db_get_b(hContact, "CList", "ApparentMode", 0) != ID_STATUS_OFFLINE;
+ && Contact::OnList(hContact) && db_get_b(hContact, "CList", "ApparentMode", 0) != ID_STATUS_OFFLINE;
}
// Return true if this contact has to be checked
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index 34c0f57098..11770d4945 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -259,7 +259,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
}
if (BST_UNCHECKED == IsDlgButtonChecked(hdlg, IDC_ADDTEMP)) {
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
if (IsDlgButtonChecked(hdlg, IDC_AUTH)) {
uint32_t flags = CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_4, 0);
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 4408aebc68..17ced0e11a 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -150,11 +150,11 @@ static BOOL CheckAllContactsOffline(void)
for (auto &hContact : Contacts()) {
char *pszProto = Proto_GetBaseAccountName(hContact);
if (pszProto != nullptr && Proto_GetStatus(pszProto) != ID_STATUS_OFFLINE) {
- if (Contact_IsGroupChat(hContact, pszProto)) continue;
+ if (Contact::IsGroupChat(hContact, pszProto)) continue;
if (db_get_w(hContact, pszProto, "Status", 0) != ID_STATUS_OFFLINE) {
if (fSmartCheck) {
- if (Contact_IsHidden(hContact)) continue;
- if (!Contact_OnList(hContact)) continue;
+ if (Contact::IsHidden(hContact)) continue;
+ if (!Contact::OnList(hContact)) continue;
}
fAllOffline = FALSE;
break;
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp
index 826acc6daa..938879c1ce 100644
--- a/plugins/AvatarHistory/src/utils.cpp
+++ b/plugins/AvatarHistory/src/utils.cpp
@@ -110,7 +110,7 @@ wchar_t* GetContactFolder(wchar_t *fn, MCONTACT hContact)
GetProtocolFolder(fn, proto);
wchar_t uin[MAX_PATH];
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, hContact, proto));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, hContact, proto));
wcsncpy_s(uin, (id == NULL) ? TranslateT("Unknown UIN") : id, _TRUNCATE);
ConvertToFilename(uin, MAX_PATH); //added so that weather id's like "yw/CI0000" work
mir_snwprintf(fn, MAX_PATH, L"%s\\%s", fn, uin);
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index a891e88976..9fbdecec16 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -393,7 +393,7 @@ std::wstring HistoryEventList::GetContactName()
std::wstring HistoryEventList::GetMyName()
{
- ptrW name(Contact_GetInfo(CNF_DISPLAY, NULL, Proto_GetBaseAccountName(m_hContact)));
+ ptrW name(Contact::GetInfo(CNF_DISPLAY, NULL, Proto_GetBaseAccountName(m_hContact)));
return (name == NULL) ? TranslateT("Me") : name;
}
@@ -426,13 +426,13 @@ std::string HistoryEventList::GetBaseProtocol()
std::wstring HistoryEventList::GetMyId()
{
- ptrW id(Contact_GetInfo(CNF_DISPLAYUID, NULL, Proto_GetBaseAccountName(m_hContact)));
+ ptrW id(Contact::GetInfo(CNF_DISPLAYUID, NULL, Proto_GetBaseAccountName(m_hContact)));
return (id == NULL) ? L"" : id;
}
inline std::wstring GetContactId(MCONTACT hContact)
{
- ptrW id(Contact_GetInfo(CNF_DISPLAYUID, hContact));
+ ptrW id(Contact::GetInfo(CNF_DISPLAYUID, hContact));
return (id == NULL) ? L"" : id;
}
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index d45e6c20d0..95de2e9443 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -181,7 +181,7 @@ static bool BoltunAutoChat(MCONTACT hContact)
return true;
}
- if (!Contact_OnList(hContact) && Config.TalkWithNotInList)
+ if (!Contact::OnList(hContact) && Config.TalkWithNotInList)
return true;
if (g_plugin.getByte(hContact, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE) == TRUE)
@@ -481,7 +481,7 @@ static int OnContactMenuPrebuild(WPARAM hContact, LPARAM)
{
INT_PTR flags = CallProtoService(Proto_GetBaseAccountName(hContact), PS_GETCAPS, PFLAGNUM_1);
- bool bEnable = blInit && Contact_OnList(hContact) && (flags & PF1_IM) != 0;
+ bool bEnable = blInit && Contact::OnList(hContact) && (flags & PF1_IM) != 0;
Menu_ShowItem(hMenuItemAutoChat, bEnable);
Menu_ShowItem(hMenuItemNotToChat, bEnable);
Menu_ShowItem(hMenuItemStartChatting, bEnable);
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index f33df6a7f3..1a9285e4dc 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -99,7 +99,7 @@ LRESULT CALLBACK HidePopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
switch (message) {
case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED) {
- Contact_Hide(PUGetContact(hWnd));
+ Contact::Hide(PUGetContact(hWnd));
PUDeletePopup(hWnd);
}
break;
@@ -111,7 +111,7 @@ LRESULT CALLBACK HidePopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
case UM_POPUPACTION:
if (wParam == 2) {
- Contact_Hide(PUGetContact(hWnd));
+ Contact::Hide(PUGetContact(hWnd));
PUDeletePopup(hWnd);
}
if (wParam == 3) {
@@ -222,7 +222,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
if (options.hideInactive)
if (daysSinceMessage >= options.iSilencePeriod)
- if (!Contact_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");
@@ -251,7 +251,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
void ReturnNotify(MCONTACT hContact, wchar_t *message)
{
- if (!Contact_OnList(hContact) || Contact_IsHidden(hContact))
+ if (!Contact::OnList(hContact) || Contact::IsHidden(hContact))
return;
Skin_PlaySound("buddyExpectatorReturn");
@@ -290,7 +290,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message)
void GoneNotify(MCONTACT hContact, wchar_t *message)
{
- if (!Contact_OnList(hContact) || Contact_IsHidden(hContact))
+ if (!Contact::OnList(hContact) || Contact::IsHidden(hContact))
return;
if (options.iShowPopup2 > 0) {
@@ -435,7 +435,7 @@ int onPrebuildContactMenu(WPARAM hContact, LPARAM)
else
Menu_ModifyItem(hContactMenu, LPGENW("Enable Miss You"), iconList[2].hIcolib);
- Menu_ShowItem(hContactMenu, !Contact_IsGroupChat(hContact, proto) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND));
+ Menu_ShowItem(hContactMenu, !Contact::IsGroupChat(hContact, proto) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND));
return 0;
}
@@ -456,11 +456,11 @@ int SettingChanged(WPARAM hContact, LPARAM lParam)
if (hContact == NULL || inf->value.type == DBVT_DELETED || strcmp(inf->szSetting, "Status") != 0)
return 0;
- if (!Contact_OnList(hContact))
+ if (!Contact::OnList(hContact))
return 0;
char *proto = Proto_GetBaseAccountName(hContact);
- if (proto == nullptr || Contact_IsGroupChat(hContact, proto) || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
+ if (proto == nullptr || Contact::IsGroupChat(hContact, proto) || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 0;
int currentStatus = inf->value.wVal;
@@ -538,7 +538,7 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
{
for (auto &hContact : Contacts()) {
char *proto = Proto_GetBaseAccountName(hContact);
- if (proto && !Contact_IsGroupChat(hContact, proto)
+ if (proto && !Contact::IsGroupChat(hContact, proto)
&& (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
&& isContactGoneFor(hContact, options.iAbsencePeriod2)
&& (g_plugin.getByte(hContact, "StillAbsentNotified", 0) == 0))
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 95068d4ce1..c8e7adbdca 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 && Contact_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/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp
index b4f0f5f6a4..31a9bcabed 100644
--- a/plugins/Clist_modern/src/modern_awaymsg.cpp
+++ b/plugins/Clist_modern/src/modern_awaymsg.cpp
@@ -144,7 +144,7 @@ void amRequestAwayMsg(MCONTACT hContact)
return;
//Do not re-ask for chat rooms
- if (!Contact_IsGroupChat(hContact))
+ if (!Contact::IsGroupChat(hContact))
amAddHandleToChain(hContact);
}
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 417ab0a97e..972ed12f4d 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1306,7 +1306,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 || !Contact_IsHidden(wParam)) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Contact::IsHidden(wParam)) {
g_clistApi.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
if (Clist_FindItem(hwnd, dat, wParam, &contact)) {
memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage));
@@ -1658,7 +1658,7 @@ int ClcDoProtoAck(ACKDATA *ack)
if (ack->type == ACKTYPE_AWAYMSG) {
if (ack->result == ACKRESULT_SUCCESS && ack->lParam) {
if (ack->szModule != nullptr)
- if (Contact_IsGroupChat(ack->hContact, ack->szModule))
+ if (Contact::IsGroupChat(ack->hContact, ack->szModule))
return 0;
g_plugin.setWString(ack->hContact, "StatusMsg", (const wchar_t *)ack->lParam);
@@ -1666,7 +1666,7 @@ int ClcDoProtoAck(ACKDATA *ack)
}
else {
if (ack->szModule != nullptr)
- if (Contact_IsGroupChat(ack->hContact, ack->szModule))
+ if (Contact::IsGroupChat(ack->hContact, ack->szModule))
return 0;
if (ack->hContact) {
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h
index fb06744325..1d0d2328e4 100644
--- a/plugins/Clist_modern/src/modern_clc.h
+++ b/plugins/Clist_modern/src/modern_clc.h
@@ -200,7 +200,7 @@ struct ClcContact : public ClcContactBase
{ return (style & CLS_CHECKBOXES && type == CLCIT_CONTACT) || (style & CLS_GROUPCHECKBOXES && type == CLCIT_GROUP) || (type == CLCIT_INFO && flags & CLCIIF_CHECKBOX);
}
__forceinline bool isChat() const
- { return (type == CLCIT_CONTACT) && Contact_IsGroupChat(hContact, pce->szProto);
+ { return (type == CLCIT_CONTACT) && Contact::IsGroupChat(hContact, pce->szProto);
}
};
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 5a6d7cdebb..61b6d6eca5 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -326,12 +326,12 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact)
pdnce->hContact = hContact;
pdnce->szProto = Proto_GetBaseAccountName(hContact);
- pdnce->bIsHidden = Contact_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);
pdnce->ApparentMode = db_get_w(hContact, pdnce->szProto, "ApparentMode", 0);
- pdnce->NotOnList = !Contact_OnList(hContact);
+ pdnce->NotOnList = !Contact::OnList(hContact);
pdnce->IsExpanded = g_plugin.getByte(hContact, "Expanded");
pdnce->dwLastOnlineTime = db_get_dw(hContact, pdnce->szProto, "LastSeen", 0);
pdnce->dwLastMsgTime = -1;
@@ -396,7 +396,7 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly)
int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
{
- int dbHidden = Contact_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 ef8ade8c79..dc43f20aeb 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 (!Contact_IsHidden(hContact))
+ if (!Contact::IsHidden(hContact))
if (cws->value.wVal == ID_STATUS_OFFLINE)
if (Clist::HideOffline)
return 0;
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 161ae95f0d..80900a0150 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -329,7 +329,7 @@ void GetExtendedInfo(ClcContact *contact, ClcData *dat)
return;
p->valid = TRUE;
- p->isChatRoom = Contact_IsGroupChat(contact->hContact, contact->pce->szProto);
+ p->isChatRoom = Contact::IsGroupChat(contact->hContact, contact->pce->szProto);
}
void LoadSkinItemToCache(TExtraCache *cEntry)
@@ -373,7 +373,7 @@ void LoadSkinItemToCache(TExtraCache *cEntry)
int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData *dat)
{
- int dbHidden = Contact_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/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index 88952e7ed2..7c13576b0f 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -137,7 +137,7 @@ int GetStringFromDatabase(char *szSettingName, wchar_t *szError, wchar_t *szResu
#pragma warning (disable: 4312)
wchar_t* GetContactName(MCONTACT hContact, char *szProto)
{
- return Contact_GetInfo(CNF_DISPLAY, hContact, szProto);
+ return Contact::GetInfo(CNF_DISPLAY, hContact, szProto);
}
void Proto_GetBaseAccountName(MCONTACT hContact, char *szProto, size_t size)
@@ -147,7 +147,7 @@ void Proto_GetBaseAccountName(MCONTACT hContact, char *szProto, size_t size)
wchar_t* GetContactID(MCONTACT hContact, char *szProto)
{
- return Contact_GetInfo(CNF_UNIQUEID, hContact, szProto);
+ return Contact::GetInfo(CNF_UNIQUEID, hContact, szProto);
}
MCONTACT GetContactFromID(wchar_t *szID, char *szProto)
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp
index da8b2230f3..f3b0f2355b 100644
--- a/plugins/ContactsPlus/src/receive.cpp
+++ b/plugins/ContactsPlus/src/receive.cpp
@@ -352,7 +352,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
case ID_POPUP_ADDUSER:
hContact = CreateTemporaryContactForItem(hwndDlg, wndData, wndData->iPopupItem);
if (hContact)
- Contact_Add(hContact, hwndDlg);
+ Contact::Add(hContact, hwndDlg);
break;
case ID_POPUP_USERDETAILS:
@@ -386,7 +386,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
break;
case IDC_ADD:
- Contact_Add(wndData->mhContact, hwndDlg);
+ Contact::Add(wndData->mhContact, hwndDlg);
break;
}
}
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp
index 0b6c07a318..1dbb92ab0f 100644
--- a/plugins/ContactsPlus/src/send.cpp
+++ b/plugins/ContactsPlus/src/send.cpp
@@ -369,7 +369,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
break;
case IDC_ADD:
- Contact_Add(wndData->hContact, hwndDlg);
+ Contact::Add(wndData->hContact, hwndDlg);
break;
}
break;
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp
index f5563456be..6c85bce293 100644
--- a/plugins/ContactsPlus/src/utils.cpp
+++ b/plugins/ContactsPlus/src/utils.cpp
@@ -131,7 +131,7 @@ void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, wchar_t *pszTitleStart)
void UpdateDialogAddButton(HWND hwndDlg, MCONTACT hContact)
{
- int bVisible = !Contact_OnList(hContact);
+ int bVisible = !Contact::OnList(hContact);
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), bVisible ? SW_SHOW : SW_HIDE);
}
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp
index 80ae06d330..12dabbb2d0 100644
--- a/plugins/FavContacts/src/contact_cache.cpp
+++ b/plugins/FavContacts/src/contact_cache.cpp
@@ -116,7 +116,7 @@ float CContactCache::getWeight(int rate)
static bool AppendInfo(wchar_t *buf, int size, MCONTACT hContact, int info)
{
- ptrW str(Contact_GetInfo(info, hContact));
+ ptrW str(Contact::GetInfo(info, hContact));
if (str != NULL) {
mir_wstrncpy(buf, str, size);
return true;
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 1e6e6fdee5..5336ec84ee 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -405,7 +405,7 @@ void FILEECHO::incomeRequest(char *param)
Skin_PlaySound("RecvFile");
int AutoMin = db_get_b(0, "SRFile", "AutoMin", 0);
- if (db_get_b(0, "SRFile", "AutoAccept", 0) && Contact_OnList(hContact)) {
+ if (db_get_b(0, "SRFile", "AutoAccept", 0) && Contact::OnList(hContact)) {
PostMessage(hDlg, WM_COMMAND, IDC_PLAY, 0);
if (AutoMin)
ShowWindow(hDlg, SW_SHOWMINIMIZED);
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp
index 9336087235..51e7e5d3cd 100644
--- a/plugins/FloatingContacts/src/thumbs.cpp
+++ b/plugins/FloatingContacts/src/thumbs.cpp
@@ -244,7 +244,7 @@ void ThumbInfo::ResizeThumb()
ImageList_GetIconSize_my(himlMiranda, sizeIcon);
HDC hdc = GetWindowDC(hwnd);
- if (Contact_OnList(hContact)) {
+ if (Contact::OnList(hContact)) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (nullptr != szProto) {
int nStatus = Proto_GetStatus(szProto);
@@ -572,7 +572,7 @@ void ThumbInfo::UpdateContent()
oldBkMode = SetBkMode(hdcDraw, TRANSPARENT);
- if (Contact_OnList(hContact)) {
+ if (Contact::OnList(hContact)) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (nullptr != szProto) {
int nStatus = Proto_GetStatus(szProto);
diff --git a/plugins/HistoryStats/src/_langext.h b/plugins/HistoryStats/src/_langext.h
index f5e94694f7..c481f65567 100644
--- a/plugins/HistoryStats/src/_langext.h
+++ b/plugins/HistoryStats/src/_langext.h
@@ -21,7 +21,7 @@
range_each_(index_var, 0, _countof(array_var))
#define vector_each_(index_var, vector_var) \
- for (int index_var = 0; index_var != (vector_var).size(); ++index_var)
+ for (size_t index_var = 0; index_var != (vector_var).size(); ++index_var)
#define iter_each_(cont_type, iter_var, cont_var) \
for (cont_type::iterator iter_var = (cont_var).begin(); iter_var != (cont_var).end(); ++iter_var)
diff --git a/plugins/HistoryStats/src/colbase_words.cpp b/plugins/HistoryStats/src/colbase_words.cpp
index e45c77e019..d17d6b8b9d 100644
--- a/plugins/HistoryStats/src/colbase_words.cpp
+++ b/plugins/HistoryStats/src/colbase_words.cpp
@@ -297,13 +297,13 @@ void ColBaseWords::impl_contactDataBeginAcquire()
}
}
-void ColBaseWords::impl_contactDataPrepare(Contact& contact) const
+void ColBaseWords::impl_contactDataPrepare(CContact& contact) const
{
WordMap* pData = new WordMap;
contact.setSlot(contactDataSlotGet(), pData);
}
-void ColBaseWords::impl_contactDataFree(Contact& contact) const
+void ColBaseWords::impl_contactDataFree(CContact& contact) const
{
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
if (pData) {
@@ -312,7 +312,7 @@ void ColBaseWords::impl_contactDataFree(Contact& contact) const
}
}
-void ColBaseWords::impl_contactDataAcquireMessage(Contact& contact, Message& msg)
+void ColBaseWords::impl_contactDataAcquireMessage(CContact& contact, Message& msg)
{
if (m_nSource == 2 || m_nSource == 1 && msg.isOutgoing() || m_nSource == 0 && !msg.isOutgoing()) {
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
@@ -320,7 +320,7 @@ void ColBaseWords::impl_contactDataAcquireMessage(Contact& contact, Message& msg
}
}
-void ColBaseWords::impl_contactDataMerge(Contact& contact, const Contact& include) const
+void ColBaseWords::impl_contactDataMerge(CContact& contact, const CContact& include) const
{
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
const WordMap* pIncData = reinterpret_cast<const WordMap*>(include.getSlot(contactDataSlotGet()));
diff --git a/plugins/HistoryStats/src/colbase_words.h b/plugins/HistoryStats/src/colbase_words.h
index 2d9ef4c667..c73a1cda09 100644
--- a/plugins/HistoryStats/src/colbase_words.h
+++ b/plugins/HistoryStats/src/colbase_words.h
@@ -47,10 +47,10 @@ protected:
virtual int impl_configGetRestrictions(ext::string*) const { return crHTMLFull; }
virtual ext::string impl_contactDataGetUID() const;
virtual void impl_contactDataBeginAcquire();
- virtual void impl_contactDataPrepare(Contact& contact) const;
- virtual void impl_contactDataFree(Contact& contact) const;
- virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
- virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
+ virtual void impl_contactDataPrepare(CContact& contact) const;
+ virtual void impl_contactDataFree(CContact& contact) const;
+ virtual void impl_contactDataAcquireMessage(CContact& contact, Message& msg);
+ virtual void impl_contactDataMerge(CContact& contact, const CContact& include) const;
public:
const ColFilterSet& getFilterWords() const { return m_FilterWords; }
diff --git a/plugins/HistoryStats/src/column.h b/plugins/HistoryStats/src/column.h
index 495c65b5f3..2cc401ee39 100644
--- a/plugins/HistoryStats/src/column.h
+++ b/plugins/HistoryStats/src/column.h
@@ -183,13 +183,13 @@ public:
ext::string contactDataGetUID() const { return impl_contactDataGetUID(); }
void contactDataBeginAcquire() { impl_contactDataBeginAcquire(); }
void contactDataEndAcquire() { impl_contactDataEndAcquire(); }
- void contactDataPrepare(Contact& contact) const { impl_contactDataPrepare(contact); }
- void contactDataFree(Contact& contact) const { impl_contactDataFree(contact); }
- void contactDataAcquireMessage(Contact& contact, Message& msg) { impl_contactDataAcquireMessage(contact, msg); }
- void contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration) { impl_contactDataAcquireChat(contact, bOutgoing, localTimestampStarted, duration); }
- void contactDataMerge(Contact& contact, const Contact& include) const { impl_contactDataMerge(contact, include); }
- void contactDataTransform(Contact& contact) const { impl_contactDataTransform(contact); }
- void contactDataTransformCleanup(Contact& contact) const { impl_contactDataTransformCleanup(contact); }
+ void contactDataPrepare(CContact& contact) const { impl_contactDataPrepare(contact); }
+ void contactDataFree(CContact& contact) const { impl_contactDataFree(contact); }
+ void contactDataAcquireMessage(CContact& contact, Message& msg) { impl_contactDataAcquireMessage(contact, msg); }
+ void contactDataAcquireChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration) { impl_contactDataAcquireChat(contact, bOutgoing, localTimestampStarted, duration); }
+ void contactDataMerge(CContact& contact, const CContact& include) const { impl_contactDataMerge(contact, include); }
+ void contactDataTransform(CContact& contact) const { impl_contactDataTransform(contact); }
+ void contactDataTransformCleanup(CContact& contact) const { impl_contactDataTransformCleanup(contact); }
void columnDataBeforeOmit() { impl_columnDataBeforeOmit(); }
void columnDataAfterOmit() { impl_columnDataAfterOmit(); }
StyleList outputGetAdditionalStyles(IDProvider& idp) { return impl_outputGetAdditionalStyles(idp); }
@@ -197,7 +197,7 @@ public:
void outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const { impl_outputRenderHeader(tos, row, rowSpan); }
void outputBegin();
void outputEnd() { impl_outputEnd(); }
- void outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display) { impl_outputRenderRow(tos, contact, display); }
+ void outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display) { impl_outputRenderRow(tos, contact, display); }
protected:
/*** VIRTUAL/ABSTRACT *** GLOBAL ***/
@@ -287,28 +287,28 @@ protected:
* data for given contact. Works on previously defined slot.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataPrepare(Contact&) const { }
+ virtual void impl_contactDataPrepare(CContact&) const { }
/*
* Frees all data structures associated with this column for the
* given contact. Works on previously defined slot.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataFree(Contact&) const { }
+ virtual void impl_contactDataFree(CContact&) const { }
/*
* Acquires data for this column and for the given contact. Works
* on previously defined slot.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataAcquireMessage(Contact&, Message&) { }
+ virtual void impl_contactDataAcquireMessage(CContact&, Message&) { }
/*
* Acquires data for this column and for the given contact. Works
* on previously defined slot.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataAcquireChat(Contact&, bool, uint32_t, uint32_t) { }
+ virtual void impl_contactDataAcquireChat(CContact&, bool, uint32_t, uint32_t) { }
/*** VIRTUAL/ABSTRACT *** DATA POSTPROCESSING ***/
@@ -317,20 +317,20 @@ protected:
* column doesn't acquire any data.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataMerge(Contact&, const Contact&) const { }
+ virtual void impl_contactDataMerge(CContact&, const CContact&) const { }
/*
* Perform any post processing for additional per-contact data. Will
* be called after merge but before sort.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataTransform(Contact&) const { }
+ virtual void impl_contactDataTransform(CContact&) const { }
/*
* Perform cleanup after post processing.
* [virtual/default: do nothing]
*/
- virtual void impl_contactDataTransformCleanup(Contact&) const { }
+ virtual void impl_contactDataTransformCleanup(CContact&) const { }
/*** VIRTUAL/ABSTRACT *** COLUMN SPECIFIC GLOBAL DATA ***/
@@ -385,7 +385,7 @@ protected:
* modfies rendering depending on value in "display".
* [virtual/abstract]
*/
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display) = 0;
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display) = 0;
};
#endif // HISTORYSTATS_GUARD_COLUMN_H
diff --git a/plugins/HistoryStats/src/column_chatduration.cpp b/plugins/HistoryStats/src/column_chatduration.cpp
index 3e6b0cae76..adcdca36ee 100644
--- a/plugins/HistoryStats/src/column_chatduration.cpp
+++ b/plugins/HistoryStats/src/column_chatduration.cpp
@@ -98,18 +98,18 @@ void ColChatDuration::impl_columnDataAfterOmit()
// AFTER, i.e. contacts are trimmed to what user will see
if (m_bGraph) {
- static uint32_t (Contact::*getChatDurX[4])() const = {
- &Contact::getChatDurMin,
- &Contact::getChatDurAvg,
- &Contact::getChatDurMax,
- &Contact::getChatDurSum,
+ static uint32_t (CContact::*getChatDurX[4])() const = {
+ &CContact::getChatDurMin,
+ &CContact::getChatDurAvg,
+ &CContact::getChatDurMax,
+ &CContact::getChatDurSum,
};
m_nMaxForGraph = 1;
upto_each_(i, getStatistic()->countContacts())
{
- const Contact& cur = getStatistic()->getContact(i);
+ const CContact& cur = getStatistic()->getContact(i);
if (cur.isChatDurValid())
m_nMaxForGraph = max(m_nMaxForGraph, (cur.*getChatDurX[m_nVisMode])());
@@ -125,13 +125,13 @@ void ColChatDuration::impl_columnDataAfterOmit()
}
}
-void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
+void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display)
{
- static uint32_t (Contact::*getChatDurX[4])() const = {
- &Contact::getChatDurMin,
- &Contact::getChatDurAvg,
- &Contact::getChatDurMax,
- &Contact::getChatDurSum,
+ static uint32_t (CContact::*getChatDurX[4])() const = {
+ &CContact::getChatDurMin,
+ &CContact::getChatDurAvg,
+ &CContact::getChatDurMax,
+ &CContact::getChatDurSum,
};
// begin output
diff --git a/plugins/HistoryStats/src/column_chatduration.h b/plugins/HistoryStats/src/column_chatduration.h
index ac6a014562..f6af1212fb 100644
--- a/plugins/HistoryStats/src/column_chatduration.h
+++ b/plugins/HistoryStats/src/column_chatduration.h
@@ -40,7 +40,7 @@ protected:
virtual void impl_columnDataAfterOmit();
virtual StyleList impl_outputGetAdditionalStyles(IDProvider& idp);
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_CHATDURATION_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_events.cpp b/plugins/HistoryStats/src/column_events.cpp
index e51d79d1e8..7439c22266 100644
--- a/plugins/HistoryStats/src/column_events.cpp
+++ b/plugins/HistoryStats/src/column_events.cpp
@@ -68,12 +68,12 @@ void ColEvents::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
}
}
-void ColEvents::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColEvents::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType)
{
- static int (Contact::*getData[3])() const = {
- &Contact::getInFiles,
- &Contact::getOutFiles,
- &Contact::getTotalFiles,
+ static int (CContact::*getData[3])() const = {
+ &CContact::getInFiles,
+ &CContact::getOutFiles,
+ &CContact::getTotalFiles,
};
tos << L"<td class=\"num\">"
diff --git a/plugins/HistoryStats/src/column_events.h b/plugins/HistoryStats/src/column_events.h
index 5fd9d52dff..ccebe37dd8 100644
--- a/plugins/HistoryStats/src/column_events.h
+++ b/plugins/HistoryStats/src/column_events.h
@@ -30,7 +30,7 @@ protected:
virtual void impl_configFromUI(OptionsCtrl& Opt);
virtual int impl_configGetRestrictions(ext::string*) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_EVENTS_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_group.cpp b/plugins/HistoryStats/src/column_group.cpp
index 740e97d0e1..3c4dc6c827 100644
--- a/plugins/HistoryStats/src/column_group.cpp
+++ b/plugins/HistoryStats/src/column_group.cpp
@@ -13,7 +13,7 @@ void ColGroup::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
}
}
-void ColGroup::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
+void ColGroup::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display)
{
if (display == asContact)
{
diff --git a/plugins/HistoryStats/src/column_group.h b/plugins/HistoryStats/src/column_group.h
index 4683bdb47e..d4cb88b614 100644
--- a/plugins/HistoryStats/src/column_group.h
+++ b/plugins/HistoryStats/src/column_group.h
@@ -17,7 +17,7 @@ protected:
virtual int impl_getFeatures() const { return 0; }
virtual int impl_configGetRestrictions(ext::string*) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_GROUP_H
diff --git a/plugins/HistoryStats/src/column_inout.cpp b/plugins/HistoryStats/src/column_inout.cpp
index 4a7ab6aec8..257519707f 100644
--- a/plugins/HistoryStats/src/column_inout.cpp
+++ b/plugins/HistoryStats/src/column_inout.cpp
@@ -120,20 +120,20 @@ void ColInOut::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
}
}
-void ColInOut::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColInOut::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType)
{
if (m_bAbsolute)
{
- static int (Contact::*getData[])() const = {
- &Contact::getInBytes,
- &Contact::getOutBytes,
- &Contact::getTotalBytes,
- &Contact::getInMessages,
- &Contact::getOutMessages,
- &Contact::getTotalMessages,
- &Contact::getInChats,
- &Contact::getOutChats,
- &Contact::getTotalChats,
+ static int (CContact::*getData[])() const = {
+ &CContact::getInBytes,
+ &CContact::getOutBytes,
+ &CContact::getTotalBytes,
+ &CContact::getInMessages,
+ &CContact::getOutMessages,
+ &CContact::getTotalMessages,
+ &CContact::getInChats,
+ &CContact::getOutChats,
+ &CContact::getTotalChats,
};
tos << L"<td class=\"num\">"
@@ -142,16 +142,16 @@ void ColInOut::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
}
else
{
- static double (Contact::*getData[])() const = {
- &Contact::getInBytesAvg,
- &Contact::getOutBytesAvg,
- &Contact::getTotalBytesAvg,
- &Contact::getInMessagesAvg,
- &Contact::getOutMessagesAvg,
- &Contact::getTotalMessagesAvg,
- &Contact::getInChatsAvg,
- &Contact::getOutChatsAvg,
- &Contact::getTotalChatsAvg,
+ static double (CContact::*getData[])() const = {
+ &CContact::getInBytesAvg,
+ &CContact::getOutBytesAvg,
+ &CContact::getTotalBytesAvg,
+ &CContact::getInMessagesAvg,
+ &CContact::getOutMessagesAvg,
+ &CContact::getTotalMessagesAvg,
+ &CContact::getInChatsAvg,
+ &CContact::getOutChatsAvg,
+ &CContact::getTotalChatsAvg,
};
static const double avgFactor[] = {
diff --git a/plugins/HistoryStats/src/column_inout.h b/plugins/HistoryStats/src/column_inout.h
index c1ece71bff..fd8be4025e 100644
--- a/plugins/HistoryStats/src/column_inout.h
+++ b/plugins/HistoryStats/src/column_inout.h
@@ -34,7 +34,7 @@ protected:
virtual void impl_configFromUI(OptionsCtrl& Opt);
virtual int impl_configGetRestrictions(ext::string*) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_INOUT_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_inoutgraph.cpp b/plugins/HistoryStats/src/column_inoutgraph.cpp
index f5f10559fd..f293ac1f95 100644
--- a/plugins/HistoryStats/src/column_inoutgraph.cpp
+++ b/plugins/HistoryStats/src/column_inoutgraph.cpp
@@ -168,20 +168,20 @@ void ColInOutGraph::impl_outputRenderHeader(ext::ostream& tos, int row, int rowS
}
}
-void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType)
{
// fetch absolute values
- static int (Contact::*getOut[3])() const = { &Contact::getOutBytes, &Contact::getOutMessages, &Contact::getOutChats };
- static int (Contact::*getIn[3])() const = { &Contact::getInBytes, &Contact::getInMessages, &Contact::getInChats };
+ static int (CContact::*getOut[3])() const = { &CContact::getOutBytes, &CContact::getOutMessages, &CContact::getOutChats };
+ static int (CContact::*getIn[3])() const = { &CContact::getInBytes, &CContact::getInMessages, &CContact::getInChats };
int numOut = (contact.*getOut[m_nSource])();
int numIn = (contact.*getIn[m_nSource])();
int numTotal = numOut + numIn;
// fetch average values
- static double (Contact::*getAvgOut[3])() const = { &Contact::getOutBytesAvg, &Contact::getOutMessagesAvg, &Contact::getOutChatsAvg };
- static double (Contact::*getAvgIn[3])() const = { &Contact::getInBytesAvg, &Contact::getInMessagesAvg, &Contact::getInChatsAvg };
- static double (Contact::*getAvgTotal[3])() const = { &Contact::getTotalBytesAvg, &Contact::getTotalMessagesAvg, &Contact::getTotalChatsAvg };
+ static double (CContact::*getAvgOut[3])() const = { &CContact::getOutBytesAvg, &CContact::getOutMessagesAvg, &CContact::getOutChatsAvg };
+ static double (CContact::*getAvgIn[3])() const = { &CContact::getInBytesAvg, &CContact::getInMessagesAvg, &CContact::getInChatsAvg };
+ static double (CContact::*getAvgTotal[3])() const = { &CContact::getTotalBytesAvg, &CContact::getTotalMessagesAvg, &CContact::getTotalChatsAvg };
static const double avgFactor[] = {
60.0 * 60.0 * 24.0,
diff --git a/plugins/HistoryStats/src/column_inoutgraph.h b/plugins/HistoryStats/src/column_inoutgraph.h
index 6b08170ff4..40acdff87c 100644
--- a/plugins/HistoryStats/src/column_inoutgraph.h
+++ b/plugins/HistoryStats/src/column_inoutgraph.h
@@ -48,7 +48,7 @@ protected:
virtual StyleList impl_outputGetAdditionalStyles(IDProvider& idp);
virtual SIZE impl_outputMeasureHeader() const;
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_INOUTGRAPH_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_nick.cpp b/plugins/HistoryStats/src/column_nick.cpp
index 948656d5d1..6b665232d7 100644
--- a/plugins/HistoryStats/src/column_nick.cpp
+++ b/plugins/HistoryStats/src/column_nick.cpp
@@ -56,7 +56,7 @@ void ColNick::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) c
}
}
-void ColNick::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
+void ColNick::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display)
{
tos << L"<td";
diff --git a/plugins/HistoryStats/src/column_nick.h b/plugins/HistoryStats/src/column_nick.h
index b11959838e..1dea54b2e3 100644
--- a/plugins/HistoryStats/src/column_nick.h
+++ b/plugins/HistoryStats/src/column_nick.h
@@ -32,7 +32,7 @@ protected:
virtual void impl_configFromUI(OptionsCtrl& Opt);
virtual int impl_configGetRestrictions(ext::string*) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_NICK_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_protocol.cpp b/plugins/HistoryStats/src/column_protocol.cpp
index ac583492ac..0e7f0fb81a 100644
--- a/plugins/HistoryStats/src/column_protocol.cpp
+++ b/plugins/HistoryStats/src/column_protocol.cpp
@@ -11,7 +11,7 @@ void ColProtocol::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpa
writeRowspanTD(tos, getCustomTitle(TranslateT("Protocol"), TranslateT("Protocol")), row, 1, rowSpan);
}
-void ColProtocol::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
+void ColProtocol::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display)
{
if (display == asContact)
tos << L"<td>" << utils::htmlEscape(contact.getProtocol()) << L"</td>" << ext::endl;
diff --git a/plugins/HistoryStats/src/column_protocol.h b/plugins/HistoryStats/src/column_protocol.h
index 1fc303e91f..a3cdb83b19 100644
--- a/plugins/HistoryStats/src/column_protocol.h
+++ b/plugins/HistoryStats/src/column_protocol.h
@@ -17,7 +17,7 @@ protected:
virtual int impl_getFeatures() const { return 0; }
virtual int impl_configGetRestrictions(ext::string*) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
diff --git a/plugins/HistoryStats/src/column_rank.cpp b/plugins/HistoryStats/src/column_rank.cpp
index 93f2027961..f0e8368a22 100644
--- a/plugins/HistoryStats/src/column_rank.cpp
+++ b/plugins/HistoryStats/src/column_rank.cpp
@@ -16,7 +16,7 @@ void ColRank::impl_outputBegin()
m_nNextRank = 1;
}
-void ColRank::impl_outputRenderRow(ext::ostream& tos, const Contact&, DisplayType display)
+void ColRank::impl_outputRenderRow(ext::ostream& tos, const CContact&, DisplayType display)
{
if (display == asContact)
tos << L"<td class=\"num\">"
diff --git a/plugins/HistoryStats/src/column_rank.h b/plugins/HistoryStats/src/column_rank.h
index fddadbaae7..b7ba469a1c 100644
--- a/plugins/HistoryStats/src/column_rank.h
+++ b/plugins/HistoryStats/src/column_rank.h
@@ -21,7 +21,7 @@ protected:
virtual int impl_configGetRestrictions(ext::string*) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
virtual void impl_outputBegin();
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_RANK_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp
index 1866d0f765..b1cc140530 100644
--- a/plugins/HistoryStats/src/column_split.cpp
+++ b/plugins/HistoryStats/src/column_split.cpp
@@ -167,7 +167,7 @@ void ColSplit::impl_contactDataBeginAcquire()
}
}
-void ColSplit::impl_contactDataPrepare(Contact& contact) const
+void ColSplit::impl_contactDataPrepare(CContact& contact) const
{
SplitParams params = getParams();
@@ -181,7 +181,7 @@ void ColSplit::impl_contactDataPrepare(Contact& contact) const
contact.setSlot(contactDataSlotGet(), pData);
}
-void ColSplit::impl_contactDataFree(Contact& contact) const
+void ColSplit::impl_contactDataFree(CContact& contact) const
{
int* pData = reinterpret_cast<int*>(contact.getSlot(contactDataSlotGet()));
@@ -192,7 +192,7 @@ void ColSplit::impl_contactDataFree(Contact& contact) const
}
}
-void ColSplit::addToSlot(Contact& contact, uint32_t localTimestamp, int toAdd)
+void ColSplit::addToSlot(CContact& contact, uint32_t localTimestamp, int toAdd)
{
if (toAdd > 0)
{
@@ -202,7 +202,7 @@ void ColSplit::addToSlot(Contact& contact, uint32_t localTimestamp, int toAdd)
}
}
-void ColSplit::impl_contactDataAcquireMessage(Contact& contact, Message& msg)
+void ColSplit::impl_contactDataAcquireMessage(CContact& contact, Message& msg)
{
if (!msg.isOutgoing() && m_nSourceType == 0 || msg.isOutgoing() && m_nSourceType == 1 || m_nSourceType == 2)
{
@@ -217,7 +217,7 @@ void ColSplit::impl_contactDataAcquireMessage(Contact& contact, Message& msg)
}
}
-void ColSplit::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
+void ColSplit::impl_contactDataAcquireChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
{
if (m_nSource == 2 && (!bOutgoing && m_nSourceType == 0 || bOutgoing && m_nSourceType == 1 || m_nSourceType == 2))
{
@@ -225,7 +225,7 @@ void ColSplit::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uin
}
}
-void ColSplit::impl_contactDataMerge(Contact& contact, const Contact& include) const
+void ColSplit::impl_contactDataMerge(CContact& contact, const CContact& include) const
{
SplitParams params = getParams();
@@ -340,7 +340,7 @@ ColSplit::SplitParams ColSplit::getParams() const
return params;
}
-void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColSplit::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType)
{
SplitParams params = getParams();
diff --git a/plugins/HistoryStats/src/column_split.h b/plugins/HistoryStats/src/column_split.h
index 88284554f4..02a36c32f5 100644
--- a/plugins/HistoryStats/src/column_split.h
+++ b/plugins/HistoryStats/src/column_split.h
@@ -43,7 +43,7 @@ private:
private:
SplitParams getParams() const;
- void addToSlot(Contact& contact, uint32_t localTimestamp, int toAdd);
+ void addToSlot(CContact& contact, uint32_t localTimestamp, int toAdd);
public:
explicit ColSplit();
@@ -61,14 +61,14 @@ protected:
virtual int impl_configGetRestrictions(ext::string* pDetails) const;
virtual ext::string impl_contactDataGetUID() const;
virtual void impl_contactDataBeginAcquire();
- virtual void impl_contactDataPrepare(Contact& contact) const;
- virtual void impl_contactDataFree(Contact& contact) const;
- virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
- virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
- virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
+ virtual void impl_contactDataPrepare(CContact& contact) const;
+ virtual void impl_contactDataFree(CContact& contact) const;
+ virtual void impl_contactDataAcquireMessage(CContact& contact, Message& msg);
+ virtual void impl_contactDataAcquireChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
+ virtual void impl_contactDataMerge(CContact& contact, const CContact& include) const;
virtual StyleList impl_outputGetAdditionalStyles(IDProvider& idp);
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_SPLIT_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp
index 8737fe7879..1d63efa2c4 100644
--- a/plugins/HistoryStats/src/column_splittimeline.cpp
+++ b/plugins/HistoryStats/src/column_splittimeline.cpp
@@ -187,14 +187,14 @@ void ColSplitTimeline::impl_contactDataBeginAcquire()
}
}
-void ColSplitTimeline::impl_contactDataPrepare(Contact& contact) const
+void ColSplitTimeline::impl_contactDataPrepare(CContact& contact) const
{
TimelineMap* pData = new TimelineMap;
contact.setSlot(contactDataSlotGet(), pData);
}
-void ColSplitTimeline::impl_contactDataFree(Contact& contact) const
+void ColSplitTimeline::impl_contactDataFree(CContact& contact) const
{
TimelineMap* pData = reinterpret_cast<TimelineMap*>(contact.getSlot(contactDataSlotGet()));
@@ -205,7 +205,7 @@ void ColSplitTimeline::impl_contactDataFree(Contact& contact) const
}
}
-void ColSplitTimeline::addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd)
+void ColSplitTimeline::addToSlot(CContact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd)
{
if (toAdd > 0)
{
@@ -217,7 +217,7 @@ void ColSplitTimeline::addToSlot(Contact& contact, bool bOutgoing, uint32_t loca
}
}
-void ColSplitTimeline::impl_contactDataAcquireMessage(Contact& contact, Message& msg)
+void ColSplitTimeline::impl_contactDataAcquireMessage(CContact& contact, Message& msg)
{
if (m_nSource == 0)
{
@@ -229,7 +229,7 @@ void ColSplitTimeline::impl_contactDataAcquireMessage(Contact& contact, Message&
}
}
-void ColSplitTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
+void ColSplitTimeline::impl_contactDataAcquireChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
{
if (m_nSource == 2)
{
@@ -237,7 +237,7 @@ void ColSplitTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgo
}
}
-void ColSplitTimeline::impl_contactDataMerge(Contact& contact, const Contact& include) const
+void ColSplitTimeline::impl_contactDataMerge(CContact& contact, const CContact& include) const
{
TimelineMap* pData = reinterpret_cast<TimelineMap*>(contact.getSlot(contactDataSlotGet()));
const TimelineMap* pIncData = reinterpret_cast<const TimelineMap*>(include.getSlot(contactDataSlotGet()));
@@ -357,7 +357,7 @@ void ColSplitTimeline::impl_columnDataAfterOmit()
m_nTimelineWidth = 3 * ((m_nNumBlocks + params.blocks_in_column * params.columns_to_group - 1) / (params.blocks_in_column * params.columns_to_group));
}
-void ColSplitTimeline::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
+void ColSplitTimeline::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display)
{
if (m_nSourceType != 3)
{
@@ -420,7 +420,7 @@ ColSplitTimeline::SplitParams ColSplitTimeline::getParams() const
return params;
}
-void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const CContact& contact, DisplayType)
{
SplitParams params = getParams();
const TimelineMap* pData = reinterpret_cast<const TimelineMap*>(contact.getSlot(contactDataSlotGet()));
@@ -554,7 +554,7 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co
tos << L"</td>" << ext::endl;
}
-void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const CContact& contact, DisplayType)
{
SplitParams params = getParams();
const TimelineMap* pData = reinterpret_cast<const TimelineMap*>(contact.getSlot(contactDataSlotGet()));
diff --git a/plugins/HistoryStats/src/column_splittimeline.h b/plugins/HistoryStats/src/column_splittimeline.h
index 89fc04e4bb..53a7bf987e 100644
--- a/plugins/HistoryStats/src/column_splittimeline.h
+++ b/plugins/HistoryStats/src/column_splittimeline.h
@@ -67,10 +67,10 @@ private:
}
SplitParams getParams() const;
- void addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd);
+ void addToSlot(CContact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd);
- void outputRenderRowInOut(ext::ostream& tos, const Contact& contact, DisplayType display);
- void outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType display);
+ void outputRenderRowInOut(ext::ostream& tos, const CContact& contact, DisplayType display);
+ void outputRenderRowRatio(ext::ostream& tos, const CContact& contact, DisplayType display);
public:
explicit ColSplitTimeline();
@@ -88,14 +88,14 @@ protected:
virtual int impl_configGetRestrictions(ext::string*) const { return crPNGFull; }
virtual ext::string impl_contactDataGetUID() const;
virtual void impl_contactDataBeginAcquire();
- virtual void impl_contactDataPrepare(Contact& contact) const;
- virtual void impl_contactDataFree(Contact& contact) const;
- virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
- virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
- virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
+ virtual void impl_contactDataPrepare(CContact& contact) const;
+ virtual void impl_contactDataFree(CContact& contact) const;
+ virtual void impl_contactDataAcquireMessage(CContact& contact, Message& msg);
+ virtual void impl_contactDataAcquireChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
+ virtual void impl_contactDataMerge(CContact& contact, const CContact& include) const;
virtual void impl_columnDataAfterOmit();
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_SPLITTIMELINE_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_timeline.cpp b/plugins/HistoryStats/src/column_timeline.cpp
index 1910701edd..96d7d52374 100644
--- a/plugins/HistoryStats/src/column_timeline.cpp
+++ b/plugins/HistoryStats/src/column_timeline.cpp
@@ -99,14 +99,14 @@ ext::string ColTimeline::impl_contactDataGetUID() const
return ext::str(ext::format(L"timeline-|") % m_nSource);
}
-void ColTimeline::impl_contactDataPrepare(Contact& contact) const
+void ColTimeline::impl_contactDataPrepare(CContact& contact) const
{
TimelineMap* pData = new TimelineMap;
contact.setSlot(contactDataSlotGet(), pData);
}
-void ColTimeline::impl_contactDataFree(Contact& contact) const
+void ColTimeline::impl_contactDataFree(CContact& contact) const
{
TimelineMap* pData = reinterpret_cast<TimelineMap*>(contact.getSlot(contactDataSlotGet()));
@@ -117,7 +117,7 @@ void ColTimeline::impl_contactDataFree(Contact& contact) const
}
}
-void ColTimeline::addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd)
+void ColTimeline::addToSlot(CContact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd)
{
if (toAdd > 0)
{
@@ -129,7 +129,7 @@ void ColTimeline::addToSlot(Contact& contact, bool bOutgoing, uint32_t localTime
}
}
-void ColTimeline::impl_contactDataAcquireMessage(Contact& contact, Message& msg)
+void ColTimeline::impl_contactDataAcquireMessage(CContact& contact, Message& msg)
{
if (m_nSource == 0)
{
@@ -141,7 +141,7 @@ void ColTimeline::impl_contactDataAcquireMessage(Contact& contact, Message& msg)
}
}
-void ColTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
+void ColTimeline::impl_contactDataAcquireChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t)
{
if (m_nSource == 2)
{
@@ -149,7 +149,7 @@ void ColTimeline::impl_contactDataAcquireChat(Contact& contact, bool bOutgoing,
}
}
-void ColTimeline::impl_contactDataMerge(Contact& contact, const Contact& include) const
+void ColTimeline::impl_contactDataMerge(CContact& contact, const CContact& include) const
{
TimelineMap* pData = reinterpret_cast<TimelineMap*>(contact.getSlot(contactDataSlotGet()));
const TimelineMap* pIncData = reinterpret_cast<const TimelineMap*>(include.getSlot(contactDataSlotGet()));
@@ -230,7 +230,7 @@ void ColTimeline::impl_columnDataAfterOmit()
m_nTimelineWidth = 3 * (1 + (m_nLastDay - m_nFirstDay) / m_nDays);
}
-void ColTimeline::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
+void ColTimeline::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display)
{
if (m_nSourceType != 3)
{
@@ -242,7 +242,7 @@ void ColTimeline::impl_outputRenderRow(ext::ostream& tos, const Contact& contact
}
}
-void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const CContact& contact, DisplayType)
{
const TimelineMap* pData = reinterpret_cast<const TimelineMap*>(contact.getSlot(contactDataSlotGet()));
@@ -381,7 +381,7 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact
}
}
-void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const CContact& contact, DisplayType)
{
const TimelineMap* pData = reinterpret_cast<const TimelineMap*>(contact.getSlot(contactDataSlotGet()));
diff --git a/plugins/HistoryStats/src/column_timeline.h b/plugins/HistoryStats/src/column_timeline.h
index 751b296ce1..e81618132f 100644
--- a/plugins/HistoryStats/src/column_timeline.h
+++ b/plugins/HistoryStats/src/column_timeline.h
@@ -43,10 +43,10 @@ private:
return 0;
}
- void addToSlot(Contact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd);
+ void addToSlot(CContact& contact, bool bOutgoing, uint32_t localTimestamp, int toAdd);
- void outputRenderRowInOut(ext::ostream& tos, const Contact& contact, DisplayType display);
- void outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType display);
+ void outputRenderRowInOut(ext::ostream& tos, const CContact& contact, DisplayType display);
+ void outputRenderRowRatio(ext::ostream& tos, const CContact& contact, DisplayType display);
public:
explicit ColTimeline();
@@ -63,15 +63,15 @@ protected:
virtual void impl_configFromUI(OptionsCtrl& Opt);
virtual int impl_configGetRestrictions(ext::string* pDetails) const;
virtual ext::string impl_contactDataGetUID() const;
- virtual void impl_contactDataPrepare(Contact& contact) const;
- virtual void impl_contactDataFree(Contact& contact) const;
- virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
- virtual void impl_contactDataAcquireChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
- virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
+ virtual void impl_contactDataPrepare(CContact& contact) const;
+ virtual void impl_contactDataFree(CContact& contact) const;
+ virtual void impl_contactDataAcquireMessage(CContact& contact, Message& msg);
+ virtual void impl_contactDataAcquireChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
+ virtual void impl_contactDataMerge(CContact& contact, const CContact& include) const;
virtual void impl_columnDataAfterOmit();
virtual StyleList impl_outputGetAdditionalStyles(IDProvider& idp);
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_TIMELINE_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_wordcount.cpp b/plugins/HistoryStats/src/column_wordcount.cpp
index e764e378de..7de0db68b8 100644
--- a/plugins/HistoryStats/src/column_wordcount.cpp
+++ b/plugins/HistoryStats/src/column_wordcount.cpp
@@ -63,7 +63,7 @@ void ColWordCount::impl_configFromUI(OptionsCtrl& Opt)
m_bDetail = Opt.isItemChecked (m_hDetail );
}
-void ColWordCount::impl_contactDataFree(Contact& contact) const
+void ColWordCount::impl_contactDataFree(CContact& contact) const
{
ColBaseWords::impl_contactDataFree(contact);
@@ -76,7 +76,7 @@ void ColWordCount::impl_contactDataFree(Contact& contact) const
}
}
-void ColWordCount::impl_contactDataTransform(Contact& contact) const
+void ColWordCount::impl_contactDataTransform(CContact& contact) const
{
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
size_t* pTrData = new size_t[2];
@@ -95,7 +95,7 @@ void ColWordCount::impl_contactDataTransform(Contact& contact) const
pTrData[1] = pData->size();
}
-void ColWordCount::impl_contactDataTransformCleanup(Contact& contact) const
+void ColWordCount::impl_contactDataTransformCleanup(CContact& contact) const
{
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
@@ -132,7 +132,7 @@ void ColWordCount::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSp
}
}
-void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType)
{
const size_t* pWordCount = reinterpret_cast<const size_t*>(contact.getSlot(contactDataTransformSlotGet()));
diff --git a/plugins/HistoryStats/src/column_wordcount.h b/plugins/HistoryStats/src/column_wordcount.h
index e29b6836aa..93f52a3ed2 100644
--- a/plugins/HistoryStats/src/column_wordcount.h
+++ b/plugins/HistoryStats/src/column_wordcount.h
@@ -29,11 +29,11 @@ protected:
virtual void impl_configWrite(SettingsTree& settings) const;
virtual void impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup);
virtual void impl_configFromUI(OptionsCtrl& Opt);
- virtual void impl_contactDataFree(Contact& contact) const;
- virtual void impl_contactDataTransform(Contact& contact) const;
- virtual void impl_contactDataTransformCleanup(Contact& contact) const;
+ virtual void impl_contactDataFree(CContact& contact) const;
+ virtual void impl_contactDataTransform(CContact& contact) const;
+ virtual void impl_contactDataTransformCleanup(CContact& contact) const;
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_WORDCOUNT_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/column_words.cpp b/plugins/HistoryStats/src/column_words.cpp
index 47028ffccf..0cb5b1e053 100644
--- a/plugins/HistoryStats/src/column_words.cpp
+++ b/plugins/HistoryStats/src/column_words.cpp
@@ -165,7 +165,7 @@ void ColWords::impl_configFromUI(OptionsCtrl& Opt)
utils::ensureRange(m_nNum, 1, 1000, 10);
}
-void ColWords::impl_contactDataFree(Contact& contact) const
+void ColWords::impl_contactDataFree(CContact& contact) const
{
ColBaseWords::impl_contactDataFree(contact);
@@ -178,7 +178,7 @@ void ColWords::impl_contactDataFree(Contact& contact) const
}
}
-void ColWords::impl_contactDataTransform(Contact& contact) const
+void ColWords::impl_contactDataTransform(CContact& contact) const
{
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
WordList* pTrData = new WordList;
@@ -188,7 +188,7 @@ void ColWords::impl_contactDataTransform(Contact& contact) const
generateWords(pData, pTrData);
}
-void ColWords::impl_contactDataTransformCleanup(Contact& contact) const
+void ColWords::impl_contactDataTransformCleanup(CContact& contact) const
{
WordMap* pData = reinterpret_cast<WordMap*>(contact.getSlot(contactDataSlotGet()));
@@ -238,7 +238,7 @@ void ColWords::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
}
}
-void ColWords::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType)
+void ColWords::impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType)
{
const WordList* pWords = reinterpret_cast<const WordList*>(contact.getSlot(contactDataTransformSlotGet()));
diff --git a/plugins/HistoryStats/src/column_words.h b/plugins/HistoryStats/src/column_words.h
index d215fd4753..915b058ac3 100644
--- a/plugins/HistoryStats/src/column_words.h
+++ b/plugins/HistoryStats/src/column_words.h
@@ -72,12 +72,12 @@ protected:
virtual void impl_configWrite(SettingsTree& settings) const;
virtual void impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup);
virtual void impl_configFromUI(OptionsCtrl& Opt);
- virtual void impl_contactDataFree(Contact& contact) const;
- virtual void impl_contactDataTransform(Contact& contact) const;
- virtual void impl_contactDataTransformCleanup(Contact& contact) const;
+ virtual void impl_contactDataFree(CContact& contact) const;
+ virtual void impl_contactDataTransform(CContact& contact) const;
+ virtual void impl_contactDataTransformCleanup(CContact& contact) const;
virtual StyleList impl_outputGetAdditionalStyles(IDProvider& idp);
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
- virtual void impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display);
+ virtual void impl_outputRenderRow(ext::ostream& tos, const CContact& contact, DisplayType display);
};
#endif // HISTORYSTATS_GUARD_COLUMN_WORDS_H \ No newline at end of file
diff --git a/plugins/HistoryStats/src/contact.cpp b/plugins/HistoryStats/src/contact.cpp
index cd96f3c224..c6a4617c9b 100644
--- a/plugins/HistoryStats/src/contact.cpp
+++ b/plugins/HistoryStats/src/contact.cpp
@@ -5,7 +5,7 @@
#include <queue>
#include <cmath>
-Contact::Contact(Statistic* pStatistic, int nSlots, const ext::string& nick, const ext::string& protocol, const ext::string& group, int nContacts, int nSubcontacts) :
+CContact::CContact(Statistic* pStatistic, int nSlots, const ext::string& nick, const ext::string& protocol, const ext::string& group, int nContacts, int nSubcontacts) :
m_Nick(nick),
m_Protocol(protocol),
m_Group(group),
@@ -27,7 +27,7 @@ Contact::Contact(Statistic* pStatistic, int nSlots, const ext::string& nick, con
m_Slots.resize(nSlots, NULL);
}
-void Contact::updateTime(uint32_t msgTime)
+void CContact::updateTime(uint32_t msgTime)
{
if (!m_bFirstLastTimeValid) {
m_FirstTime = msgTime;
@@ -40,7 +40,7 @@ void Contact::updateTime(uint32_t msgTime)
}
}
-void Contact::updateChatDur(uint32_t timeDelta)
+void CContact::updateChatDur(uint32_t timeDelta)
{
m_bChatDurValid = true;
@@ -50,7 +50,7 @@ void Contact::updateChatDur(uint32_t timeDelta)
m_ChatDurMax = max(m_ChatDurMax, timeDelta);
}
-double Contact::getAvg(int nTotal) const
+double CContact::getAvg(int nTotal) const
{
uint32_t dwHistTime = m_pStatistic->getLastTime() - getFirstTime();
if (dwHistTime < m_pStatistic->getAverageMinTime())
@@ -59,7 +59,7 @@ double Contact::getAvg(int nTotal) const
return dwHistTime ? (0.0 + nTotal) / dwHistTime : 0.0;
}
-void Contact::addMessage(Message& msg)
+void CContact::addMessage(Message& msg)
{
if (msg.isOutgoing()) {
m_Bytes.out += msg.getLength();
@@ -73,7 +73,7 @@ void Contact::addMessage(Message& msg)
updateTime(msg.getTimestamp());
}
-void Contact::addChat(bool bOutgoing, uint32_t, uint32_t duration)
+void CContact::addChat(bool bOutgoing, uint32_t, uint32_t duration)
{
if (bOutgoing)
m_Chats.out++;
@@ -83,7 +83,7 @@ void Contact::addChat(bool bOutgoing, uint32_t, uint32_t duration)
updateChatDur(duration);
}
-void Contact::addEvent(uint16_t eventType, bool bOutgoing)
+void CContact::addEvent(uint16_t eventType, bool bOutgoing)
{
InOut* pIO = nullptr;
@@ -102,7 +102,7 @@ void Contact::addEvent(uint16_t eventType, bool bOutgoing)
pIO->in++;
}
-void Contact::merge(const Contact& other)
+void CContact::merge(const CContact& other)
{
if (m_Nick != other.m_Nick)
m_Nick = TranslateT("(multiple)");
diff --git a/plugins/HistoryStats/src/contact.h b/plugins/HistoryStats/src/contact.h
index 4da79c71a7..b57b02126d 100644
--- a/plugins/HistoryStats/src/contact.h
+++ b/plugins/HistoryStats/src/contact.h
@@ -15,11 +15,11 @@
#include "statistic.h"
/*
- * Contact
+ * CContact
*/
-class Contact
- : private pattern::NotCopyable<Contact>
+class CContact
+ : private pattern::NotCopyable<CContact>
{
private:
ext::string m_Nick;
@@ -48,7 +48,7 @@ private:
double getAvg(int nTotal) const;
public:
- explicit Contact(Statistic* pStatistic, int nSlots, const ext::string& nick, const ext::string& protocol, const ext::string& group, int nContacts, int nSubcontacts);
+ explicit CContact(Statistic* pStatistic, int nSlots, const ext::string& nick, const ext::string& protocol, const ext::string& group, int nContacts, int nSubcontacts);
// basic contact info
const ext::string& getNick() const { return m_Nick; }
@@ -107,7 +107,7 @@ public:
void addMessage(Message& msg);
void addChat(bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
void addEvent(uint16_t eventType, bool bOutgoing);
- void merge(const Contact& other);
+ void merge(const CContact& other);
// slot stuff
int countSlot() const { return m_Slots.size(); }
@@ -126,7 +126,7 @@ protected:
bool m_bAsc;
public:
- virtual bool cmp(const Contact&, const Contact&) { return m_bAsc; }
+ virtual bool cmp(const CContact&, const CContact&) { return m_bAsc; }
void setDir(bool bAsc) { m_bAsc = bAsc; }
explicit ContactCompareBase() : m_bAsc(true) { }
};
@@ -140,11 +140,11 @@ class ContactCompare
: public ContactCompareBase
{
private:
- T_ (Contact::*m_getData)() const;
+ T_ (CContact::*m_getData)() const;
ContactCompareBase* m_pNextCmp;
public:
- virtual bool cmp(const Contact& first, const Contact& second)
+ virtual bool cmp(const CContact& first, const CContact& second)
{
T_ firstVal = (first.*m_getData)();
T_ secondVal = (second.*m_getData)();
@@ -160,7 +160,7 @@ public:
}
public:
- explicit ContactCompare(ContactCompareBase* pNextCmp, T_ (Contact::*getData)() const)
+ explicit ContactCompare(ContactCompareBase* pNextCmp, T_ (CContact::*getData)() const)
: m_pNextCmp(pNextCmp)
{
m_getData = getData;
@@ -175,11 +175,11 @@ class ContactCompareStr
: public ContactCompareBase
{
private:
- const ext::string& (Contact::*m_getData)() const;
+ const ext::string& (CContact::*m_getData)() const;
ContactCompareBase* m_pNextCmp;
public:
- virtual bool cmp(const Contact& first, const Contact& second)
+ virtual bool cmp(const CContact& first, const CContact& second)
{
const ext::string& firstVal = (first.*m_getData)();
const ext::string& secondVal = (second.*m_getData)();
@@ -198,7 +198,7 @@ public:
}
public:
- explicit ContactCompareStr(ContactCompareBase* pNextCmp, const ext::string& (Contact::*getData)() const)
+ explicit ContactCompareStr(ContactCompareBase* pNextCmp, const ext::string& (CContact::*getData)() const)
: m_pNextCmp(pNextCmp)
{
m_getData = getData;
@@ -215,7 +215,7 @@ private:
ContactCompareBase* m_pCmp;
public:
- bool operator ()(const Contact* first, const Contact* second) { return m_pCmp->cmp(*first, *second); }
+ bool operator ()(const CContact* first, const CContact* second) { return m_pCmp->cmp(*first, *second); }
explicit ContactCompareOp(ContactCompareBase* pCmp) : m_pCmp(pCmp) { }
};
diff --git a/plugins/HistoryStats/src/dlgoption_subinput.cpp b/plugins/HistoryStats/src/dlgoption_subinput.cpp
index 31f836c87f..d35b302686 100644
--- a/plugins/HistoryStats/src/dlgoption_subinput.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subinput.cpp
@@ -73,7 +73,7 @@ void DlgOption::SubInput::onWMInitDialog()
m_hChatSessionTimeout = m_Options.insertEdit(hTemp, TranslateT("Time between two chat sessions (seconds)"), L"", OptionsCtrl::OCF_NUMBER);
m_hAverageMinTime = m_Options.insertEdit(hTemp, TranslateT("Minimum time to assume when calculating average (days)"), L"", OptionsCtrl::OCF_NUMBER);
m_hWordDelimiters = m_Options.insertEdit(hTemp, TranslateT("Word delimiting characters"));
- hTemp = m_Options.insertGroup(nullptr, TranslateT("Contact filtering"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("CContact filtering"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hProtocols = m_Options.insertGroup(hTemp, TranslateT("Ignore all contacts with protocol..."));
hTemp2 = m_Options.insertGroup(hTemp, TranslateT("History read mode for metacontacts"), 0);
diff --git a/plugins/HistoryStats/src/dlgoption_suboutput.cpp b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
index bd20a1744e..1fc553fd2b 100644
--- a/plugins/HistoryStats/src/dlgoption_suboutput.cpp
+++ b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
@@ -98,7 +98,7 @@ void DlgOption::SubOutput::onWMInitDialog()
OptionsCtrl::Item hTemp;
OptionsCtrl::Item hTemp2;
- hTemp = m_Options.insertGroup(nullptr, TranslateT("Contact filtering and totals"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
+ hTemp = m_Options.insertGroup(nullptr, TranslateT("CContact filtering and totals"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hRemoveEmptyContacts = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with empty history"));
m_hRemoveOutChatsZero = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with only incoming chats"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hRemoveOutBytesZero = m_Options.insertCheck(m_hRemoveOutChatsZero, TranslateT("Remove only if you never answered"));
diff --git a/plugins/HistoryStats/src/iconlib.cpp b/plugins/HistoryStats/src/iconlib.cpp
index 4e2ff979d2..26aa494e16 100644
--- a/plugins/HistoryStats/src/iconlib.cpp
+++ b/plugins/HistoryStats/src/iconlib.cpp
@@ -11,7 +11,7 @@ IconLib::IconInfo IconLib::m_IconInfo[] = {
{ IDI_HISTORYSTATS , "main_menu" , nullptr, LPGENW("Create statistics (main menu)") },
{ IDI_HISTORYSTATS , "menu_show" , nullptr, LPGENW("Show statistics (main menu)") },
{ IDI_HISTORYSTATS , "menu_config" , nullptr, LPGENW("Configure... (main menu)") },
- { IDI_HISTORYSTATS , "contact_menu" , nullptr, LPGENW("Contact menu") },
+ { IDI_HISTORYSTATS , "contact_menu" , nullptr, LPGENW("CContact menu") },
{ IDI_EXCLUDE_NO , "exclude_no" , nullptr, LPGENW("Unexcluded contacts") },
{ IDI_EXCLUDE_YES , "exclude_yes" , nullptr, LPGENW("Excluded contacts") },
{ IDI_TREE_CHECK1 , "tree_check1" , LPGENW("Options tree"), LPGENW("Checkbox") },
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index 79c2eeac1e..37da089c20 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -65,7 +65,7 @@ void Statistic::prepareColumns()
}
}
-void Statistic::prepareContactData(Contact& contact)
+void Statistic::prepareContactData(CContact& contact)
{
iter_each_(std::vector<Column*>, i, m_AcquireCols)
{
@@ -73,7 +73,7 @@ void Statistic::prepareContactData(Contact& contact)
}
}
-void Statistic::freeContactData(Contact& contact)
+void Statistic::freeContactData(CContact& contact)
{
iter_each_(std::vector<Column*>, i, m_AcquireCols)
{
@@ -86,7 +86,7 @@ void Statistic::freeContactData(Contact& contact)
}
}
-void Statistic::mergeContactData(Contact& contact, const Contact& include)
+void Statistic::mergeContactData(CContact& contact, const CContact& include)
{
iter_each_(std::vector<Column*>, i, m_AcquireCols)
{
@@ -94,7 +94,7 @@ void Statistic::mergeContactData(Contact& contact, const Contact& include)
}
}
-void Statistic::transformContactData(Contact& contact)
+void Statistic::transformContactData(CContact& contact)
{
iter_each_(std::vector<Column*>, i, m_TransformCols)
{
@@ -102,9 +102,9 @@ void Statistic::transformContactData(Contact& contact)
}
}
-Contact& Statistic::addContact(const ext::string& nick, const ext::string& protoDisplayName, const ext::string& groupName, int nSources)
+CContact& Statistic::addContact(const ext::string& nick, const ext::string& protoDisplayName, const ext::string& groupName, int nSources)
{
- Contact* pContact = new Contact(this, m_nNextSlot, nick, protoDisplayName, groupName, 1, nSources);
+ CContact* pContact = new CContact(this, m_nNextSlot, nick, protoDisplayName, groupName, 1, nSources);
prepareContactData(*pContact);
m_Contacts.push_back(pContact);
@@ -112,7 +112,7 @@ Contact& Statistic::addContact(const ext::string& nick, const ext::string& proto
return *pContact;
}
-const Contact& Statistic::getContact(int index) const
+const CContact& Statistic::getContact(int index) const
{
assert(index >= 0 && index < m_Contacts.size());
@@ -243,7 +243,7 @@ bool Statistic::newFilePNG(Canvas& canvas, ext::string& finalURL)
return true;
}
-void Statistic::handleAddMessage(Contact& contact, Message& msg)
+void Statistic::handleAddMessage(CContact& contact, Message& msg)
{
contact.addMessage(msg);
@@ -253,7 +253,7 @@ void Statistic::handleAddMessage(Contact& contact, Message& msg)
}
}
-void Statistic::handleAddChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration)
+void Statistic::handleAddChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration)
{
if (duration >= m_Settings.m_ChatSessionMinDur) {
contact.addChat(bOutgoing, localTimestampStarted, duration);
@@ -385,7 +385,7 @@ bool Statistic::stepReadDB()
setProgressLabel(true, hisContact.getNick());
- Contact& curContact = addContact(hisContact.getNick(), hisContact.getProtocol(), hisContact.getGroup(), hisContact.getSources().size());
+ CContact& curContact = addContact(hisContact.getNick(), hisContact.getProtocol(), hisContact.getGroup(), hisContact.getSources().size());
// signal begin of history for this contact
hisContact.beginRead();
@@ -498,7 +498,7 @@ bool Statistic::stepRemoveContacts()
vector_each_(i, m_Contacts)
{
bool bRemove = false;
- Contact* pCur = m_Contacts[i];
+ CContact* pCur = m_Contacts[i];
if (!bRemove && m_Settings.m_RemoveEmptyContacts)
bRemove = (pCur->getTotalMessages() == 0);
@@ -527,7 +527,7 @@ bool Statistic::stepSortContacts()
return false;
ContactCompareBase cmpLast;
- ContactCompareStr cmpName(&cmpLast, &Contact::getNick);
+ ContactCompareStr cmpName(&cmpLast, &CContact::getNick);
int cmpDepth = 3;
@@ -547,111 +547,111 @@ bool Statistic::stepSortContacts()
for (int i = cmpDepth - 1; i >= 0; --i) {
switch (m_Settings.m_Sort[i].by) {
case Settings::skNick:
- pCmp = new ContactCompareStr(pPrev, &Contact::getNick);
+ pCmp = new ContactCompareStr(pPrev, &CContact::getNick);
break;
case Settings::skProtocol:
- pCmp = new ContactCompareStr(pPrev, &Contact::getProtocol);
+ pCmp = new ContactCompareStr(pPrev, &CContact::getProtocol);
break;
case Settings::skGroup:
- pCmp = new ContactCompareStr(pPrev, &Contact::getGroup);
+ pCmp = new ContactCompareStr(pPrev, &CContact::getGroup);
break;
case Settings::skBytesOut:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getOutBytes);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getOutBytes);
break;
case Settings::skBytesIn:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getInBytes);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getInBytes);
break;
case Settings::skBytesTotal:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getTotalBytes);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getTotalBytes);
break;
case Settings::skMessagesOut:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getOutMessages);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getOutMessages);
break;
case Settings::skMessagesIn:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getOutMessages);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getOutMessages);
break;
case Settings::skMessagesTotal:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getTotalMessages);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getTotalMessages);
break;
case Settings::skChatsOut:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getOutChats);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getOutChats);
break;
case Settings::skChatsIn:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getInChats);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getInChats);
break;
case Settings::skChatsTotal:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getTotalChats);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getTotalChats);
break;
case Settings::skChatDurationTotal:
- pCmp = new ContactCompare<uint32_t>(pPrev, &Contact::getChatDurSum);
+ pCmp = new ContactCompare<uint32_t>(pPrev, &CContact::getChatDurSum);
break;
case Settings::skTimeOfFirstMessage:
- pCmp = new ContactCompare<uint32_t>(pPrev, &Contact::getFirstTime);
+ pCmp = new ContactCompare<uint32_t>(pPrev, &CContact::getFirstTime);
break;
case Settings::skTimeOfLastMessage:
- pCmp = new ContactCompare<uint32_t>(pPrev, &Contact::getLastTime);
+ pCmp = new ContactCompare<uint32_t>(pPrev, &CContact::getLastTime);
break;
case Settings::skBytesOutAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getOutBytesAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getOutBytesAvg);
break;
case Settings::skBytesInAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getInBytesAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getInBytesAvg);
break;
case Settings::skBytesTotalAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getTotalBytesAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getTotalBytesAvg);
break;
case Settings::skMessagesOutAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getOutMessagesAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getOutMessagesAvg);
break;
case Settings::skMessagesInAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getOutMessagesAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getOutMessagesAvg);
break;
case Settings::skMessagesTotalAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getTotalMessagesAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getTotalMessagesAvg);
break;
case Settings::skChatsOutAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getOutChatsAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getOutChatsAvg);
break;
case Settings::skChatsInAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getInChatsAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getInChatsAvg);
break;
case Settings::skChatsTotalAvg:
- pCmp = new ContactCompare<double>(pPrev, &Contact::getTotalChatsAvg);
+ pCmp = new ContactCompare<double>(pPrev, &CContact::getTotalChatsAvg);
break;
case Settings::skChatDurationMin:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getChatDurMinForSort);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getChatDurMinForSort);
break;
case Settings::skChatDurationAvg:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getChatDurAvgForSort);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getChatDurAvgForSort);
break;
case Settings::skChatDurationMax:
- pCmp = new ContactCompare<int>(pPrev, &Contact::getChatDurMaxForSort);
+ pCmp = new ContactCompare<int>(pPrev, &CContact::getChatDurMaxForSort);
break;
}
@@ -694,7 +694,7 @@ bool Statistic::stepOmitContacts()
if (shouldTerminate())
return false;
- m_pOmitted = new Contact(this, m_nNextSlot, L"", L"", L"", 0, 0);
+ m_pOmitted = new CContact(this, m_nNextSlot, L"", L"", L"", 0, 0);
prepareContactData(*m_pOmitted);
// omit depending on some value
@@ -703,36 +703,36 @@ bool Statistic::stepOmitContacts()
{
int type; // 0 = int, 1 = double, 2 = uint32_t
double factor; // factor to multiply function output with
- int (Contact::*int_fn)() const;
- double (Contact::*double_fn)() const;
- uint32_t(Contact::*DWORD_fn)() const;
+ int (CContact::*int_fn)() const;
+ double (CContact::*double_fn)() const;
+ uint32_t(CContact::*DWORD_fn)() const;
} valueMap[] = {
- { 0, 1.0, &Contact::getInBytes, nullptr, nullptr },
- { 0, 1.0, &Contact::getOutBytes, nullptr, nullptr },
- { 0, 1.0, &Contact::getTotalBytes, nullptr, nullptr },
- { 1, 604800.0, nullptr, &Contact::getInBytesAvg, nullptr },
- { 1, 604800.0, nullptr, &Contact::getOutBytesAvg, nullptr },
- { 1, 604800.0, nullptr, &Contact::getTotalBytesAvg, nullptr },
- { 0, 1.0, &Contact::getInMessages, nullptr, nullptr },
- { 0, 1.0, &Contact::getOutMessages, nullptr, nullptr },
- { 0, 1.0, &Contact::getTotalMessages, nullptr, nullptr },
- { 1, 604800.0, nullptr, &Contact::getInMessagesAvg, nullptr },
- { 1, 604800.0, nullptr, &Contact::getOutMessagesAvg, nullptr },
- { 1, 604800.0, nullptr, &Contact::getTotalMessagesAvg, nullptr },
- { 0, 1.0, &Contact::getInChats, nullptr, nullptr },
- { 0, 1.0, &Contact::getOutChats, nullptr, nullptr },
- { 0, 1.0, &Contact::getTotalChats, nullptr, nullptr },
- { 1, 604800.0, nullptr, &Contact::getInChatsAvg, nullptr },
- { 1, 604800.0, nullptr, &Contact::getOutChatsAvg, nullptr },
- { 1, 604800.0, nullptr, &Contact::getTotalChatsAvg, nullptr },
- { 2, 1 / 3600.0, nullptr, nullptr, &Contact::getChatDurSum },
+ { 0, 1.0, &CContact::getInBytes, nullptr, nullptr },
+ { 0, 1.0, &CContact::getOutBytes, nullptr, nullptr },
+ { 0, 1.0, &CContact::getTotalBytes, nullptr, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getInBytesAvg, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getOutBytesAvg, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getTotalBytesAvg, nullptr },
+ { 0, 1.0, &CContact::getInMessages, nullptr, nullptr },
+ { 0, 1.0, &CContact::getOutMessages, nullptr, nullptr },
+ { 0, 1.0, &CContact::getTotalMessages, nullptr, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getInMessagesAvg, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getOutMessagesAvg, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getTotalMessagesAvg, nullptr },
+ { 0, 1.0, &CContact::getInChats, nullptr, nullptr },
+ { 0, 1.0, &CContact::getOutChats, nullptr, nullptr },
+ { 0, 1.0, &CContact::getTotalChats, nullptr, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getInChatsAvg, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getOutChatsAvg, nullptr },
+ { 1, 604800.0, nullptr, &CContact::getTotalChatsAvg, nullptr },
+ { 2, 1 / 3600.0, nullptr, nullptr, &CContact::getChatDurSum },
};
int valueKey = m_Settings.m_OmitByValueData;
double fLimit = static_cast<double>(m_Settings.m_OmitByValueLimit) / valueMap[valueKey].factor;
for (int i = m_Contacts.size() - 1; i >= 0; --i) {
- Contact& cur = *m_Contacts[i];
+ CContact& cur = *m_Contacts[i];
bool bDoOmit = false;
@@ -772,7 +772,7 @@ bool Statistic::stepOmitContacts()
// omit depending on message time
if (m_Settings.m_OmitByTime) {
for (int i = m_Contacts.size() - 1; i >= 0; --i) {
- Contact& cur = *m_Contacts[i];
+ CContact& cur = *m_Contacts[i];
if (!cur.isFirstLastTimeValid() || (getTimeStarted() > cur.getLastTime() && getTimeStarted() - cur.getLastTime() > m_Settings.m_OmitByTimeDays * 86400)) {
if (m_Settings.m_OmittedInTotals && m_Settings.m_CalcTotals || m_Settings.m_OmittedInExtraRow) {
@@ -796,7 +796,7 @@ bool Statistic::stepOmitContacts()
// omit depending on rank
if (m_Settings.m_OmitByRank) {
while (m_Contacts.size() > m_Settings.m_OmitNumOnTop) {
- Contact& cur = *m_Contacts.back();
+ CContact& cur = *m_Contacts.back();
if (m_Settings.m_OmittedInTotals && m_Settings.m_CalcTotals || m_Settings.m_OmittedInExtraRow) {
m_pOmitted->merge(cur);
@@ -826,7 +826,7 @@ bool Statistic::stepCalcTotals()
if (shouldTerminate())
return false;
- m_pTotals = new Contact(this, m_nNextSlot, L"", L"", L"", 0, 0);
+ m_pTotals = new CContact(this, m_nNextSlot, L"", L"", L"", 0, 0);
prepareContactData(*m_pTotals);
setProgressMax(true, m_Contacts.size() + 1);
@@ -834,7 +834,7 @@ bool Statistic::stepCalcTotals()
// normal contacts
vector_each_(i, m_Contacts)
{
- Contact &curContact = *m_Contacts[i];
+ CContact &curContact = *m_Contacts[i];
setProgressLabel(true, curContact.getNick());
@@ -883,7 +883,7 @@ bool Statistic::stepTransformData()
// normal contacts
vector_each_(i, m_Contacts)
{
- Contact& curContact = *m_Contacts[i];
+ CContact& curContact = *m_Contacts[i];
setProgressLabel(true, curContact.getNick());
transformContactData(curContact);
@@ -1022,7 +1022,7 @@ bool Statistic::stepWriteHTML()
{
tos << L"<tr>" << ext::endl;
- const Contact& curContact = getContact(i);
+ const CContact& curContact = getContact(i);
setProgressLabel(true, curContact.getNick());
@@ -1065,7 +1065,7 @@ bool Statistic::stepWriteHTML()
if (!bInterrupted && m_Settings.m_OmitContacts && m_Settings.m_OmittedInExtraRow && m_bActuallyOmitted) {
setProgressLabel(true, TranslateT("Writing omitted contacts"));
- const Contact& omittedContact = getOmitted();
+ const CContact& omittedContact = getOmitted();
tos << L"<tr class=\"omitted\">" << ext::endl;
@@ -1090,7 +1090,7 @@ bool Statistic::stepWriteHTML()
if (!bInterrupted && m_Settings.m_CalcTotals) {
setProgressLabel(true, TranslateT("Writing totals"));
- const Contact& totalsContact = getTotals();
+ const CContact& totalsContact = getTotals();
tos << L"<tr class=\"totals\">" << ext::endl;
diff --git a/plugins/HistoryStats/src/statistic.h b/plugins/HistoryStats/src/statistic.h
index 9897bf6732..ae70555ced 100644
--- a/plugins/HistoryStats/src/statistic.h
+++ b/plugins/HistoryStats/src/statistic.h
@@ -12,7 +12,7 @@
#include "settings.h"
#include "message.h"
-class Contact; // forward declaration instead of #include "contact.h"
+class CContact; // forward declaration instead of #include "contact.h"
class Statistic
: private pattern::NotCopyable<Statistic>
@@ -51,8 +51,8 @@ public:
etWATError = EVENTTYPE_WAT_ERROR,
};
- typedef std::vector<Contact*> ContactList;
- typedef std::vector<const Contact*> ContactListC;
+ typedef std::vector<CContact*> ContactList;
+ typedef std::vector<const CContact*> ContactListC;
typedef std::pair<ext::string, ext::string> ConflictingFile; // (desired, temp)
typedef std::list<ConflictingFile> ConflictingFiles;
typedef std::map<Canvas::Digest, ext::string> ImageMap;
@@ -76,8 +76,8 @@ private:
ContactList m_Contacts;
// special 'contacts': omitted, totals
- Contact* m_pTotals;
- Contact* m_pOmitted;
+ CContact* m_pTotals;
+ CContact* m_pOmitted;
bool
m_bActuallyOmitted, // did we really omit something
@@ -122,17 +122,17 @@ private:
private:
// contact handling
void prepareColumns();
- void prepareContactData(Contact& contact);
- void freeContactData(Contact& contact);
- void mergeContactData(Contact& contact, const Contact& include);
- void transformContactData(Contact& contact);
- Contact& addContact(const ext::string& nick, const ext::string& protoDisplayName, const ext::string& groupName, int nSources);
+ void prepareContactData(CContact& contact);
+ void freeContactData(CContact& contact);
+ void mergeContactData(CContact& contact, const CContact& include);
+ void transformContactData(CContact& contact);
+ CContact& addContact(const ext::string& nick, const ext::string& protoDisplayName, const ext::string& groupName, int nSources);
// misc routines
uint32_t getTimeStarted() { return m_TimeStarted; }
bool shouldTerminate() { return (WaitForSingleObject(m_hCancelEvent, 0) == WAIT_OBJECT_0) || bool_(Miranda_IsTerminated()); }
- void handleAddMessage(Contact& contact, Message& msg);
- void handleAddChat(Contact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
+ void handleAddMessage(CContact& contact, Message& msg);
+ void handleAddChat(CContact& contact, bool bOutgoing, uint32_t localTimestampStarted, uint32_t duration);
// progress dialog handling
static INT_PTR CALLBACK staticProgressProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -167,9 +167,9 @@ public:
static void run(const Settings& settings, InvocationSource invokedFrom, HINSTANCE hInst, HWND hWndParent = nullptr);
int countContacts() const { return m_Contacts.size(); }
- const Contact& getContact(int index) const;
- const Contact& getTotals() const { assert(m_pTotals); return *m_pTotals; }
- const Contact& getOmitted() const { assert(m_pOmitted); return *m_pOmitted; }
+ const CContact& getContact(int index) const;
+ const CContact& getTotals() const { assert(m_pTotals); return *m_pTotals; }
+ const CContact& getOmitted() const { assert(m_pOmitted); return *m_pOmitted; }
bool hasTotals() const { return (m_pTotals != nullptr) && m_Settings.m_CalcTotals; } // MEMO: only makes sense after 'calc totals'-step
bool hasOmitted() const { return (m_pOmitted != nullptr) && m_Settings.m_OmitContacts && m_Settings.m_OmittedInExtraRow && m_bActuallyOmitted; } // MEMO: only makes sense after 'omit'-step
uint32_t getFirstTime(); // MEMO: only makes sense after 'calc totals'-step
diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp
index 7c650638dc..6f1625b111 100644
--- a/plugins/IEHistory/src/dlgHandlers.cpp
+++ b/plugins/IEHistory/src/dlgHandlers.cpp
@@ -70,7 +70,7 @@ void LoadName(HWND hWnd)
}
wchar_t buffer[1024];
- mir_snwprintf(buffer, L"'%s' - IEHistory", ptrW(Contact_GetInfo(CNF_DISPLAY, data->contact)).get());
+ mir_snwprintf(buffer, L"'%s' - IEHistory", ptrW(Contact::GetInfo(CNF_DISPLAY, data->contact)).get());
SetWindowText(hWnd, buffer);
}
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index 3398d2b003..6af035fbc9 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -150,20 +150,20 @@ void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut)
{
hContact = getRealContact(hContact);
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, hContact));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, hContact));
uinIn = mir_utf8encodeW(id ? id.get() : L"");
- id = Contact_GetInfo(CNF_UNIQUEID, NULL);
+ id = Contact::GetInfo(CNF_UNIQUEID, NULL);
uinOut = mir_utf8encodeW(id ? id.get() : L"");
}
wchar_t* HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
{
- wchar_t *str = Contact_GetInfo(CNF_DISPLAY, hContact, szProto);
+ wchar_t *str = Contact::GetInfo(CNF_DISPLAY, hContact, szProto);
if (str != nullptr)
return str;
- str = Contact_GetInfo(CNF_UNIQUEID, hContact, szProto);
+ str = Contact::GetInfo(CNF_UNIQUEID, hContact, szProto);
if (str != nullptr)
return str;
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index b9688859b6..c35ed05512 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -173,13 +173,13 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
db_free(&dbv);
}
- ptrW tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szRealProto));
+ ptrW tszNick(Contact::GetInfo(CNF_NICK, event->hContact, szRealProto));
if (tszNick != nullptr)
szNickIn = encodeUTF8(event->hContact, tszNick, ENF_NAMESMILEYS, true);
- tszNick = Contact_GetInfo(CNF_CUSTOMNICK, 0, szRealProto);
+ tszNick = Contact::GetInfo(CNF_CUSTOMNICK, 0, szRealProto);
if (tszNick == nullptr)
- Contact_GetInfo(CNF_NICK, 0, szRealProto);
+ Contact::GetInfo(CNF_NICK, 0, szRealProto);
if (tszNick != nullptr)
szNickOut = encodeUTF8(event->hContact, tszNick, ENF_NAMESMILEYS, true);
@@ -347,13 +347,13 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
}
}
- ptrW tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szProto));
+ ptrW tszNick(Contact::GetInfo(CNF_NICK, event->hContact, szProto));
if (tszNick != nullptr)
szNickIn = encodeUTF8(event->hContact, tszNick, ENF_NAMESMILEYS, true);
- tszNick = Contact_GetInfo(CNF_CUSTOMNICK, 0, szProto);
+ tszNick = Contact::GetInfo(CNF_CUSTOMNICK, 0, szProto);
if (tszNick == nullptr)
- tszNick = Contact_GetInfo(CNF_NICK, 0, szProto);
+ tszNick = Contact::GetInfo(CNF_NICK, 0, szProto);
if (tszNick != nullptr)
szNickOut = encodeUTF8(event->hContact, tszNick, ENF_NAMESMILEYS, true);
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 6fbfd074c0..865d786b93 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -98,7 +98,7 @@ MCONTACT CImportBatch::HContactFromID(const char *pszProtoName, const char *pszS
MCONTACT CImportBatch::HContactFromChatID(const char *pszProtoName, const wchar_t *pszChatID)
{
for (MCONTACT hContact = dstDb->FindFirstContact(pszProtoName); hContact; hContact = dstDb->FindNextContact(hContact, pszProtoName)) {
- if (!Contact_IsGroupChat(hContact, pszProtoName))
+ if (!Contact::IsGroupChat(hContact, pszProtoName))
continue;
ptrW wszChatId(db_get_wsa(hContact, pszProtoName, "ChatRoomID"));
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp
index 825d7d9531..f5d7cb2d12 100644
--- a/plugins/KeyboardNotify/src/ignore.cpp
+++ b/plugins/KeyboardNotify/src/ignore.cpp
@@ -32,7 +32,7 @@ static uint32_t GetMask(MCONTACT hContact)
if(hContact == NULL)
mask=0;
else {
- if (Contact_IsHidden(hContact) || !Contact_OnList(hContact))
+ if (Contact::IsHidden(hContact) || !Contact::OnList(hContact))
mask = g_plugin.getDword("Mask1", 0);
else
mask = g_plugin.getDword("Default1", 0);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index fee6f9234c..a6cd043c2c 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -346,7 +346,7 @@ static INT_PTR onSetVis(WPARAM wparam, LPARAM)
static INT_PTR onHide(WPARAM wparam, LPARAM)
{
MCONTACT hContact = (MCONTACT)wparam;
- Contact_Hide(hContact, !Contact_IsHidden(hContact));
+ Contact::Hide(hContact, !Contact::IsHidden(hContact));
return 0;
}
@@ -382,7 +382,7 @@ static void ModifyCopyID(MCONTACT hContact, BOOL bShowID, BOOL bTrimID)
hIconCID = hIcon;
}
- ptrW wszId(Contact_GetInfo(CNF_UNIQUEID, hContact, szProto));
+ ptrW wszId(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
if (wszId) {
if (bShowID) {
if (bTrimID && (mir_wstrlen(wszId) > MAX_IDLEN)) {
@@ -468,7 +468,7 @@ static INT_PTR onCopyID(WPARAM hContact, LPARAM)
return 0;
CMStringW buf;
- ptrW wszId(Contact_GetInfo(CNF_UNIQUEID, hContact, szProto));
+ ptrW wszId(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
if (g_plugin.getDword("flags", vf_default) & VF_CIDN) {
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
@@ -612,7 +612,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))
- Contact_Hide(wparam, !isIgnored((MCONTACT)wparam, lparam));
+ Contact::Hide(wparam, !isIgnored((MCONTACT)wparam, lparam));
if (isIgnored(wparam, lparam))
Ignore_Allow(wparam, lparam);
@@ -665,7 +665,7 @@ static int BuildMenu(WPARAM wparam, LPARAM)
bEnabled = bShowAll || (flags & VF_HFL);
Menu_ShowItem(hmenuHide, bEnabled);
if (bEnabled) {
- if (Contact_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/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index d529f38f89..c398aabd35 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 (Contact_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 bf13976d6b..ffbd637b96 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 && Contact_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 && Contact_IsHidden(onContactAsyncThreadArgStruct->hContact))
+ if (canAdd && Contact::IsHidden(onContactAsyncThreadArgStruct->hContact))
canAdd = false;
if (canAdd)
diff --git a/plugins/MirLua/src/Modules/m_database.cpp b/plugins/MirLua/src/Modules/m_database.cpp
index eb1bef16d3..6ca2e20f28 100644
--- a/plugins/MirLua/src/Modules/m_database.cpp
+++ b/plugins/MirLua/src/Modules/m_database.cpp
@@ -119,7 +119,7 @@ static int db_GetContactInfo(lua_State *L)
luaL_argerror(L, 2, luaL_typename(L, 2));
}
- ptrW value(Contact_GetInfo(type, hContact));
+ ptrW value(Contact::GetInfo(type, hContact));
if (value)
lua_pushstring(L, ptrA(mir_utf8encodeW(value)));
else
diff --git a/plugins/MirLua/src/Modules/m_message.cpp b/plugins/MirLua/src/Modules/m_message.cpp
index f4c6e80ccb..289f82c935 100644
--- a/plugins/MirLua/src/Modules/m_message.cpp
+++ b/plugins/MirLua/src/Modules/m_message.cpp
@@ -27,7 +27,7 @@ static int message_Send(lua_State *L)
INT_PTR res = 1;
const char *szProto = Proto_GetBaseAccountName(hContact);
- if (Contact_IsGroupChat(hContact, szProto)) {
+ if (Contact::IsGroupChat(hContact, szProto)) {
ptrW wszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID"));
ptrW wszMessage(mir_utf8decodeW(message));
res = Chat_SendUserMessage(szProto, wszChatRoom, wszMessage);
diff --git a/plugins/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/src/dbfilter.cpp
index 09ca8e241d..ef9d7d0d93 100644
--- a/plugins/MirOTR/src/dbfilter.cpp
+++ b/plugins/MirOTR/src/dbfilter.cpp
@@ -57,7 +57,7 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam)
const char *proto = Proto_GetBaseAccountName(hContact);
if (!proto)
return 0;
- if (Contact_IsGroupChat(hContact, proto))
+ if (Contact::IsGroupChat(hContact, proto))
return 0;
if (mir_strcmp(proto, META_PROTO) == 0) {
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp
index 8c607cd386..9c557c2266 100644
--- a/plugins/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/src/options.cpp
@@ -523,7 +523,7 @@ class CContactOptionsDlg : public CDlgBase
for (auto &hContact : Contacts()) {
const char *proto = Proto_GetBaseAccountName(hContact);
- if (proto && !Contact_IsGroupChat(hContact, proto) // ignore chatrooms
+ if (proto && !Contact::IsGroupChat(hContact, proto) // ignore chatrooms
&& Proto_IsProtoOnContact(hContact, MODULENAME)
&& mir_strcmp(proto, META_PROTO) != 0) // and MetaContacts
{
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index 38a1129079..dcc7eb6fdd 100644
--- a/plugins/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/src/svcs_menu.cpp
@@ -184,7 +184,7 @@ int SVC_PrebuildContactMenu(WPARAM hContact, LPARAM)
Menu_ShowItem(hStopItem, false);
const char *proto = Proto_GetBaseAccountName(hContact);
- if (!proto || Contact_IsGroupChat(hContact, proto))
+ if (!proto || Contact::IsGroupChat(hContact, proto))
return 0;
if (proto && mir_strcmp(proto, META_PROTO) == 0) {
diff --git a/plugins/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/src/svcs_srmm.cpp
index 06d5cdae56..f3aa6d6f98 100644
--- a/plugins/MirOTR/src/svcs_srmm.cpp
+++ b/plugins/MirOTR/src/svcs_srmm.cpp
@@ -8,7 +8,7 @@ int SVC_IconPressed(WPARAM hContact, LPARAM lParam)
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (mir_strcmp(sicd->szModule, MODULENAME) == 0) {
- if (!Contact_IsGroupChat(hContact))
+ if (!Contact::IsGroupChat(hContact))
ShowOTRMenu(hContact, sicd->clickLocation);
}
@@ -18,7 +18,7 @@ int SVC_IconPressed(WPARAM hContact, LPARAM lParam)
// set SRMM icon status, if applicable
void SetEncryptionStatus(MCONTACT hContact, TrustLevel level)
{
- bool chat_room = Contact_IsGroupChat(hContact);
+ bool chat_room = Contact::IsGroupChat(hContact);
BBButton button = OTRButton;
int flags1 = MBF_HIDDEN, flags2 = MBF_HIDDEN;
@@ -85,7 +85,7 @@ int SVC_ButtonsBarPressed(WPARAM w, LPARAM l)
if (cbcd->dwButtonId == 0 && !mir_strcmp(cbcd->pszModule, MODULENAME)) {
MCONTACT hContact = (MCONTACT)w;
- if (!Contact_IsGroupChat(hContact))
+ if (!Contact::IsGroupChat(hContact))
ShowOTRMenu(hContact, cbcd->pt);
}
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index 1b1a9fe55c..186a37364f 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -88,7 +88,7 @@ void otrl_privkey_hash_to_humanT(wchar_t human[45], const unsigned char hash[20]
char* contact_get_id(MCONTACT hContact)
{
- ptrW pszUniqueID(Contact_GetInfo(CNF_UNIQUEID, hContact));
+ ptrW pszUniqueID(Contact::GetInfo(CNF_UNIQUEID, hContact));
if (!pszUniqueID)
pszUniqueID = mir_wstrdup(Clist_GetContactDisplayName(hContact));
@@ -110,7 +110,7 @@ char* GetDlgItemTextUtf(HWND hwndDlg, int ctrlId)
wchar_t* ProtoGetNickname(const char* proto)
{
- wchar_t *p = Contact_GetInfo(CNF_NICK, NULL, proto);
+ wchar_t *p = Contact::GetInfo(CNF_NICK, NULL, proto);
return (p != nullptr) ? p : mir_wstrdup(L"");
}
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 0385fd5b56..ed688f189c 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -644,7 +644,7 @@ void CAppletManager::FinishMessageJob(SMessageJob *pJob)
CIRCConnection *pIRCCon = GetIRCConnection(strProto);
// Only add the message to the history if the contact isn't an irc chatroom
- if (!(pIRCCon && Contact_IsGroupChat(pJob->hContact, szProto))) {
+ if (!(pIRCCon && Contact::IsGroupChat(pJob->hContact, szProto))) {
// Add the message to the database
DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
@@ -720,7 +720,7 @@ void CAppletManager::SendTypingNotification(MCONTACT hContact, bool bEnable)
return;
if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(hContact, szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
return;
- if (!Contact_OnList(hContact) && !db_get_b(0, "SRMsg", "UnknownTyping", 1))
+ if (!Contact::OnList(hContact) && !db_get_b(0, "SRMsg", "UnknownTyping", 1))
return;
// End user check
CallService(MS_PROTO_SELFISTYPING, hContact, bEnable ? PROTOTYPE_SELFTYPING_ON : PROTOTYPE_SELFTYPING_OFF);
@@ -738,7 +738,7 @@ MEVENT CAppletManager::SendMessageToContact(MCONTACT hContact, tstring strMessag
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(strProto);
- if (pIRCCon && Contact_IsGroupChat(hContact, szProto)) {
+ if (pIRCCon && Contact::IsGroupChat(hContact, szProto)) {
ptrW wszNick(db_get_wsa(hContact, szProto, "Nick"));
if (wszNick == NULL)
return NULL;
@@ -1107,7 +1107,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
Event.hContact = NULL;
// Ignore events from hidden chatrooms, except for join events
- if (gce->pszID.w != nullptr && Contact_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));
@@ -1408,7 +1408,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
Event.bNotification = true;
Event.eType = EVENT_SIGNED_ON;
- if (pIRCCon && Contact_IsGroupChat(Event.hContact, szProto)) {
+ if (pIRCCon && Contact::IsGroupChat(Event.hContact, szProto)) {
Event.strDescription = TranslateString(L"Joined %s", strName.c_str());
DBVARIANT dbv;
@@ -1426,7 +1426,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
Event.bNotification = true;
Event.eType = EVENT_SIGNED_OFF;
- if (pIRCCon && Contact_IsGroupChat(Event.hContact, szProto)) {
+ if (pIRCCon && Contact::IsGroupChat(Event.hContact, szProto)) {
Event.strDescription = TranslateString(L"Left %s", strName.c_str());
// delete IRC-Channel history
CAppletManager::GetInstance()->DeleteIRCHistory(Event.hContact);
@@ -1629,7 +1629,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 = Contact_IsHidden(hContact);
+ Event.iValue = Contact::IsHidden(hContact);
}
else if (!strcmp(dbcws->szSetting, "Group")) {
Event.eType = EVENT_CONTACT_GROUP;
diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp
index 26f03f5c60..561fd98bd1 100644
--- a/plugins/MirandaG15/src/CChatScreen.cpp
+++ b/plugins/MirandaG15/src/CChatScreen.cpp
@@ -251,7 +251,7 @@ void CChatScreen::LoadHistory()
char *szProto = Proto_GetBaseAccountName(m_hContact);
- if (m_bIRCProtocol && Contact_IsGroupChat(m_hContact, szProto)) {
+ if (m_bIRCProtocol && Contact::IsGroupChat(m_hContact, szProto)) {
if (!CAppletManager::GetInstance()->IsIRCHookEnabled()) {
time_t now;
tm tm_now;
@@ -615,7 +615,7 @@ void CChatScreen::OnEventReceived(CEvent *pEvent)
// contact is set to hidden
if (pEvent->iValue == 1) {
// Close the chat screen if the contact is an irc chatroom
- if (!(m_bIRCProtocol && Contact_IsGroupChat(pEvent->hContact, toNarrowString(m_strProto).c_str())))
+ if (!(m_bIRCProtocol && Contact::IsGroupChat(pEvent->hContact, toNarrowString(m_strProto).c_str())))
break;
}
else
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp
index 872c3570a2..dbb8b27626 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 (Contact_IsHidden(pEntry->hHandle))
+ if (Contact::IsHidden(pEntry->hHandle))
return false;
if (db_mc_isSub(pEntry->hHandle)) {
MCONTACT hMetaContact = db_mc_getMeta(pEntry->hHandle);
- if (Contact_IsHidden(hMetaContact))
+ if (Contact::IsHidden(hMetaContact))
return false;
}
}
diff --git a/plugins/MirandaG15/src/CEventScreen.cpp b/plugins/MirandaG15/src/CEventScreen.cpp
index ffd9989be2..dfa3248264 100644
--- a/plugins/MirandaG15/src/CEventScreen.cpp
+++ b/plugins/MirandaG15/src/CEventScreen.cpp
@@ -186,7 +186,7 @@ void CEventScreen::OnLCDButtonDown(int iButton)
char *szProto = Proto_GetBaseAccountName(pEntry->hContact);
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(toTstring(szProto));
- if (pIRCCon && Contact_IsGroupChat(pEntry->hContact, szProto) && Contact_IsHidden(pEntry->hContact))
+ if (pIRCCon && Contact::IsGroupChat(pEntry->hContact, szProto) && Contact::IsHidden(pEntry->hContact))
return;
CAppletManager::GetInstance()->ActivateChatScreen(pEntry->hContact);
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp
index 90f87f8067..4e9a815831 100644
--- a/plugins/Msg_Export/src/options.cpp
+++ b/plugins/Msg_Export/src/options.cpp
@@ -475,7 +475,7 @@ public:
sItem.pszText = pa->tszAccountName;
listUsers.SetItem(&sItem);
- ptrW wszUin(Contact_GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
+ ptrW wszUin(Contact::GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
if (wszUin) {
sItem.iSubItem = 3;
sItem.pszText = wszUin;
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 7a67870ed2..75c751a47c 100644
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -448,7 +448,7 @@ void ReplaceAllNoColon(wstring &sSrc, const wchar_t *pszReplace, wstring &sNew)
static wstring GetUniqueId(MCONTACT hContact, const char *szProto)
{
- ptrW uniqueId(Contact_GetInfo(CNF_UNIQUEID, hContact, szProto));
+ ptrW uniqueId(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
return (uniqueId == nullptr) ? L"(null)" : uniqueId;
}
@@ -688,7 +688,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF
pInfo.push_back(JSONNode("user", T2Utf(sRemoteUser.c_str()).get()));
pInfo.push_back(JSONNode("proto", szProto));
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, hContact, szProto));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
if (id != NULL)
pInfo.push_back(JSONNode("uin", T2Utf(id).get()));
@@ -732,7 +732,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF
output.AppendFormat(L"%-10s: %s\r\n", TranslateT("User"), sRemoteUser.c_str());
output.AppendFormat(L"%-10s: %S\r\n", TranslateT("Account"), szProto);
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, hContact, szProto));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
if (id != NULL)
output.AppendFormat(L"%-10s: %s\r\n", TranslateT("User ID"), id.get());
@@ -1112,6 +1112,6 @@ int nContactDeleted(WPARAM hContact, LPARAM)
wchar_t* GetMyOwnNick(MCONTACT hContact)
{
- wchar_t *p = Contact_GetInfo(CNF_DISPLAY, NULL, Proto_GetBaseAccountName(hContact));
+ wchar_t *p = Contact::GetInfo(CNF_DISPLAY, NULL, Proto_GetBaseAccountName(hContact));
return (p != nullptr) ? p : mir_wstrdup(TranslateT("No_Nick"));
}
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index da53008a27..21cb1ac189 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -265,7 +265,7 @@ int Protocol::GetNickMaxLength()
wchar_t* Protocol::GetNick()
{
- ptrW nick(Contact_GetInfo(CNF_DISPLAY, NULL, name));
+ ptrW nick(Contact::GetInfo(CNF_DISPLAY, NULL, name));
lcopystr(nickname, (nick != NULL) ? nick : L"", _countof(nickname));
return nickname;
}
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index 7851b535db..9a4b94b3bc 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -181,7 +181,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
return 0;
MCONTACT hContactForSettings = hContact; // used to take into account not-on-list contacts when getting contact settings, but at the same time allows to get correct contact info for contacts that are in the DB
- if (hContactForSettings != INVALID_CONTACT_ID && !Contact_OnList(hContactForSettings))
+ if (hContactForSettings != INVALID_CONTACT_ID && !Contact::OnList(hContactForSettings))
hContactForSettings = INVALID_CONTACT_ID; // INVALID_HANDLE_VALUE means the contact is not-on-list
if (!CContactSettings(iMode, hContactForSettings).Autoreply.IncludingParents(szProto) || CContactSettings(iMode, hContactForSettings).Ignore)
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp
index 1f07f11105..040f67e2c4 100644
--- a/plugins/NewStory/src/history.cpp
+++ b/plugins/NewStory/src/history.cpp
@@ -633,7 +633,7 @@ public:
for (int i = 0; i < subcount; i++) {
MCONTACT hSubContact = db_mc_getSub(m_hContact, i);
char *subproto = Proto_GetBaseAccountName(hSubContact);
- ptrW subid(Contact_GetInfo(CNF_UNIQUEID, hSubContact, subproto));
+ ptrW subid(Contact::GetInfo(CNF_UNIQUEID, hSubContact, subproto));
if (FirstTime)
SubContactsList.Append(subid);
else
@@ -645,8 +645,8 @@ public:
return;
}
char* proto = Proto_GetBaseAccountName(m_hContact);
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, m_hContact, proto));
- ptrW nick(Contact_GetInfo(CNF_DISPLAY, m_hContact, proto));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, m_hContact, proto));
+ ptrW nick(Contact::GetInfo(CNF_DISPLAY, m_hContact, proto));
const char* uid = Proto_GetUniqueId(proto);
OPENFILENAME ofn = { 0 };
diff --git a/plugins/NewStory/src/options.cpp b/plugins/NewStory/src/options.cpp
index a8bb78a9b2..0e32405a02 100644
--- a/plugins/NewStory/src/options.cpp
+++ b/plugins/NewStory/src/options.cpp
@@ -84,8 +84,8 @@ public:
m_hContact = db_add_contact();
Proto_AddToContact(m_hContact, META_PROTO);
- Contact_Hide(m_hContact);
- Contact_RemoveFromList(m_hContact);
+ Contact::Hide(m_hContact);
+ Contact::RemoveFromList(m_hContact);
db_set_ws(m_hContact, META_PROTO, "Nick", TranslateT("Test contact"));
DBEVENTINFO dbei = {};
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 88189452cc..727adc24c5 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -114,7 +114,7 @@ void vfGlobal(int, TemplateVars *vars, MCONTACT hContact, ItemData *)
// %S: my nick (not for messages)
char* proto = Proto_GetBaseAccountName(hContact);
- ptrW nick(Contact_GetInfo(CNF_DISPLAY, 0, proto));
+ ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto));
vars->SetVar('S', nick, false);
}
@@ -149,7 +149,7 @@ void vfEvent(int, TemplateVars *vars, MCONTACT, ItemData *item)
// %N: Nickname
if (item->dbe.flags & DBEF_SENT) {
char *proto = Proto_GetBaseAccountName(item->hContact);
- ptrW nick(Contact_GetInfo(CNF_DISPLAY, 0, proto));
+ ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto));
vars->SetVar('N', nick, false);
}
else {
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index bfef047802..f0317beacb 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 && Contact_IsHidden(hContact));
+ return (!opt.HiddenContactsToo && Contact::IsHidden(hContact));
}
void LogSMsgToDB(STATUSMSGINFO *smi, const wchar_t *tmplt)
@@ -478,7 +478,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
return 0;
// we don't want to be notified if new chatroom comes online
- if (Contact_IsGroupChat(hContact, szProto))
+ if (Contact::IsGroupChat(hContact, szProto))
return 0;
uint16_t oldStatus = DBGetContactSettingRangedWord(hContact, "UserOnline", "LastStatus", ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index 72381c301d..7b32997456 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -344,7 +344,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 && Contact_IsHidden(xsc->hContact))
+ || (!opt.HiddenContactsToo && Contact::IsHidden(xsc->hContact))
|| (Proto_GetStatus(xsc->szProto) == ID_STATUS_OFFLINE))
{
FreeXSC(xsc);
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 7f6346f6ed..f6466f89b6 100644
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -969,7 +969,7 @@ void ExportGpGKeysFunc(int type)
if (key.IsEmpty())
continue;
- ptrW wszLogin(Contact_GetInfo(CNF_UNIQUEID, 0, Proto_GetBaseAccountName(hContact))), wszContact(Contact_GetInfo(CNF_UNIQUEID, hContact));
+ ptrW wszLogin(Contact::GetInfo(CNF_UNIQUEID, 0, Proto_GetBaseAccountName(hContact))), wszContact(Contact::GetInfo(CNF_UNIQUEID, hContact));
if (wszLogin == nullptr || wszContact == nullptr)
continue;
@@ -1058,7 +1058,7 @@ INT_PTR ImportGpGKeys(WPARAM, LPARAM)
PROTOACCOUNT *pFoundAcc = nullptr;
for (auto &pa : Accounts()) {
- ptrW wszUniqueId(Contact_GetInfo(CNF_UNIQUEID, 0, pa->szModuleName));
+ ptrW wszUniqueId(Contact::GetInfo(CNF_UNIQUEID, 0, pa->szModuleName));
if (wszUniqueId == nullptr)
continue;
@@ -1072,7 +1072,7 @@ INT_PTR ImportGpGKeys(WPARAM, LPARAM)
continue;
for (auto &hContact : Contacts(pFoundAcc->szModuleName)) {
- ptrW wszUniqueId(Contact_GetInfo(CNF_UNIQUEID, hContact, pFoundAcc->szModuleName));
+ ptrW wszUniqueId(Contact::GetInfo(CNF_UNIQUEID, hContact, pFoundAcc->szModuleName));
if (wszUniqueId == nullptr)
continue;
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 8ac0519b22..fb9a4af38f 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -137,7 +137,7 @@ INT_PTR ServiceClear(WPARAM hContact, LPARAM)
int PrebuildContactMenu(WPARAM hContact, LPARAM)
{
bool remove = g_plugin.getByte(hContact, DBSETTING_REMOVE) != 0;
- bool chat_room = Contact_IsGroupChat(hContact);
+ bool chat_room = Contact::IsGroupChat(hContact);
if (chat_room)
Menu_ShowItem(hMenuToggle, false);
@@ -174,7 +174,7 @@ int WindowEvent(WPARAM, LPARAM lParam)
break;
case MSG_WINDOW_EVT_OPEN:
- bool chat_room = Contact_IsGroupChat(hContact);
+ bool chat_room = Contact::IsGroupChat(hContact);
int remove = g_plugin.getByte(hContact, DBSETTING_REMOVE) != 0;
for (int i = 0; i < 2; ++i)
@@ -193,7 +193,7 @@ int IconPressed(WPARAM hContact, LPARAM lParam)
if (sicd->flags & MBCF_RIGHTBUTTON) return 0; // ignore right-clicks
if (mir_strcmp(sicd->szModule, MODULENAME) != 0) return 0; // not our event
- if (!Contact_IsGroupChat(hContact))
+ if (!Contact::IsGroupChat(hContact))
ServiceToggle(hContact, 0);
return 0;
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index 43b81ea040..e2c0f84e9f 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -64,7 +64,7 @@ class CDlgOptionsDlg : public CDlgBase
void SetAllContactIcons()
{
for (auto &hContact : Contacts()) {
- if (!Contact_IsGroupChat(hContact)) {
+ if (!Contact::IsGroupChat(hContact)) {
HANDLE hItem = clist.FindContact(hContact);
if (hItem) {
bool disabled = (g_plugin.getByte(hContact, DBSETTING_REMOVE) == 1);
@@ -126,7 +126,7 @@ public:
g_plugin.bEnabledForNew = clist.GetExtraImage(hItemNew, 0);
for (auto &hContact : Contacts()) {
- if (!Contact_IsGroupChat(hContact)) {
+ if (!Contact::IsGroupChat(hContact)) {
HANDLE hItem = clist.FindContact(hContact);
if (hItem) {
int iImage = clist.GetExtraImage(hItem, 0);
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index 2b280f6a45..62ad9d2084 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -414,7 +414,7 @@ static int PrebuildContactMenu(WPARAM hContact, LPARAM)
{
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr)
- NudgeShowMenu((WPARAM)szProto, !Contact_IsGroupChat(hContact, szProto));
+ NudgeShowMenu((WPARAM)szProto, !Contact::IsGroupChat(hContact, szProto));
return 0;
}
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 80398f6911..b7fb63df7d 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -109,7 +109,7 @@ static void PasteIt(MCONTACT hContact, int mode)
else if (hContact != NULL && pasteToWeb->szFileLink[0] != 0) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND) {
- bool isChat = Contact_IsGroupChat(hContact, szProto);
+ bool isChat = Contact::IsGroupChat(hContact, szProto);
if (Options::instance->autoSend) {
if (!isChat) {
DBEVENTINFO dbei = {};
@@ -323,7 +323,7 @@ static int WindowEvent(WPARAM, MessageWindowEventData* lParam)
if (lParam->uType == MSG_WINDOW_EVT_OPEN) {
char *szProto = Proto_GetBaseAccountName(lParam->hContact);
if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND) {
- if (Contact_IsGroupChat(lParam->hContact, szProto)) {
+ if (Contact::IsGroupChat(lParam->hContact, szProto)) {
(*contactWindows)[lParam->hContact] = lParam->hwndInput;
}
}
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index b0a7d60635..ded818c45f 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -535,7 +535,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count)
if (enableDefaultUsr && isIm && IsActionEnabled("General/Send message")) ++m_actionCount;
if (enableDefaultUsr && IsActionEnabled("General/User details")) ++m_actionCount;
if (enableDefaultUsr && IsActionEnabled("General/Contact menu")) ++m_actionCount;
- if (enableDefaultUsr && !Contact_OnList(m_hContact) && IsActionEnabled("General/Add permanently")) ++m_actionCount;
+ if (enableDefaultUsr && !Contact::OnList(m_hContact) && IsActionEnabled("General/Add permanently")) ++m_actionCount;
if (enableDefaultGen && (m_iTimeout != -1) && IsActionEnabled("General/Pin popup")) ++m_actionCount;
if (enableDefaultGen && IsActionEnabled("General/Dismiss popup")) ++m_actionCount;
if (enableDefaultGen && IsActionEnabled("General/Copy to clipboard")) ++m_actionCount;
@@ -578,7 +578,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count)
++iAction;
}
- if (enableDefaultUsr && !Contact_OnList(m_hContact) && IsActionEnabled("General/Add permanently")) {
+ if (enableDefaultUsr && !Contact::OnList(m_hContact) && IsActionEnabled("General/Add permanently")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = g_plugin.getIcon(IDI_ACT_ADD, iconSize);
mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Add permanently");
@@ -928,7 +928,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
break;
case ACT_DEF_ADD:
- Contact_Add(m_hContact);
+ Contact::Add(m_hContact);
if (!(PopupOptions.actions & ACT_DEF_KEEPWND))
PUDeletePopup(m_hwnd);
break;
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp
index 5cff23a20b..0de8c5dcb7 100644
--- a/plugins/QuickMessages/src/Utils.cpp
+++ b/plugins/QuickMessages/src/Utils.cpp
@@ -492,7 +492,7 @@ wchar_t* ParseString(MCONTACT hContact, wchar_t* ptszQValIn, wchar_t* ptszText,
i = -1;
break;
case 'F':
- ptszName = Contact_GetInfo(CNF_FIRSTNAME, hContact);
+ ptszName = Contact::GetInfo(CNF_FIRSTNAME, hContact);
if (ptszName == nullptr)
break;
NameLenght = (int)mir_wstrlen(ptszName);
@@ -518,7 +518,7 @@ wchar_t* ParseString(MCONTACT hContact, wchar_t* ptszQValIn, wchar_t* ptszText,
i = -1;
break;
case 'L':
- ptszName = Contact_GetInfo(CNF_LASTNAME, hContact);
+ ptszName = Contact::GetInfo(CNF_LASTNAME, hContact);
if (ptszName == nullptr)
break;
diff --git a/plugins/QuickSearch/src/window.cpp b/plugins/QuickSearch/src/window.cpp
index b4aa4311d2..891d39aa92 100644
--- a/plugins/QuickSearch/src/window.cpp
+++ b/plugins/QuickSearch/src/window.cpp
@@ -560,7 +560,7 @@ INT_PTR QSMainDlg::OnStatusChanged(UINT, WPARAM hContact, LPARAM lParam)
return 0;
int oldStatus = pRow->status;
- int newStatus = Contact_GetStatus(hContact);
+ int newStatus = Contact::GetStatus(hContact);
pRow->status = newStatus;
if (oldStatus != ID_STATUS_OFFLINE && newStatus != ID_STATUS_OFFLINE)
diff --git a/plugins/QuickSearch/src/window_row.cpp b/plugins/QuickSearch/src/window_row.cpp
index a86489ad4a..d05ddb0c43 100644
--- a/plugins/QuickSearch/src/window_row.cpp
+++ b/plugins/QuickSearch/src/window_row.cpp
@@ -39,7 +39,7 @@ CRowItem::CRowItem(MCONTACT _1, QSMainDlg *pDlg) :
if (bAccDel || bAccOff)
status = ID_STATUS_OFFLINE;
else
- status = Contact_GetStatus(hContact);
+ status = Contact::GetStatus(hContact);
if (int nCount = g_plugin.m_columns.getCount()) {
pValues = new Val[nCount];
@@ -131,7 +131,7 @@ void CRowItem::Val::LoadOneItem(MCONTACT hContact, const ColumnItem &pCol, QSMai
break;
case QST_CONTACTINFO:
- text = Contact_GetInfo(pCol.cnftype, hContact);
+ text = Contact::GetInfo(pCol.cnftype, hContact);
if (text)
data = _wtoi(text);
break;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 6890f3c971..3b4a728cf0 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -371,7 +371,7 @@ void CMsgDialog::OnDestroy()
if (m_hContact && g_dat.flags.bDelTemp) {
m_hContact = INVALID_CONTACT_ID; // to prevent recursion
- if (!Contact_OnList(m_hContact))
+ if (!Contact::OnList(m_hContact))
db_delete_contact(m_hContact);
}
@@ -457,7 +457,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton)
void CMsgDialog::onClick_UserMenu(CCtrlButton *pButton)
{
if (GetKeyState(VK_SHIFT) & 0x8000) { // copy user name
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, m_hContact, m_szProto));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, m_hContact, m_szProto));
if (!OpenClipboard(m_hwnd) || !mir_wstrlen(id))
return;
@@ -512,9 +512,9 @@ void CMsgDialog::onClick_Quote(CCtrlButton*)
void CMsgDialog::onClick_Add(CCtrlButton*)
{
- Contact_Add(m_hContact, m_hwnd);
+ Contact::Add(m_hContact, m_hwnd);
- if (Contact_OnList(m_hContact))
+ if (Contact::OnList(m_hContact))
ShowWindow(GetDlgItem(m_hwnd, IDC_ADD), SW_HIDE);
}
@@ -1075,7 +1075,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
if (wParam == m_hContact && m_hContact && m_szProto) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
wchar_t buf[128];
- mir_snwprintf(buf, TranslateT("User menu - %s"), ptrW(Contact_GetInfo(CNF_UNIQUEID, m_hContact, m_szProto)).get());
+ mir_snwprintf(buf, TranslateT("User menu - %s"), ptrW(Contact::GetInfo(CNF_UNIQUEID, m_hContact, m_szProto)).get());
SendDlgItemMessage(m_hwnd, IDC_USERMENU, BUTTONADDTOOLTIP, (WPARAM)buf, BATF_UNICODE);
if (cws && !mir_strcmp(cws->szModule, m_szProto) && !mir_strcmp(cws->szSetting, "Status"))
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index cbb57583c1..95c7269cd7 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -105,7 +105,7 @@ EventData* CMsgDialog::GetEventFromDB(MCONTACT hContact, MEVENT hDbEvent)
evt->time = dbei.timestamp;
evt->szNick.w = nullptr;
if (evt->dwFlags & IEEDF_SENT)
- evt->szNick.w = Contact_GetInfo(CNF_DISPLAY, 0, m_szProto);
+ evt->szNick.w = Contact::GetInfo(CNF_DISPLAY, 0, m_szProto);
else
evt->szNick.w = mir_wstrdup(Clist_GetContactDisplayName(hContact));
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 38bb0461cb..1bba4511be 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -299,7 +299,7 @@ static int PrebuildContactMenu(WPARAM hContact, LPARAM)
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto) {
// leave this menu item hidden for chats
- if (!Contact_IsGroupChat(hContact, szProto))
+ if (!Contact::IsGroupChat(hContact, szProto))
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
bEnabled = true;
}
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 934823bc9a..79d832a5f4 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -114,7 +114,7 @@ bool CMsgDialog::IsTypingNotificationEnabled()
if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(m_hContact, m_szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
return FALSE;
- if (!Contact_OnList(m_hContact) && !g_plugin.bTypingUnknown)
+ if (!Contact::OnList(m_hContact) && !g_plugin.bTypingUnknown)
return FALSE;
return TRUE;
}
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index a2702075f5..fd346b0ec4 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -259,7 +259,7 @@ void SetButtonsPos(HWND hwndDlg, MCONTACT hContact, bool bShow)
continue;
if (cbd->m_dwButtonCID == IDC_ADD)
- if (Contact_OnList(hContact)) {
+ if (Contact::OnList(hContact)) {
ShowWindow(hwndButton, SW_HIDE);
continue;
}
diff --git a/plugins/SecureIM/src/crypt_check.cpp b/plugins/SecureIM/src/crypt_check.cpp
index f0665d7e28..7990de8f99 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) && Contact_IsHidden(hContact))
+ if (!db_mc_isSub(hContact) && Contact::IsHidden(hContact))
return true;
pUinKey p = findUinKey(hContact);
@@ -116,7 +116,7 @@ bool isContactInvisible(MCONTACT hContact)
bool isNotOnList(MCONTACT hContact)
{
- return !Contact_OnList(hContact);
+ return !Contact::OnList(hContact);
}
bool isContactNewPG(MCONTACT hContact)
@@ -180,7 +180,7 @@ bool isChatRoom(MCONTACT hContact)
if (!p || !p->proto || !p->proto->inspecting)
return false;
- return Contact_IsGroupChat(hContact, p->proto->name);
+ return Contact::IsGroupChat(hContact, p->proto->name);
}
bool isFileExist(LPCSTR filename)
@@ -193,7 +193,7 @@ bool isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM)
if (!bAIP) return false;
if (!ptr->proto->inspecting) return false;
- if (bNOL && !Contact_OnList(ptr->hContact))
+ if (bNOL && !Contact::OnList(ptr->hContact))
return false;
bool isSecureIM = false;
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index 621101ee50..ef35cef91c 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -203,6 +203,6 @@ void getContactUin(MCONTACT hContact, LPWSTR szUIN)
if (pa == nullptr)
return;
- ptrW uid(Contact_GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
+ ptrW uid(Contact::GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
mir_snwprintf(szUIN, NAMSIZE, L"%s [%s]", uid.get(), pa->tszAccountName);
}
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp
index a4d6312d95..f2917aeeb3 100644
--- a/plugins/SecureIM/src/options.cpp
+++ b/plugins/SecureIM/src/options.cpp
@@ -434,7 +434,7 @@ static void ResetGeneralDlg(HWND hDlg)
LV_SetItemText(hLV, itemNum, 1, pa->tszAccountName);
- ptrW uid(Contact_GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
+ ptrW uid(Contact::GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
LV_SetItemText(hLV, itemNum, 2, uid);
setListViewMode(hLV, itemNum, ptr->tmode);
@@ -505,7 +505,7 @@ static void RefreshGeneralDlg(HWND hDlg, BOOL iInit)
LV_SetItemText(hLV, itemNum, 1, pa->tszAccountName);
- ptrW uid(Contact_GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
+ ptrW uid(Contact::GetInfo(CNF_UNIQUEID, hContact, pa->szModuleName));
LV_SetItemText(hLV, itemNum, 2, uid);
setListViewMode(hLV, itemNum, ptr->tmode);
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp
index c24345000a..f23bf1300e 100644
--- a/plugins/SeenPlugin/src/menu.cpp
+++ b/plugins/SeenPlugin/src/menu.cpp
@@ -37,7 +37,7 @@ INT_PTR MenuitemClicked(WPARAM hContact, LPARAM)
int BuildContactMenu(WPARAM hContact, LPARAM)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (!IsWatchedProtocol(szProto) || Contact_IsGroupChat(hContact, szProto) || !g_plugin.getByte("MenuItem", 1)) {
+ if (!IsWatchedProtocol(szProto) || Contact::IsGroupChat(hContact, szProto) || !g_plugin.getByte("MenuItem", 1)) {
Menu_ShowItem(hmenuitem, false);
return 0;
}
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp
index fce8288f05..adbe29c85c 100644
--- a/plugins/SeenPlugin/src/userinfo.cpp
+++ b/plugins/SeenPlugin/src/userinfo.cpp
@@ -63,7 +63,7 @@ struct UserinfoDlg : public CUserInfoPageDlg
int UserinfoInit(WPARAM wparam, LPARAM hContact)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (IsWatchedProtocol(szProto) && !Contact_IsGroupChat(hContact, szProto)) {
+ if (IsWatchedProtocol(szProto) && !Contact::IsGroupChat(hContact, szProto)) {
USERINFOPAGE uip = {};
uip.szTitle.a = LPGEN("Last seen");
uip.pDialog = new UserinfoDlg();
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 1a3bee9e55..7897bec510 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -218,7 +218,7 @@ LBL_noData:
break;
case 'N':
- if (info = Contact_GetInfo(CNF_NICK, hcontact, szProto)) {
+ if (info = Contact::GetInfo(CNF_NICK, hcontact, szProto)) {
res.Append(info);
break;
}
@@ -233,7 +233,7 @@ LBL_noData:
break;
case 'u':
- if (info = Contact_GetInfo(CNF_UNIQUEID, hcontact, szProto)) {
+ if (info = Contact::GetInfo(CNF_UNIQUEID, hcontact, szProto)) {
res.Append(info);
break;
}
@@ -407,7 +407,7 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
if (Ignore_IsIgnored(hcontact, IGNOREEVENT_USERONLINE))
return;
- if (!g_plugin.bUsePopups || Contact_IsHidden(hcontact))
+ if (!g_plugin.bUsePopups || Contact::IsHidden(hcontact))
return;
char szSetting[10];
@@ -555,7 +555,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam)
g_plugin.setByte(hContact, "Offline", 0);
}
}
- else if (hContact && IsWatchedProtocol(cws->szModule) && !Contact_IsGroupChat(hContact, cws->szModule)) {
+ else if (hContact && IsWatchedProtocol(cws->szModule) && !Contact::IsGroupChat(hContact, cws->szModule)) {
// here we will come when <User>/<module>/Status is changed or it is idle event and if <module> is watched
if (Proto_GetStatus(cws->szModule) > ID_STATUS_OFFLINE) {
mir_cslock lck(csContacts);
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index 385f413d06..f13760b7de 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -66,7 +66,7 @@ void CSend::SetContact(MCONTACT hContact)
m_hContact = hContact;
if (hContact) {
m_pszProto = Proto_GetBaseAccountName(hContact);
- m_ChatRoom = Contact_IsGroupChat(hContact, m_pszProto);
+ m_ChatRoom = Contact::IsGroupChat(hContact, m_pszProto);
}
}
diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.cpp b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
index fdd18c381e..8490004f21 100644
--- a/plugins/SendScreenshotPlus/src/CSendEmail.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
@@ -62,8 +62,8 @@ int CSendEmail::Send()
mir_free(m_pszFileA);
m_pszFileA = mir_u2a(m_pszFile);
- m_Email = mir_u2a(ptrW(Contact_GetInfo(CNF_EMAIL, m_hContact, m_pszProto)));
- m_FriendlyName = mir_u2a(ptrW(Contact_GetInfo(CNF_DISPLAY, m_hContact, m_pszProto)));
+ m_Email = mir_u2a(ptrW(Contact::GetInfo(CNF_EMAIL, m_hContact, m_pszProto)));
+ m_FriendlyName = mir_u2a(ptrW(Contact::GetInfo(CNF_DISPLAY, m_hContact, m_pszProto)));
m_Subject = mir_u2a(m_pszFileDesc);
// SendByEmail(m_pszFileA, "", m_FriendlyName, m_Email, m_Subject);
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 4233d5e3e6..e3223f43cc 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -144,7 +144,7 @@ INT_PTR service_SendDesktop(WPARAM wParam, LPARAM)
frmMain->m_opt_tabCapture = 1;
frmMain->m_opt_cboxDesktop = 0;
frmMain->m_opt_chkEditor = false;
- frmMain->m_opt_cboxSendBy = Contact_IsGroupChat(hContact) ? SS_IMAGESHACK : SS_FILESEND;
+ frmMain->m_opt_cboxSendBy = Contact::IsGroupChat(hContact) ? SS_IMAGESHACK : SS_FILESEND;
frmMain->Init(pszPath, hContact); // this method create the window hidden.
mir_free(pszPath);
frmMain->btnCaptureClick(); // this method will call Close()
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index 13e980d770..37f8f7d8e0 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -123,7 +123,7 @@ void OffsetWindow(HWND parent, HWND hwnd, int dx, int dy)
int CheckContactVisibility(MCONTACT hContact)
{
- return db_mc_isSub(hContact) || !Contact_IsHidden(hContact);
+ return db_mc_isSub(hContact) || !Contact::IsHidden(hContact);
}
void RenameUserDefSession(int ses_count, wchar_t* ptszNewName)
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index 662d62a8df..96420df8e2 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 (Contact_IsHidden(hContact) || !Contact_OnList(hContact) || Ignore_IsIgnored(hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_FILE) != 0)
+ if (Contact::IsHidden(hContact) || !Contact::OnList(hContact) || Ignore_IsIgnored(hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_FILE) != 0)
continue;
}
// is HIT2 off?
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index 03508b3259..56f5765bb9 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -157,7 +157,7 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent)
return FALSE;
mir_free(ptszVal);
- if (!Contact_OnList(hContact))
+ if (!Contact::OnList(hContact))
return FALSE;
if (g_plugin.getByte(hContact, "TurnedOn"))
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 13f73b6b57..6d25de503b 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -294,7 +294,7 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM)
Menu_ShowItem(hAwayMsgMenuItem, false);
char *szProto = Proto_GetBaseAccountName(hContact);
- if (szProto == nullptr || Contact_IsGroupChat(hContact, szProto))
+ if (szProto == nullptr || Contact::IsGroupChat(hContact, szProto))
return 0;
int iStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index 0841a06bef..76ea50fbd8 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -77,7 +77,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
return 0;
// Pass-through if event is from a contact that is already in the list.
- if (!Contact_OnList(hContact)) // Already in the list
+ if (!Contact::OnList(hContact)) // Already in the list
return 0;
// Pass-through if event is from a contact that is already in the server-side contact list
@@ -93,7 +93,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
if (g_plugin.getByte("ApproveOnMsgOut", 0)) {
g_plugin.setByte(hContact, "Verified", 1);
if (g_plugin.getByte("AddPermanently", defaultAddPermanently))
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
db_unset(hContact, "CList", "Delete");
}
return 0;
@@ -101,7 +101,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
// Hide the contact until verified if option set.
if (g_plugin.getByte("HideUnverified", defaultHideUnverified))
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
// Fetch the incoming message body
char *msgblob;
@@ -145,9 +145,9 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
if (bCorrectResponse) {
g_plugin.setByte(hContact, "Verified", 1);
if (g_plugin.getByte("HideUnverified", defaultHideUnverified))
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
if (g_plugin.getByte("AddPermanently", defaultAddPermanently))
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
db_unset(hContact, "CList", "Delete");
if (g_plugin.getByte("ReplyOnSuccess", defaultReplyOnSuccess) && (g_plugin.getByte(hContact, "MsgSent", 0))) {
T2Utf response(_getOptS(buf, buflen, "SuccessResponse", defaultSuccessResponse));
@@ -210,9 +210,9 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
{
g_plugin.setByte(hContact, "Verified", 1);
if (g_plugin.getByte("HideUnverified", defaultHideUnverified))
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
if (g_plugin.getByte("AddPermanently", defaultAddPermanently))
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
db_unset(hContact, "CList", "Delete");
db_unset(hContact, "CList", "ResponseNum");
if (g_plugin.getByte("ReplyOnSuccess", defaultReplyOnSuccess)) {
@@ -311,9 +311,9 @@ 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))
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
if (g_plugin.getByte("AddPermanently", defaultAddPermanently))
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
db_unset(hContact, "CList", "Delete");
if (bayesEnabled &&
g_plugin.getByte("BayesAutolearnApproved", defaultBayesAutolearnApproved) &&
@@ -481,7 +481,7 @@ void RemoveNotOnListSettings()
mir_strcat(protoName, dbv.pszVal);
if (g_plugin.getByte(protoName, 0) != 0) {
if (db_get_b(hContact, "CList", "Delete", 0) == 1) {
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
}
}
db_free(&dbv);
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp
index a01b18ff76..25a25506a3 100644
--- a/plugins/StopSpamMod/src/stopspam.cpp
+++ b/plugins/StopSpamMod/src/stopspam.cpp
@@ -34,14 +34,14 @@ int OnDbEventAdded(WPARAM hContact, LPARAM hDbEvent)
MCONTACT hcntct = DbGetAuthEventContact(&dbei);
// if request is from unknown or not marked Answered contact
- int a = !Contact_OnList(hcntct);
+ int a = !Contact::OnList(hcntct);
int b = !g_plugin.getByte(hcntct, "Answered");
if (a && b) {
// ...send message
if (gbHideContacts)
- Contact_Hide(hcntct);
+ Contact::Hide(hcntct);
if (gbSpecialGroup)
Clist_SetGroup(hcntct, gbSpammersGroup.c_str());
uint8_t msg = 1;
@@ -82,7 +82,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
return 0;
if (g_plugin.getByte(hContact, "Excluded")) {
- if (Contact_OnList(hContact))
+ if (Contact::OnList(hContact))
g_plugin.delSetting(hContact, "Excluded");
return 0;
}
@@ -92,14 +92,14 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
return 0; // ...let the event go its way
// mark contact which we trying to contact for exclude from check
- if ((dbei->flags & DBEF_SENT) && !Contact_OnList(hContact)
+ if ((dbei->flags & DBEF_SENT) && !Contact::OnList(hContact)
&& (!gbMaxQuestCount || g_plugin.getDword(hContact, "QuestionCount") < gbMaxQuestCount) && gbExclude) {
g_plugin.setByte(hContact, "Excluded", 1);
return 0;
}
// if message is from known or marked Answered contact
- if (Contact_OnList(hContact))
+ if (Contact::OnList(hContact))
return 0; // ...let the event go its way
// if message is corrupted or empty it cannot be an answer.
@@ -153,7 +153,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
if (answered) {
// unhide contact
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
g_plugin.delSetting(hContact, "MathAnswer");
@@ -162,7 +162,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
//add contact permanently
if (gbAddPermanent) //do not use this )
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
// send congratulation
if (bSendMsg) {
@@ -181,7 +181,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
// add contact to server list and local group
if (gbAutoAddToServerList) {
Clist_SetGroup(hContact, gbAutoAuthGroup.c_str());
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
}
// auto auth. request with send congratulation
@@ -267,10 +267,10 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
}
}
if (gbHideContacts)
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
if (gbSpecialGroup)
Clist_SetGroup(hContact, gbSpammersGroup.c_str());
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
// save first message from contact
if (g_plugin.getDword(hContact, "QuestionCount") < 2) {
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index c051761ad6..7545d87ef7 100644
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -186,7 +186,7 @@ BOOL IsUrlContains(wchar_t * Str)
wstring GetContactUid(MCONTACT hContact, wstring Protocol)
{
char *szProto = mir_utf8encodeW(Protocol.c_str());
- ptrW uid(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto));
+ ptrW uid(Contact::GetInfo(CNF_DISPLAYUID, hContact, szProto));
return (uid) ? uid : L"";
}
@@ -249,7 +249,7 @@ void __cdecl CleanProtocolTmpThread(void *param)
std::list<MCONTACT> contacts;
for (auto &hContact : Contacts(szProto))
- if (!Contact_OnList(hContact) || (L"Not In List" == DBGetContactSettingStringPAN(hContact, "CList", "Group", L"")))
+ if (!Contact::OnList(hContact) || (L"Not In List" == DBGetContactSettingStringPAN(hContact, "CList", "Group", L"")))
contacts.push_back(hContact);
Sleep(5000);
@@ -279,7 +279,7 @@ void __cdecl CleanProtocolExclThread(void *param)
std::list<MCONTACT> contacts;
for (auto &hContact : Contacts(szProto))
- if (!Contact_OnList(hContact) && g_plugin.getByte(hContact, "Excluded"))
+ if (!Contact::OnList(hContact) && g_plugin.getByte(hContact, "Excluded"))
contacts.push_back(hContact);
Sleep(5000);
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index 8985820c07..7ce72a91b9 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -19,7 +19,7 @@ int OnDbEventAdded(WPARAM, LPARAM lParam)
// if request is from unknown or not marked Answered contact
//and if I don't sent message to this contact
- if (!Contact_OnList(hcntct) && !g_plugin.getByte(hcntct, DB_KEY_ANSWERED) && !IsExistMyMessage(hcntct)) {
+ if (!Contact::OnList(hcntct) && !g_plugin.getByte(hcntct, DB_KEY_ANSWERED) && !IsExistMyMessage(hcntct)) {
if (!g_sets.HandleAuthReq) {
char *buf = mir_utf8encodeW(variables_parse(g_sets.getReply(), hcntct).c_str());
ProtoChainSend(hcntct, PSS_MESSAGE, 0, (LPARAM)buf);
@@ -29,8 +29,8 @@ int OnDbEventAdded(WPARAM, LPARAM lParam)
// ...send message
CallProtoService(dbei.szModule, PS_AUTHDENY, hDbEvent, (LPARAM)_T2A(variables_parse(g_sets.getReply(), hcntct).c_str()));
- Contact_RemoveFromList(hcntct);
- Contact_Hide(hcntct);
+ Contact::RemoveFromList(hcntct);
+ Contact::Hide(hcntct);
if (!g_sets.HistLog)
db_event_delete(hDbEvent);
return 1;
@@ -63,7 +63,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
// checking if message from self-added contact
//Contact in Not in list icq group
- if (Contact_OnList(hContact) && db_get_w(hContact, dbei->szModule, "SrvGroupId", -1) != 1)
+ if (Contact::OnList(hContact) && db_get_w(hContact, dbei->szModule, "SrvGroupId", -1) != 1)
return 0;
//if I sent message to this contact
@@ -101,14 +101,14 @@ 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
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
// mark contact as Answered
g_plugin.setByte(hContact, DB_KEY_ANSWERED, 1);
//add contact permanently
if (g_sets.AddPermanent)
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
// send congratulation
@@ -142,8 +142,8 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
}
// hide contact from contact list
- Contact_RemoveFromList(hContact);
- Contact_Hide(hContact);
+ Contact::RemoveFromList(hContact);
+ Contact::Hide(hContact);
// mark message as read and allow to insert it into the history
dbei->flags |= DBEF_READ;
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp
index 4a9a0417de..90a14444a1 100644
--- a/plugins/StopSpamPlus/src/services.cpp
+++ b/plugins/StopSpamPlus/src/services.cpp
@@ -12,7 +12,7 @@ INT_PTR IsContactPassed(WPARAM hContact, LPARAM /*lParam*/)
if (g_plugin.getByte(hContact, DB_KEY_ANSWERED))
return CS_PASSED;
- if (Contact_OnList(hContact) && db_get_w(hContact, szProto, "SrvGroupId", -1) != 1)
+ if (Contact::OnList(hContact) && db_get_w(hContact, szProto, "SrvGroupId", -1) != 1)
return CS_PASSED;
if (IsExistMyMessage(hContact))
@@ -27,7 +27,7 @@ INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam)
MCONTACT hNext = db_find_next(hContact);
ptrW szGroup(Clist_GetGroup(hContact));
- if (!Contact_OnList(hContact) || (szGroup != NULL && (wcsstr(szGroup, L"Not In List") || wcsstr(szGroup, TranslateT("Not In List"))))) {
+ if (!Contact::OnList(hContact) || (szGroup != NULL && (wcsstr(szGroup, L"Not In List") || wcsstr(szGroup, TranslateT("Not In List"))))) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr) {
// Check if protocol uses server side lists
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index ec4b8541fa..173fad2b7f 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -216,8 +216,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
if (bHighlight) {
gce->iType |= GC_EVENT_HIGHLIGHT;
- if (Contact_IsHidden(si->hContact) != 0)
- Contact_Hide(si->hContact, false);
+ if (Contact::IsHidden(si->hContact) != 0)
+ Contact::Hide(si->hContact, false);
if (bInactive) {
bFlagUnread = true;
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 6e8a373d55..88b06217ca 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -158,7 +158,7 @@ bool CContactCache::updateUIN()
m_szUIN[0] = 0;
if (m_isValid) {
- ptrW uid(Contact_GetInfo(CNF_DISPLAYUID, getActiveContact(), getActiveProto()));
+ ptrW uid(Contact::GetInfo(CNF_DISPLAYUID, getActiveContact(), getActiveProto()));
if (uid != nullptr)
wcsncpy_s(m_szUIN, uid, _TRUNCATE);
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index b95734d3af..48f4cb34a7 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -833,7 +833,7 @@ void CMsgDialog::DM_NotifyTyping(int mode)
// don't send to contacts which are not permanently added to the contact list,
// unless the option to ignore added status is set.
- if (!Contact_OnList(m_hContact) && !g_plugin.bTypingUnknown)
+ if (!Contact::OnList(m_hContact) && !g_plugin.bTypingUnknown)
return;
// End user check
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 679fb63f7b..dcf827104c 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -502,7 +502,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
return;
// don't log them if WE are logging off
- if (Proto_GetStatus(c->getProto()) == ID_STATUS_OFFLINE || Contact_IsGroupChat(hContact, c->getProto()))
+ if (Proto_GetStatus(c->getProto()) == ID_STATUS_OFFLINE || Contact::IsGroupChat(hContact, c->getProto()))
return;
uint16_t wStatus = LOWORD(wParam);
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 82430e9446..2cc217774a 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -249,7 +249,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendMessage(pDlg->GetHwnd(), WM_CLOSE, 0, 1);
char *szProto = Proto_GetBaseAccountName(lParam);
- if (szProto != nullptr && Contact_IsGroupChat(lParam, szProto))
+ if (szProto != nullptr && Contact::IsGroupChat(lParam, szProto))
ShowRoom((TContainerData*)wParam, SM_FindSessionByHCONTACT(lParam));
else
CreateNewTabForContact((TContainerData*)wParam, lParam, true, true, false);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index e6957fbd0a..01a02eaf28 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -351,7 +351,7 @@ int CMimAPI::PrebuildContactMenu(WPARAM hContact, LPARAM)
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto) {
// leave this menu item hidden for chats
- if (!Contact_IsGroupChat(hContact, szProto))
+ if (!Contact::IsGroupChat(hContact, szProto))
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
bEnabled = true;
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 9533808d2b..7d594156d8 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -111,7 +111,7 @@ static void ShowMultipleControls(HWND hwndDlg, const UINT *controls, int cContro
void CMsgDialog::SetDialogToType()
{
- if (!Contact_OnList(m_hContact)) {
+ if (!Contact::OnList(m_hContact)) {
m_bNotOnList = true;
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_SHOW);
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_SHOW);
@@ -677,7 +677,7 @@ void CMsgDialog::OnDestroy()
m_pContainer->m_pSideBar->removeSession(this);
if (M.GetByte("deletetemp", 0))
- if (!Contact_OnList(m_hContact))
+ if (!Contact::OnList(m_hContact))
db_delete_contact(m_hContact);
if (m_hwndContactPic)
@@ -890,9 +890,9 @@ void CMsgDialog::onClick_Ok(CCtrlButton *)
void CMsgDialog::onClick_Add(CCtrlButton*)
{
- Contact_Add(m_hContact, m_hwnd);
+ Contact::Add(m_hContact, m_hwnd);
- if (Contact_OnList(m_hContact)) {
+ if (Contact::OnList(m_hContact)) {
m_bNotOnList = false;
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
if (!m_bScrollingDisabled)
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index 0950593edb..fca323a908 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -672,9 +672,9 @@ HICON CMsgDialog::GetMyContactIcon(LPCSTR szSetting)
void CMsgDialog::GetMyNick()
{
- ptrW tszNick(Contact_GetInfo(CNF_CUSTOMNICK, 0, m_cache->getActiveProto()));
+ ptrW tszNick(Contact::GetInfo(CNF_CUSTOMNICK, 0, m_cache->getActiveProto()));
if (tszNick == nullptr)
- tszNick = Contact_GetInfo(CNF_NICK, 0, m_cache->getActiveProto());
+ tszNick = Contact::GetInfo(CNF_NICK, 0, m_cache->getActiveProto());
if (tszNick != nullptr) {
if (mir_wstrlen(tszNick) == 0 || !mir_wstrcmp(tszNick, TranslateT("'(Unknown contact)'")))
wcsncpy_s(m_wszMyNickname, (m_myUin[0] ? m_myUin : TranslateT("'(Unknown contact)'")), _TRUNCATE);
@@ -690,7 +690,7 @@ void CMsgDialog::GetMyNick()
void CMsgDialog::GetMYUIN()
{
- ptrW uid(Contact_GetInfo(CNF_DISPLAYUID, 0, m_cache->getActiveProto()));
+ ptrW uid(Contact::GetInfo(CNF_DISPLAYUID, 0, m_cache->getActiveProto()));
if (uid != nullptr)
wcsncpy_s(m_myUin, uid, _TRUNCATE);
else
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index fbc7f439db..44c18bf777 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -580,8 +580,8 @@ public:
m_hContact = db_add_contact();
Proto_AddToContact(m_hContact, m_szProto = META_PROTO);
- Contact_Hide(m_hContact);
- Contact_RemoveFromList(m_hContact);
+ Contact::Hide(m_hContact);
+ Contact::RemoveFromList(m_hContact);
db_set_ws(m_hContact, META_PROTO, "Nick", TranslateT("Test contact"));
m_pContainer = new TContainerData();
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 02f741c5e9..45b3a28d78 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -64,10 +64,10 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
void TN_TypingMessage(MCONTACT hContact, int iMode)
{
// hidden & ignored contacts check
- if (Contact_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 (!Contact_OnList(hContact) && !g_plugin.bTypingUnknown)
+ if (!Contact::OnList(hContact) && !g_plugin.bTypingUnknown)
return;
if (!g_plugin.bPopups)
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 7d0eda0ac3..cc9bac99a9 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -67,7 +67,7 @@ bool CheckContactType(MCONTACT hContact, const DISPLAYITEM &di)
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto) {
- if (Contact_IsGroupChat(hContact, szProto))
+ if (Contact::IsGroupChat(hContact, szProto))
return di.type == DIT_CHATS;
else
return di.type == DIT_CONTACTS;
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index c8b1c5bea2..0bbd200e69 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -202,14 +202,14 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam)
idle = true;
else return 0;
- if (Contact_IsHidden(hContact))
+ if (Contact::IsHidden(hContact))
return 0;
const char *pszProto = cws->szModule;
if (g_plugin.getByte(pszProto, ProtoUserBit | ProtoIntBit) != (ProtoUserBit | ProtoIntBit))
return 0;
- if (!Contact_OnList(hContact) && m_sOptions.bIgnoreUnknown)
+ if (!Contact::OnList(hContact) && m_sOptions.bIgnoreUnknown)
return 0;
if (g_plugin.getByte(hContact, CONTACT_IGNORE_TTNOTIFY, m_sOptions.bIgnoreNew))
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 3359ce6292..301d87c4f3 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -107,7 +107,7 @@ uint8_t CExImContactBase::fromDB(MCONTACT hContact)
}
// unique id (for ChatRoom)
- if (isChatRoom = Contact_IsGroupChat(_hContact, pszProto)) {
+ if (isChatRoom = Contact::IsGroupChat(_hContact, pszProto)) {
uidSetting = "ChatRoomID";
_pszUIDKey = mir_strdup(uidSetting);
if (!DB::Setting::GetAsIs(_hContact, pszProto, uidSetting, &_dbvUID)) {
@@ -297,7 +297,7 @@ void CExImContactBase::toIni(FILE *file, int modCount)
}
else {
// Proto loaded - GetContactName(hContact,pszProto,0)
- ptrW pszCI(Contact_GetInfo(CNF_DISPLAY, _hContact, _pszProto));
+ ptrW pszCI(Contact::GetInfo(CNF_DISPLAY, _hContact, _pszProto));
ptrA pszUID(uid2String(FALSE));
if (_pszUIDKey && pszUID)
mir_snprintf(name, "%S *(%s)*<%s>*{%s}*", pszCI.get(), _pszProto, _pszUIDKey, pszUID.get());
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 261b6b97aa..e5cc1dad7a 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, uint8_t bN
static void CheckContact(MCONTACT hContact, MTime &Now, CEvent &evt, uint8_t bNotify, PWORD LastAnwer = nullptr)
{
// ignore meta subcontacts here as their birthday information are collected explicitly
- if (hContact && (!gRemindOpts.bCheckVisibleOnly || !Contact_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/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index 67f427d5bc..bb6194aad9 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -156,7 +156,7 @@ wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact)
case CNF_UNIQUEID:
// UID for ChatRoom
- if (Contact_IsGroupChat(hContact, szProto))
+ if (Contact::IsGroupChat(hContact, szProto))
if ((res = db_get_wsa(hContact, szProto, "ChatRoomID")) != nullptr)
return res;
@@ -164,7 +164,7 @@ wchar_t* getContactInfoT(uint8_t type, MCONTACT hContact)
break;
}
- return Contact_GetInfo(type, hContact);
+ return Contact::GetInfo(type, hContact);
}
// MS_VARS_GETCONTACTFROMSTRING
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index 147f359045..72cf34604e 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -360,7 +360,7 @@ static wchar_t* parseProtoInfo(ARGUMENTSINFO *ai)
return nullptr;
}
else if (!mir_wstrcmp(ai->argv.w[2], _A2W(STR_PINICK)))
- wszRes = Contact_GetInfo(CNF_DISPLAY, NULL, szProto);
+ wszRes = Contact::GetInfo(CNF_DISPLAY, NULL, szProto);
if (szRes == nullptr && wszRes == nullptr)
return nullptr;
diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp
index 789b36a4cc..621505ccf3 100644
--- a/plugins/WhenWasIt/src/hooked_events.cpp
+++ b/plugins/WhenWasIt/src/hooked_events.cpp
@@ -92,7 +92,7 @@ int RefreshContactListIcons(MCONTACT hContact)
if (hContact == 0)
return 0;
- bool hidden = Contact_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/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp
index 5067e42768..1318b15a7e 100644
--- a/plugins/WhenWasIt/src/utils.cpp
+++ b/plugins/WhenWasIt/src/utils.cpp
@@ -145,7 +145,7 @@ wchar_t* GetContactID(MCONTACT hContact)
wchar_t* GetContactID(MCONTACT hContact, char *szProto)
{
- ptrW res(Contact_GetInfo(CNF_UNIQUEID, hContact, szProto));
+ ptrW res(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
return (res) ? wcsdup(res) : nullptr;
}
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp
index eb67d8d47a..bf165f08d3 100644
--- a/plugins/XSoundNotify/src/dialog.cpp
+++ b/plugins/XSoundNotify/src/dialog.cpp
@@ -43,7 +43,7 @@ public:
WindowList_Add(hChangeSoundDlgList, m_hwnd, pData->hContact);
Utils_RestoreWindowPositionNoSize(m_hwnd, pData->hContact, MODULENAME, "ChangeSoundDlg");
- ptrW uid(Contact_GetInfo(CNF_UNIQUEID, pData->hContact));
+ ptrW uid(Contact::GetInfo(CNF_UNIQUEID, pData->hContact));
wchar_t value[100];
mir_snwprintf(value, TranslateT("Custom sound for %s (%s)"), Clist_GetContactDisplayName(pData->hContact), uid.get());
SetWindowText(m_hwnd, value);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index 31237230fb..e3b6406376 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -118,7 +118,7 @@ public:
comboUser.AddString(TranslateT("All contacts"), -1);
for (auto &hContact : Contacts(pa->szModuleName)) {
- ptrW uid(Contact_GetInfo(CNF_UNIQUEID, hContact));
+ ptrW uid(Contact::GetInfo(CNF_UNIQUEID, hContact));
CMStringW value(FORMAT, L"%s (%s)", Clist_GetContactDisplayName(hContact), uid.get());
comboUser.AddString(value, hContact);
}
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 089adfe23e..7f2f1f607f 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -142,7 +142,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent)
case 'i':
case 'I':
{
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, NULL));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, NULL));
if (id != NULL)
wcsncpy_s(buf, id, _TRUNCATE);
else
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp
index 2b6f0b2372..993ece3475 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 (!Contact_OnList(hContact) || Contact_IsHidden(hContact) || (Ignore_IsIgnored(wParam, IGNOREEVENT_USERONLINE) && newStatus == ID_STATUS_ONLINE))
+ if (!Contact::OnList(hContact) || Contact::IsHidden(hContact) || (Ignore_IsIgnored(wParam, IGNOREEVENT_USERONLINE) && newStatus == ID_STATUS_ONLINE))
return 0;
wchar_t bufferW[512];