summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_contacts.h57
-rw-r--r--libs/win32/mir_app.libbin226658 -> 227250 bytes
-rw-r--r--libs/win64/mir_app.libbin222520 -> 223346 bytes
-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
-rw-r--r--protocols/CloudFile/src/utils.cpp4
-rw-r--r--protocols/Dummy/src/dummy_proto.cpp10
-rw-r--r--protocols/EmLanProto/src/mlan.cpp12
-rw-r--r--protocols/Facebook/src/server.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp12
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp2
-rw-r--r--protocols/ICQ-WIM/src/groupchats.cpp2
-rw-r--r--protocols/ICQ-WIM/src/ignore.cpp2
-rw-r--r--protocols/ICQ-WIM/src/poll.cpp2
-rw-r--r--protocols/ICQ-WIM/src/server.cpp6
-rw-r--r--protocols/ICQ-WIM/src/utils.cpp4
-rw-r--r--protocols/ICQCorp/src/protocol.cpp8
-rw-r--r--protocols/ICQCorp/src/services.cpp4
-rw-r--r--protocols/IRCG/src/clist.cpp12
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp6
-rw-r--r--protocols/IRCG/src/services.cpp4
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp6
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp2
-rw-r--r--protocols/JabberG/src/jabber_events.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp2
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp4
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp2
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp4
-rw-r--r--protocols/NewsAggregator/Src/Options.cpp4
-rw-r--r--protocols/Sametime/src/conference.cpp6
-rw-r--r--protocols/Sametime/src/sametime.cpp4
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp10
-rw-r--r--protocols/Sametime/src/session_announce_win.cpp2
-rw-r--r--protocols/Sametime/src/userlist.cpp16
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp2
-rw-r--r--protocols/Steam/src/steam_contacts.cpp4
-rw-r--r--protocols/Tox/src/tox_contacts.cpp6
-rw-r--r--protocols/Tox/src/tox_search.cpp2
-rw-r--r--protocols/Tox/src/tox_utils.cpp2
-rw-r--r--protocols/Twitter/src/connection.cpp2
-rw-r--r--protocols/Twitter/src/contacts.cpp4
-rw-r--r--protocols/VKontakte/src/misc.cpp4
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp8
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp2
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp4
-rw-r--r--protocols/Weather/src/weather_addstn.cpp6
-rw-r--r--protocols/Weather/src/weather_mwin.cpp4
-rw-r--r--protocols/WebView/src/webview_services.cpp12
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3comm.cpp4
-rw-r--r--protocols/YAMN/src/services.cpp2
-rw-r--r--src/core/stdaway/src/awaymsg.cpp2
-rw-r--r--src/core/stdfile/src/file.cpp8
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp10
-rw-r--r--src/core/stdfile/src/filesenddlg.cpp2
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp12
-rw-r--r--src/core/stdmsg/src/msglog.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp2
-rw-r--r--src/core/stduseronline/src/useronline.cpp2
-rw-r--r--src/mir_app/mir_app.vcxproj2
-rw-r--r--src/mir_app/mir_app.vcxproj.filters6
-rw-r--r--src/mir_app/src/addcontact.cpp8
-rw-r--r--src/mir_app/src/auth.cpp16
-rw-r--r--src/mir_app/src/chat_clist.cpp6
-rw-r--r--src/mir_app/src/chat_manager.cpp2
-rw-r--r--src/mir_app/src/chat_svc.cpp6
-rw-r--r--src/mir_app/src/chat_tools.cpp4
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clccontact.cpp (renamed from src/mir_app/src/contact.cpp)4
-rw-r--r--src/mir_app/src/clcitems.cpp4
-rw-r--r--src/mir_app/src/clistmod.cpp2
-rw-r--r--src/mir_app/src/clistsettings.cpp6
-rw-r--r--src/mir_app/src/clui.cpp4
-rw-r--r--src/mir_app/src/contacts.cpp16
-rw-r--r--src/mir_app/src/ei_defaulticons.cpp2
-rw-r--r--src/mir_app/src/findadd.cpp4
-rw-r--r--src/mir_app/src/ignore.cpp6
-rw-r--r--src/mir_app/src/menu_clist.cpp2
-rw-r--r--src/mir_app/src/meta_menu.cpp6
-rw-r--r--src/mir_app/src/meta_utils.cpp8
-rw-r--r--src/mir_app/src/mir_app.def22
-rw-r--r--src/mir_app/src/mir_app64.def22
-rw-r--r--src/mir_app/src/path.cpp4
-rw-r--r--src/mir_app/src/proto_opts.cpp2
-rw-r--r--src/mir_app/src/searchresults.cpp2
-rw-r--r--src/mir_app/src/utils.cpp2
229 files changed, 738 insertions, 735 deletions
diff --git a/include/m_contacts.h b/include/m_contacts.h
index 24f9bc4cdb..49e2f98566 100644
--- a/include/m_contacts.h
+++ b/include/m_contacts.h
@@ -71,43 +71,46 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Same as CNF_DISPLAY except the custom handle is not used
#define CNF_DISPLAYNC 17
-// Get contact information
-// Returns NULL on failure to retrieve the info or a string on success.
-// If successful, this string must be freed using mir_free
+namespace Contact
+{
+ // Get contact information
+ // Returns NULL on failure to retrieve the info or a string on success.
+ // If successful, this string must be freed using mir_free
-EXTERN_C MIR_APP_DLL(wchar_t*) Contact_GetInfo(
- int type, // one of the CNF_* constants
- MCONTACT hContact, // contact id or NULL for the global data
- const char *szProto = nullptr); // protocol for global data. if skipped, grabbed from hContact
+ MIR_APP_DLL(wchar_t *) GetInfo(
+ int type, // one of the CNF_* constants
+ MCONTACT hContact, // contact id or NULL for the global data
+ const char *szProto = nullptr); // protocol for global data. if skipped, grabbed from hContact
-EXTERN_C MIR_APP_DLL(int) Contact_GetStatus(MCONTACT hContact);
+ MIR_APP_DLL(int) GetStatus(MCONTACT hContact);
-/////////////////////////////////////////////////////////////////////////////////////////
-// if contact is a group chat
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // if contact is a group chat
-MIR_APP_DLL(bool) Contact_IsGroupChat(MCONTACT hContact, const char *szProto = nullptr);
+ MIR_APP_DLL(bool) IsGroupChat(MCONTACT hContact, const char *szProto = nullptr);
-/////////////////////////////////////////////////////////////////////////////////////////
-// gets / sets hidden status for a contact
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // gets / sets hidden status for a contact
-EXTERN_C MIR_APP_DLL(bool) Contact_IsHidden(MCONTACT hContact);
-EXTERN_C MIR_APP_DLL(void) Contact_Hide(MCONTACT hContact, bool bHidden = true);
+ MIR_APP_DLL(bool) IsHidden(MCONTACT hContact);
+ MIR_APP_DLL(void) Hide(MCONTACT hContact, bool bHidden = true);
-/////////////////////////////////////////////////////////////////////////////////////////
-// checks / adds / removes a contact from list of contacts
-// removed contacts would be physically deleted after restart
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // checks / adds / removes a contact from list of contacts
+ // removed contacts would be physically deleted after restart
-EXTERN_C MIR_APP_DLL(bool) Contact_OnList(MCONTACT hContact);
-EXTERN_C MIR_APP_DLL(void) Contact_PutOnList(MCONTACT hContact);
-EXTERN_C MIR_APP_DLL(void) Contact_RemoveFromList(MCONTACT hContact);
+ MIR_APP_DLL(bool) OnList(MCONTACT hContact);
+ MIR_APP_DLL(void) PutOnList(MCONTACT hContact);
+ MIR_APP_DLL(void) RemoveFromList(MCONTACT hContact);
-/////////////////////////////////////////////////////////////////////////////////////////
-// Add contact's dialog
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // Add contact's dialog
-// passing hWnd == NULL will result in a dialog that is created modeless
+ // passing hWnd == NULL will result in a dialog that is created modeless
-EXTERN_C MIR_APP_DLL(void) Contact_Add(MCONTACT hContact, MWindow hwndParent = nullptr);
-EXTERN_C MIR_APP_DLL(void) Contact_AddByEvent(MEVENT hEvent, MWindow hwndParent = nullptr);
-EXTERN_C MIR_APP_DLL(void) Contact_AddBySearch(const char *szProto, struct PROTOSEARCHRESULT *psr, MWindow hwndParent = nullptr);
+ MIR_APP_DLL(void) Add(MCONTACT hContact, MWindow hwndParent = nullptr);
+ MIR_APP_DLL(void) AddByEvent(MEVENT hEvent, MWindow hwndParent = nullptr);
+ MIR_APP_DLL(void) AddBySearch(const char *szProto, struct PROTOSEARCHRESULT *psr, MWindow hwndParent = nullptr);
+};
#endif // M_CONTACTS_H__
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 83e529c018..72ff0b649e 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 53b351d577..1e4d5a2747 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 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];
diff --git a/protocols/CloudFile/src/utils.cpp b/protocols/CloudFile/src/utils.cpp
index 76d11dada8..bbdc7a8a46 100644
--- a/protocols/CloudFile/src/utils.cpp
+++ b/protocols/CloudFile/src/utils.cpp
@@ -56,7 +56,7 @@ bool CanSendToContact(MCONTACT hContact)
if (!isProtoOnline)
return false;
- bool isContactOnline = Contact_GetStatus(hContact) > ID_STATUS_OFFLINE;
+ bool isContactOnline = Contact::GetStatus(hContact) > ID_STATUS_OFFLINE;
if (isContactOnline)
return true;
@@ -66,7 +66,7 @@ bool CanSendToContact(MCONTACT hContact)
void SendToContact(MCONTACT hContact, const wchar_t *data)
{
const char *szProto = Proto_GetBaseAccountName(hContact);
- if (Contact_IsGroupChat(hContact, szProto)) {
+ if (Contact::IsGroupChat(hContact, szProto)) {
ptrW tszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID"));
Chat_SendUserMessage(szProto, tszChatRoom, data);
return;
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp
index 28a1b735c6..fe075aab59 100644
--- a/protocols/Dummy/src/dummy_proto.cpp
+++ b/protocols/Dummy/src/dummy_proto.cpp
@@ -174,12 +174,12 @@ MCONTACT CDummyProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
Proto_AddToContact(hContact, m_szModuleName);
if (flags & PALF_TEMPORARY) {
- Contact_Hide(hContact);
- Contact_RemoveFromList(hContact);
+ Contact::Hide(hContact);
+ Contact::RemoveFromList(hContact);
}
- else if (!Contact_OnList(hContact)) {
- Contact_Hide(hContact, false);
- Contact_PutOnList(hContact);
+ else if (!Contact::OnList(hContact)) {
+ Contact::Hide(hContact, false);
+ Contact::PutOnList(hContact);
}
setWString(hContact, _T2A(uniqueIdSetting), psr->id.w);
setWString(hContact, "Nick", psr->id.w);
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp
index f04313ad9e..84dd998b60 100644
--- a/protocols/EmLanProto/src/mlan.cpp
+++ b/protocols/EmLanProto/src/mlan.cpp
@@ -183,9 +183,9 @@ MCONTACT CMLan::FindContact(in_addr addr, const char *nick, bool add_to_list, bo
u_long caddr = g_plugin.getDword(res, "ipaddr", -1);
if (caddr == addr.S_un.S_addr) {
if (make_permanent)
- Contact_PutOnList(res);
+ Contact::PutOnList(res);
if (make_visible)
- Contact_Hide(res, false);
+ Contact::Hide(res, false);
return res;
}
}
@@ -197,9 +197,9 @@ MCONTACT CMLan::FindContact(in_addr addr, const char *nick, bool add_to_list, bo
g_plugin.setString(res, "Nick", nick);
if (!make_permanent)
- Contact_RemoveFromList(res);
+ Contact::RemoveFromList(res);
if (!make_visible)
- Contact_Hide(res);
+ Contact::Hide(res);
g_plugin.setWord(res, "Status", status);
return res;
@@ -318,7 +318,7 @@ void CMLan::OnRecvPacket(u_char *mes, int len, in_addr from)
void CMLan::RecvMessageUrl(CCSDATA *ccs)
{
- Contact_Hide(ccs->hContact, false);
+ Contact::Hide(ccs->hContact, false);
PROTORECVEVENT *pre = (PROTORECVEVENT*)ccs->lParam;
ptrA szMessage(mir_utf8encode(pre->szMessage));
@@ -902,7 +902,7 @@ void CMLan::RecvFile(CCSDATA *ccs)
{
PROTORECVEVENT *pre = (PROTORECVEVENT *)ccs->lParam;
- Contact_Hide(ccs->hContact, false);
+ Contact::Hide(ccs->hContact, false);
char *szFile = pre->szMessage + sizeof(uint32_t);
char *szDesc = szFile + mir_strlen(szFile) + 1;
diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp
index 5b0a15ee13..b35cc5461a 100644
--- a/protocols/Facebook/src/server.cpp
+++ b/protocols/Facebook/src/server.cpp
@@ -101,7 +101,7 @@ FacebookUser* FacebookProto::AddContact(const CMStringW &wszId, bool bTemp)
Proto_AddToContact(hContact, m_szModuleName);
Clist_SetGroup(hContact, m_wszDefaultGroup);
if (bTemp)
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
return FindUser(_wtoi64(wszId));
}
@@ -180,7 +180,7 @@ int FacebookProto::RefreshContacts()
pUser = AddContact(wszId, false);
}
else if (!bIsFriend)
- Contact_RemoveFromList(pUser->hContact); // adios!
+ Contact::RemoveFromList(pUser->hContact); // adios!
hContact = pUser->hContact;
}
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index 893eea0805..920a6e2877 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1317,7 +1317,7 @@ int GaduProto::dbsettingchanged(WPARAM hContact, LPARAM lParam)
// If not on list changed
if (!strcmp(cws->szSetting, "NotOnList"))
{
- if (Contact_IsHidden(hContact))
+ if (Contact::IsHidden(hContact))
return 0;
// Notify user normally this time if added to the list permanently
@@ -1367,7 +1367,7 @@ void GaduProto::notifyuser(MCONTACT hContact, int refresh)
{
// Check if user should be invisible
// Or be blocked ?
- if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact_OnList(hContact))
+ if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact::OnList(hContact))
{
gg_EnterCriticalSection(&sess_mutex, "notifyuser", 77, "sess_mutex", 1);
if (refresh) {
@@ -1422,7 +1422,7 @@ void GaduProto::notifyall()
int cc = 0;
for (auto &hContact : AccContacts()) {
if (uins[cc] = getDword(hContact, GG_KEY_UIN, 0)) {
- if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact_OnList(hContact))
+ if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact::OnList(hContact))
types[cc] = GG_USER_OFFLINE;
else if (getByte(hContact, GG_KEY_BLOCK, 0))
types[cc] = GG_USER_BLOCKED;
@@ -1458,8 +1458,8 @@ MCONTACT GaduProto::getcontact(uin_t uin, int create, int inlist, wchar_t *szNic
for (auto &hContact : AccContacts()) {
if ((uin_t)getDword(hContact, GG_KEY_UIN, 0) == uin && !isChatRoom(hContact)) {
if (inlist) {
- Contact_PutOnList(hContact);
- Contact_Hide(hContact, false);
+ Contact::PutOnList(hContact);
+ Contact::Hide(hContact, false);
}
return hContact;
}
@@ -1472,7 +1472,7 @@ MCONTACT GaduProto::getcontact(uin_t uin, int create, int inlist, wchar_t *szNic
debugLogA("getcontact(): Added buddy: %d", uin);
if (!inlist)
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
setDword(hContact, GG_KEY_UIN, (uint32_t)uin);
setWord(hContact, GG_KEY_STATUS, ID_STATUS_OFFLINE);
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index eb72b39041..0a3361d47a 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -217,7 +217,7 @@ static int gg_prebuildcontactmenu(WPARAM hContact, LPARAM)
if (gg == nullptr)
return 0;
- if (gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) || gg->isChatRoom(hContact) || !Contact_OnList(hContact))
+ if (gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) || gg->isChatRoom(hContact) || !Contact::OnList(hContact))
Menu_ShowItem(gg->hBlockMenuItem, false);
else
Menu_ModifyItem(gg->hBlockMenuItem, gg->getByte(hContact, GG_KEY_BLOCK, 0) ? LPGENW("&Unblock") : LPGENW("&Block"));
diff --git a/protocols/ICQ-WIM/src/groupchats.cpp b/protocols/ICQ-WIM/src/groupchats.cpp
index 82ce93f631..e92811baa1 100644
--- a/protocols/ICQ-WIM/src/groupchats.cpp
+++ b/protocols/ICQ-WIM/src/groupchats.cpp
@@ -251,7 +251,7 @@ void CIcqProto::Chat_SendPrivateMessage(GCHOOK *gch)
if (pCache == nullptr) {
hContact = CreateContact(gch->ptszUID, true);
setWString(hContact, "Nick", gch->ptszNick);
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
else hContact = pCache->m_hContact;
diff --git a/protocols/ICQ-WIM/src/ignore.cpp b/protocols/ICQ-WIM/src/ignore.cpp
index 69c36ab244..d2d6dfb36a 100644
--- a/protocols/ICQ-WIM/src/ignore.cpp
+++ b/protocols/ICQ-WIM/src/ignore.cpp
@@ -55,7 +55,7 @@ void CIcqProto::ProcessPermissions(const JSONNode &ev)
p = FindContactByUIN(wszId);
}
p->m_iApparentMode = ID_STATUS_OFFLINE;
- Contact_Hide(p->m_hContact);
+ Contact::Hide(p->m_hContact);
m_bIgnoreListEmpty = false;
}
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp
index d61c231344..47cbc75890 100644
--- a/protocols/ICQ-WIM/src/poll.cpp
+++ b/protocols/ICQ-WIM/src/poll.cpp
@@ -71,7 +71,7 @@ void CIcqProto::ProcessBuddyList(const JSONNode &ev)
for (auto &it : m_arCache)
if (!it->m_bInList && !getBool(it->m_hContact, "IcqDeleted"))
- Contact_RemoveFromList(it->m_hContact);
+ Contact::RemoveFromList(it->m_hContact);
RetrieveUserInfo();
}
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index c02628be4a..8ebfd4a337 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -362,7 +362,7 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact, boo
if (buddy["deleted"].as_bool()) {
setByte(hContact, "IcqDeleted", 1);
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
}
Json2string(hContact, buddy, "emailId", "Email", bIsPartial);
@@ -775,11 +775,11 @@ void CIcqProto::OnAddBuddy(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq)
Popup.iSeconds = 20;
PUAddPopupW(&Popup);
- // Contact_RemoveFromList(pReq->hContact);
+ // Contact::RemoveFromList(pReq->hContact);
}
RetrieveUserInfo(pReq->hContact);
- Contact_PutOnList(pReq->hContact);
+ Contact::PutOnList(pReq->hContact);
}
}
diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp
index c78cbd6972..58d57778a3 100644
--- a/protocols/ICQ-WIM/src/utils.cpp
+++ b/protocols/ICQ-WIM/src/utils.cpp
@@ -100,7 +100,7 @@ MCONTACT CIcqProto::CreateContact(const CMStringW &wszId, bool bTemporary)
RetrieveUserInfo(hContact);
if (bTemporary)
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
return hContact;
}
@@ -137,7 +137,7 @@ void CIcqProto::Json2string(MCONTACT hContact, const JSONNode &node, const char
CMStringW wszStr(var.as_mstring());
if (wszStr == L"[deleted]") {
setByte(hContact, "IcqDeleted", 1);
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
}
else setWString(hContact, szSetting, wszStr);
}
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp
index 8de3587c82..bdbf79bce3 100644
--- a/protocols/ICQCorp/src/protocol.cpp
+++ b/protocols/ICQCorp/src/protocol.cpp
@@ -1256,8 +1256,8 @@ ICQUser* ICQ::addUser(unsigned int uin, bool persistent)
u = icqUsers[i];
if (u->dwUIN == uin) {
if (persistent) {
- Contact_PutOnList(u->hContact);
- Contact_Hide(u->hContact, false);
+ Contact::PutOnList(u->hContact);
+ Contact::Hide(u->hContact, false);
}
return u;
}
@@ -1274,8 +1274,8 @@ ICQUser* ICQ::addUser(unsigned int uin, bool persistent)
if (persistent)
getUserInfo(u, true);
else {
- Contact_RemoveFromList(u->hContact);
- Contact_Hide(u->hContact);
+ Contact::RemoveFromList(u->hContact);
+ Contact::Hide(u->hContact);
}
updateContactList();
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp
index 2b1ae872c4..07301b8e7a 100644
--- a/protocols/ICQCorp/src/services.cpp
+++ b/protocols/ICQCorp/src/services.cpp
@@ -189,7 +189,7 @@ static INT_PTR icqRecvMessage(WPARAM, LPARAM lParam)
Netlib_Logf(hNetlibUser, "[ ] receive message\n");
CCSDATA *ccs = (CCSDATA*)lParam;
- Contact_Hide(ccs->hContact, false);
+ Contact::Hide(ccs->hContact, false);
PROTORECVEVENT *pre = (PROTORECVEVENT*)ccs->lParam;
ptrA szMsg(mir_utf8encode(pre->szMessage));
@@ -362,7 +362,7 @@ static INT_PTR icqRecvFile(WPARAM, LPARAM lParam)
Netlib_Logf(hNetlibUser, "[ ] receive file\n");
CCSDATA *ccs = (CCSDATA *)lParam;
- Contact_Hide(ccs->hContact, false);
+ Contact::Hide(ccs->hContact, false);
PROTORECVEVENT *pre = (PROTORECVEVENT *)ccs->lParam;
char *szFile = pre->szMessage + sizeof(uint32_t);
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp
index 5164ea6ffa..c3f24b5dfd 100644
--- a/protocols/IRCG/src/clist.cpp
+++ b/protocols/IRCG/src/clist.cpp
@@ -31,7 +31,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMStringW& name, const CMStringW& hostmas
CONTACT usertemp = { name, nullptr, nullptr, false, false, true };
MCONTACT hc = CList_FindContact(&usertemp);
- if (hc && Contact_OnList(hc) && !Contact_IsHidden(hc))
+ if (hc && Contact::OnList(hc) && !Contact::IsHidden(hc))
bFlag = true;
CMStringW contactname = name; contactname += DCCSTRING;
@@ -88,9 +88,9 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
MCONTACT hContact = CList_FindContact(user);
if (hContact) {
if (InList)
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
setWString(hContact, "Nick", user->name);
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
if (SetOnline && getWord(hContact, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
setWord(hContact, "Status", ID_STATUS_ONLINE);
return hContact;
@@ -102,10 +102,10 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
Proto_AddToContact(hContact, m_szModuleName);
if (InList)
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
else
- Contact_RemoveFromList(hContact);
- Contact_Hide(hContact, false);
+ Contact::RemoveFromList(hContact);
+ Contact::Hide(hContact, false);
setWString(hContact, "Nick", user->name);
setWString(hContact, "Default", user->name);
setWord(hContact, "Status", SetOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE);
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index c9014b413f..ab9a7e646f 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -146,7 +146,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD)
continue;
uint8_t bDCC = ppro->getByte(hContact, "DCC", 0);
- bool bHidden = Contact_IsHidden(hContact);
+ bool bHidden = Contact::IsHidden(hContact);
if (bDCC || bHidden)
continue;
if (ppro->getWString(hContact, "Default", &dbv))
@@ -682,7 +682,7 @@ bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage *pmsg)
if ((m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'q'))) {
MCONTACT hContact = CList_FindContact(&user);
- if (!hContact || (hContact && Contact_IsHidden(hContact)))
+ if (!hContact || (hContact && Contact::IsHidden(hContact)))
return true;
}
@@ -1051,7 +1051,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage *pmsg)
MCONTACT hContact = CList_FindContact(&user);
// check if it should be ignored
- if (m_DCCChatIgnore == 1 || m_DCCChatIgnore == 2 && hContact && Contact_OnList(hContact) && !Contact_IsHidden(hContact)) {
+ if (m_DCCChatIgnore == 1 || m_DCCChatIgnore == 2 && hContact && Contact::OnList(hContact) && !Contact::IsHidden(hContact)) {
CMStringW host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
CList_AddDCCChat(pmsg->prefix.sNick, host, dwAdr, iPort); // add a CHAT event to the clist
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index af047b0530..0564c7d538 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -671,7 +671,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam)
psr.flags = PSR_UNICODE;
psr.id.w = gch->ptszUID;
psr.nick.w = gch->ptszUID;
- Contact_AddBySearch(m_szModuleName, &psr);
+ Contact::AddBySearch(m_szModuleName, &psr);
}
break;
case 31: //slap
@@ -778,7 +778,7 @@ int __cdecl CIrcProto::GCMenuHook(WPARAM, LPARAM lParam)
CONTACT user = { (wchar_t*)gcmi->pszUID, nullptr, nullptr, false, false, false };
MCONTACT hContact = CList_FindContact(&user);
- BOOL bIsInList = hContact && Contact_OnList(hContact);
+ BOOL bIsInList = hContact && Contact::OnList(hContact);
nickItems[_countof(nickItems)-1].bDisabled = bIsInList;
unsigned long ulAdr = 0;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 839c019d94..c4bd6bb3d6 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -317,7 +317,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, const TiXmlElement *
else
Chat_Control(m_szModuleName, wszRoomJid, SESSION_OFFLINE);
- Contact_Hide(item->hContact, false);
+ Contact::Hide(item->hContact, false);
item->si = nullptr;
item->bChatLogging = false;
@@ -1158,7 +1158,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK*
if (auto *tmp = wcschr(psr.id.w, '/'))
*tmp = 0;
psr.nick.w = psr.id.w;
- Contact_AddBySearch(ppro->m_szModuleName, &psr, g_clistApi.hwndContactList);
+ Contact::AddBySearch(ppro->m_szModuleName, &psr, g_clistApi.hwndContactList);
}
break;
}
@@ -1301,7 +1301,7 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co
if (r)
ppro->setWord(hContact, "Status", r->m_iStatus);
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
ppro->setUString(hContact, "Nick", nick);
db_set_dw(hContact, "Ignore", "Mask1", 0);
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index e7b68a9d64..7ec1988e6a 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -1167,7 +1167,7 @@ public:
case SD_ACT_ROSTER:
{
MCONTACT hContact = m_proto->DBCreateContact(pNode->GetJid(), pNode->GetName(), false, false);
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
JABBER_LIST_ITEM *item = m_proto->ListAdd(LIST_VCARD_TEMP, pNode->GetJid(), hContact);
item->bUseResource = true;
}
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index 3dc078fa8d..043c438c95 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -154,7 +154,7 @@ void __cdecl CJabberProto::OnAddContactForever(MCONTACT hContact)
SendGetVcard(hContact);
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
}
int __cdecl CJabberProto::OnDbMarkedRead(WPARAM, LPARAM hDbEvent)
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index 7a90d3a683..d73785b9f5 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -250,7 +250,7 @@ bool CJabberProto::OnRosterPushRequest(const TiXmlElement*, CJabberIqInfo *pInfo
UpdateSubscriptionInfo(item->hContact, item);
}
else if (isChatRoom(item->hContact))
- Contact_Hide(item->hContact, false);
+ Contact::Hide(item->hContact, false);
else
UpdateSubscriptionInfo(item->hContact, item);
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index cc2d4883d0..db8652dfd4 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -501,7 +501,7 @@ void CJabberProto::OnIqResultGetRoster(const TiXmlElement *iqNode, CJabberIqInfo
*p = 0;
Chat_NewSession(GCW_CHATROOM, m_szModuleName, Utf2T(jid), Utf2T(szTitle));
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
chatRooms.insert((HANDLE)hContact);
}
else UpdateSubscriptionInfo(hContact, item);
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 0e1ce56479..88a6909eca 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -48,7 +48,7 @@ void CJabberProto::AddContactToRoster(const char *jid, const char *nick, const c
void CJabberProto::DBAddAuthRequest(const char *jid, const char *nick)
{
MCONTACT hContact = DBCreateContact(jid, nick, true, true);
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
DB::AUTH_BLOB blob(hContact, nick, nullptr, nullptr, jid, nullptr);
@@ -89,7 +89,7 @@ MCONTACT CJabberProto::DBCreateContact(const char *jid, const char *nick, bool t
setUString(hNewContact, "Nick", ptrA(JabberNickFromJID(szJid)));
if (temporary)
- Contact_RemoveFromList(hNewContact);
+ Contact::RemoveFromList(hNewContact);
else
SendGetVcard(hNewContact);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index d11ab271d6..946ae533f4 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -366,7 +366,7 @@ MCONTACT CJabberProto::AddToListByJID(const char *newJid, uint32_t flags)
MCONTACT hContact = DBCreateContact(newJid, nullptr, true, false);
if (flags & PALF_TEMPORARY)
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
return hContact;
}
@@ -426,7 +426,7 @@ int CJabberProto::Authorize(MEVENT hDbEvent)
if (MCONTACT hContact = AddToListByJID(blob.get_email(), 0)) {
// Trigger actual add by removing the "NotOnList" added by AddToListByJID()
// See AddToListByJID() and JabberDbSettingChanged().
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
}
}
}
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index e831e22af8..63fbd74e8b 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -442,7 +442,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam)
psr.flags = PSR_UNICODE;
psr.nick.w = szJid;
psr.id.w = szJid;
- Contact_AddBySearch(m_szModuleName, &psr);
+ Contact::AddBySearch(m_szModuleName, &psr);
}
return 0;
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 4308c04e18..cedb5ed81b 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1671,7 +1671,7 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info)
ListRemoveResource(LIST_ROSTER, from);
hContact = HContactFromJID(from);
- if (hContact && !Contact_OnList(hContact)) {
+ if (hContact && !Contact::OnList(hContact)) {
// remove selfcontact, if where is no more another resources
if (item->arResources.getCount() == 1 && ResourceInfoFromJID(info->fullJID))
ListRemoveResource(LIST_ROSTER, info->fullJID);
@@ -1721,7 +1721,7 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info)
if (item)
item->hContact = hContact;
setUString(hContact, "Nick", szNick);
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
}
}
}
diff --git a/protocols/NewsAggregator/Src/Options.cpp b/protocols/NewsAggregator/Src/Options.cpp
index 2dfcadf7da..18fff38fbe 100644
--- a/protocols/NewsAggregator/Src/Options.cpp
+++ b/protocols/NewsAggregator/Src/Options.cpp
@@ -879,9 +879,9 @@ bool COptionsMain::OnApply()
if (mir_wstrcmp(dbNick, nick) == 0) {
g_plugin.setByte(hContact, "CheckState", m_feeds.GetCheckState(i));
if (!m_feeds.GetCheckState(i))
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
else
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
}
}
}
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp
index 3dae386909..27c490c388 100644
--- a/protocols/Sametime/src/conference.cpp
+++ b/protocols/Sametime/src/conference.cpp
@@ -318,7 +318,7 @@ int CSametimeProto::GcEventHook(WPARAM, LPARAM lParam) {
int CSametimeProto::ChatDeleted(MCONTACT hContact) {
- if (!Contact_IsGroupChat(hContact, m_szModuleName))
+ if (!Contact::IsGroupChat(hContact, m_szModuleName))
return 0;
debugLogW(L"CSametimeProto::ChatDeleted() hContact=[%x]", hContact);
@@ -379,7 +379,7 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM)
MCONTACT hContact = (MCONTACT)wParam;
debugLogW(L"CSametimeProto::PrebuildContactMenu() hContact=[%x]", hContact);
- Menu_ShowItem(hLeaveChatMenuItem, Contact_IsGroupChat(hContact, m_szModuleName));
+ Menu_ShowItem(hLeaveChatMenuItem, Contact::IsGroupChat(hContact, m_szModuleName));
// if user is already in our meeting,
bool not_present = true;
@@ -400,7 +400,7 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM)
db_free(&dbv);
}
- Menu_ShowItem(hCreateChatMenuItem, !Contact_IsGroupChat(hContact, m_szModuleName) && not_present);
+ Menu_ShowItem(hCreateChatMenuItem, !Contact::IsGroupChat(hContact, m_szModuleName) && not_present);
return 0;
}
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index 35ab74786b..5bf1ebdd9f 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -103,7 +103,7 @@ int CSametimeProto::OnWindowEvent(WPARAM, LPARAM lParam)
{
MessageWindowEventData *mwed = (MessageWindowEventData*)lParam;
- if ((mwed == nullptr) || Contact_IsGroupChat(mwed->hContact, m_szModuleName))
+ if ((mwed == nullptr) || Contact::IsGroupChat(mwed->hContact, m_szModuleName))
return 0;
if ((mwed->uType == MSG_WINDOW_EVT_CLOSING) || (mwed->uType == MSG_WINDOW_EVT_CLOSE))
@@ -140,7 +140,7 @@ void CSametimeProto::SetAllOffline()
debugLogW(L"SetAllOffline() start");
for (auto &hContact : AccContacts()) {
- if (Contact_IsGroupChat(hContact, m_szModuleName)) {
+ if (Contact::IsGroupChat(hContact, m_szModuleName)) {
db_delete_contact(hContact);
continue;
}
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp
index 02e3dd717f..ab4fb15f29 100644
--- a/protocols/Sametime/src/sametime_proto.cpp
+++ b/protocols/Sametime/src/sametime_proto.cpp
@@ -129,7 +129,7 @@ int CSametimeProto::GetInfo(MCONTACT hContact, int infoType)
// GetInfo - retrieves a contact info
debugLogW(L"CSametimeProto::GetInfo() hContact=[%x], infoType=[%d]", hContact, infoType);
- if (Contact_IsGroupChat(hContact))
+ if (Contact::IsGroupChat(hContact))
return 1;
if (!session)
@@ -167,8 +167,8 @@ int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILE* pre)
{
debugLogW(L"CSametimeProto::RecvFile() hContact=[%x]", hContact);
- Contact_Hide(hContact, false);
- Contact_PutOnList(hContact);
+ Contact::Hide(hContact, false);
+ Contact::PutOnList(hContact);
return CSuper::RecvFile(hContact, pre);
}
@@ -177,8 +177,8 @@ MEVENT CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
debugLogW(L"CSametimeProto::RecvMsg() hContact=[%x]", hContact);
- Contact_Hide(hContact, false);
- Contact_PutOnList(hContact);
+ Contact::Hide(hContact, false);
+ Contact::PutOnList(hContact);
return CSuper::RecvMsg(hContact, pre);
}
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp
index d01f047cc6..11ff040c7f 100644
--- a/protocols/Sametime/src/session_announce_win.cpp
+++ b/protocols/Sametime/src/session_announce_win.cpp
@@ -41,7 +41,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
lvI.iSubItem = 0;
for (auto &hContact : proto->AccContacts()) {
- if (!Contact_IsGroupChat(hContact, proto->m_szModuleName)
+ if (!Contact::IsGroupChat(hContact, proto->m_szModuleName)
&& db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
lvI.lParam = (LPARAM)hContact;
lvI.pszText = Clist_GetContactDisplayName(hContact);
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp
index ccc5d46a3c..1bc5102fff 100644
--- a/protocols/Sametime/src/userlist.cpp
+++ b/protocols/Sametime/src/userlist.cpp
@@ -69,8 +69,8 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
new_contact = true;
}
else if (!temporary) {
- Contact_PutOnList(hContact);
- Contact_Hide(hContact, false);
+ Contact::PutOnList(hContact);
+ Contact::Hide(hContact, false);
}
@@ -104,12 +104,12 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
}
if (temporary) {
- Contact_RemoveFromList(hContact);
- Contact_Hide(hContact);
+ Contact::RemoveFromList(hContact);
+ Contact::Hide(hContact);
}
else {
- Contact_PutOnList(hContact);
- Contact_Hide(hContact, false);
+ Contact::PutOnList(hContact);
+ Contact::Hide(hContact, false);
}
return hContact;
@@ -373,7 +373,7 @@ int CSametimeProto::ContactDeleted(MCONTACT hContact)
{
mwAwareIdBlock id_block;
- if (Contact_IsGroupChat(hContact, m_szModuleName))
+ if (Contact::IsGroupChat(hContact, m_szModuleName))
return 0;
debugLogW(L"CSametimeProto::ContactDeleted()");
@@ -586,7 +586,7 @@ void CSametimeProto::UserListCreate()
GList *gl = nullptr;
for (auto &hContact : AccContacts()) {
- if (!Contact_IsGroupChat(hContact, m_szModuleName) /*&& proto && !mir_strcmp( PROTO, proto)*/) {
+ if (!Contact::IsGroupChat(hContact, m_szModuleName) /*&& proto && !mir_strcmp( PROTO, proto)*/) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal) {
if (GetAwareIdFromContact(hContact, &id_block)) {
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 4cf3729e77..3087321ea2 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -127,7 +127,7 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
if (hContact == NULL) {
hContact = AddContact(user_id, T2Utf(gch->ptszNick), true);
setWord(hContact, "Status", ID_STATUS_ONLINE);
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
}
CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
}
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index 87e6ddb778..cd1a2a13a1 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -96,7 +96,7 @@ MCONTACT CSkypeProto::AddContact(const char *skypeId, const char *nick, bool isT
setByte(hContact, "Grant", 1);
if (isTemporary)
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
return hContact;
}
@@ -258,7 +258,7 @@ void CSkypeProto::OnBlockContact(NETLIBHTTPREQUEST *response, AsyncHttpRequest *
{
MCONTACT hContact = (DWORD_PTR)pRequest->pUserInfo;
if (response != nullptr)
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
}
INT_PTR CSkypeProto::UnblockContact(WPARAM hContact, LPARAM)
@@ -273,6 +273,6 @@ void CSkypeProto::OnUnblockContact(NETLIBHTTPREQUEST *response, AsyncHttpRequest
return;
MCONTACT hContact = (DWORD_PTR)pRequest->pUserInfo;
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
delSetting(hContact, "IsBlocked");
}
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index a6d51aa085..903309054b 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -625,7 +625,7 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam)
psr.id.w = mir_wstrdup(szJid);
psr.nick.w = mir_wstrdup(szJid);
psr.flags = PSR_UNICODE;
- Contact_AddBySearch(m_szModuleName, &psr);
+ Contact::AddBySearch(m_szModuleName, &psr);
}
return 0;
}
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 2793d61482..aad1284484 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -244,7 +244,7 @@ void CSteamProto::ContactIsFriend(MCONTACT hContact)
delSetting(hContact, "AuthAsked");
delSetting(hContact, "Auth");
delSetting(hContact, "Grant");
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
// Check if this contact was removed someday and if so, notify he's back
if (getDword(hContact, "DeletedTS", 0) && !getByte(hContact, "Auth", 0)) {
@@ -340,7 +340,7 @@ MCONTACT CSteamProto::AddContact(const char *steamId, const wchar_t *nick, bool
if (isTemporary) {
debugLogA("Contact %d added as a temporary one");
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
}
setByte(hContact, "Auth", 1);
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index e4c3f36bb6..a31a3c47c8 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -98,7 +98,7 @@ MCONTACT CToxProto::AddContact(const char *address, const wchar_t *nick, const w
setByte(hContact, "Grant", 1);
}
else
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
return hContact;
}
@@ -167,7 +167,7 @@ INT_PTR CToxProto::OnRequestAuth(WPARAM hContact, LPARAM lParam)
return addFriendResult;
}
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
delSetting(hContact, "Grant");
/*uint8_t nick[TOX_MAX_NAME_LENGTH] = { 0 };
@@ -193,7 +193,7 @@ INT_PTR CToxProto::OnGrantAuth(WPARAM hContact, LPARAM)
return error;
}
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
delSetting(hContact, "Grant");
SaveToxProfile(m_tox);
diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp
index fd06bc0421..0748c0be8f 100644
--- a/protocols/Tox/src/tox_search.cpp
+++ b/protocols/Tox/src/tox_search.cpp
@@ -91,7 +91,7 @@ HWND CToxProto::OnSearchAdvanced(HWND owner)
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_UTF8;
psr.id.a = mir_strdup(query.c_str());
- Contact_AddBySearch(m_szModuleName, &psr, owner);
+ Contact::AddBySearch(m_szModuleName, &psr, owner);
ProtoBroadcastAsync(NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)1);
}
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp
index b6892e7114..b4840ddf97 100644
--- a/protocols/Tox/src/tox_utils.cpp
+++ b/protocols/Tox/src/tox_utils.cpp
@@ -163,6 +163,6 @@ INT_PTR CToxProto::ParseToxUri(WPARAM, LPARAM lParam)
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_UTF8;
psr.id.a = mir_u2a(&uri[4]);
- Contact_AddBySearch(proto->m_szModuleName, &psr);
+ Contact::AddBySearch(proto->m_szModuleName, &psr);
return 0;
}
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index b758fac9e3..78a7e9be4f 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -576,7 +576,7 @@ void CTwitterProto::UpdateMessages(bool pre_read)
MCONTACT hContact = FindContactById(sender.c_str());
if (hContact == INVALID_CONTACT_ID) {
hContact = AddToClientList(sender.c_str(), "");
- Contact_RemoveFromList(hContact);
+ Contact::RemoveFromList(hContact);
}
std::string text = msgCreate["message_data"]["text"].as_string();
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index 6a75e1706b..2a15a4bd48 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -211,7 +211,7 @@ bool CTwitterProto::IsMyContact(MCONTACT hContact, bool include_chat)
MCONTACT CTwitterProto::UsernameToHContact(const char *name)
{
for (auto &hContact : AccContacts()) {
- if (Contact_IsGroupChat(hContact))
+ if (Contact::IsGroupChat(hContact))
continue;
if (getMStringA(hContact, TWITTER_KEY_UN) == name)
@@ -224,7 +224,7 @@ MCONTACT CTwitterProto::UsernameToHContact(const char *name)
MCONTACT CTwitterProto::FindContactById(const char *id)
{
for (auto &hContact : AccContacts()) {
- if (Contact_IsGroupChat(hContact))
+ if (Contact::IsGroupChat(hContact))
continue;
if (getMStringA(hContact, TWITTER_KEY_ID) == id)
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 093a4b0ed1..1a8e3999f1 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -1698,7 +1698,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType)
hContact, wszType.c_str(),
(int)m_vkOptions.bShowVkDeactivateEvents,
(int)getBool(hContact, "ShowVkDeactivateEvents", true),
- (int)(!Contact_IsHidden(hContact)));
+ (int)(!Contact::IsHidden(hContact)));
CVKDeactivateEvent vkDeactivateEvent[] = {
{ L"", Translate("User restored control over own page") },
@@ -1727,7 +1727,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType)
(
m_vkOptions.bShowVkDeactivateEvents
&& getBool(hContact, "ShowVkDeactivateEvents", true)
- && (!Contact_IsHidden(hContact))
+ && (!Contact::IsHidden(hContact))
) ? 0 : DBEF_READ);
db_event_add(hContact, &dbei);
}
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 40fea6ad5d..7811a75114 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -496,8 +496,8 @@ int CVkProto::OnChatEvent(WPARAM, LPARAM lParam)
MCONTACT hContact = FindUser(_wtoi(gch->ptszUID));
if (hContact == 0) {
hContact = FindUser(_wtoi(gch->ptszUID), true);
- Contact_Hide(hContact);
- Contact_RemoveFromList(hContact);
+ Contact::Hide(hContact);
+ Contact::RemoveFromList(hContact);
db_set_dw(hContact, "Ignore", "Mask1", 0);
RetrieveUserInfo(_wtoi(gch->ptszUID));
}
@@ -745,8 +745,8 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch)
hContact = FindUser(cu->m_uid);
if (hContact == 0) {
hContact = FindUser(cu->m_uid, true);
- Contact_Hide(hContact);
- Contact_RemoveFromList(hContact);
+ Contact::Hide(hContact);
+ Contact::RemoveFromList(hContact);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
CallService(MS_USERINFO_SHOWDIALOG, hContact);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index b2eb707ab4..d361fdee6f 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -664,7 +664,7 @@ void CVkProto::OnContactDeleted(MCONTACT hContact)
ptrW pwszNick(db_get_wsa(hContact, m_szModuleName, "Nick"));
debugLogW(L"CVkProto::OnContactDeleted %s", pwszNick.get());
- if (!Contact_OnList(hContact) || getBool(hContact, "SilentDelete") || isChatRoom((MCONTACT)hContact))
+ if (!Contact::OnList(hContact) || getBool(hContact, "SilentDelete") || isChatRoom((MCONTACT)hContact))
return;
LONG userID = getDword(hContact, "ID", VK_INVALID_USER);
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index afb94ac097..ccf9a4a7eb 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -430,8 +430,8 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, VKContactTy
return 0;
if (vkContactType == VKContactType::vkContactMUCUser) {
- Contact_Hide(hContact);
- Contact_RemoveFromList(hContact);
+ Contact::Hide(hContact);
+ Contact::RemoveFromList(hContact);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
diff --git a/protocols/Weather/src/weather_addstn.cpp b/protocols/Weather/src/weather_addstn.cpp
index 15b4f6e25a..24e6052b11 100644
--- a/protocols/Weather/src/weather_addstn.cpp
+++ b/protocols/Weather/src/weather_addstn.cpp
@@ -48,9 +48,9 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
if (!mir_wstrcmpi(psr->email.w, dbv.pwszVal)) {
// remove the flag for not on list and hidden, thus make the contact visible
// and add them on the list
- if (!Contact_OnList(hContact)) {
- Contact_PutOnList(hContact);
- Contact_Hide(hContact, false);
+ if (!Contact::OnList(hContact)) {
+ Contact::PutOnList(hContact);
+ Contact::Hide(hContact, false);
}
db_free(&dbv);
// contact is added, function quitting
diff --git a/protocols/Weather/src/weather_mwin.cpp b/protocols/Weather/src/weather_mwin.cpp
index 0ef9991cff..da08be4ce1 100644
--- a/protocols/Weather/src/weather_mwin.cpp
+++ b/protocols/Weather/src/weather_mwin.cpp
@@ -243,7 +243,7 @@ static void addWindow(MCONTACT hContact)
int frameID = g_plugin.addFrame(&Frame);
g_plugin.setDword(hContact, "mwin", frameID);
- Contact_Hide(hContact);
+ Contact::Hide(hContact);
}
void removeWindow(MCONTACT hContact)
@@ -254,7 +254,7 @@ void removeWindow(MCONTACT hContact)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
g_plugin.setDword(hContact, "mwin", 0);
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
}
void UpdateMwinData(MCONTACT hContact)
diff --git a/protocols/WebView/src/webview_services.cpp b/protocols/WebView/src/webview_services.cpp
index a7cd69441f..2eef900ee9 100644
--- a/protocols/WebView/src/webview_services.cpp
+++ b/protocols/WebView/src/webview_services.cpp
@@ -351,9 +351,9 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
// contact visible
// and add them on the list
sameurl++;
- if (!Contact_OnList(hContact)) {
- Contact_PutOnList(hContact);
- Contact_Hide(hContact, false);
+ if (!Contact::OnList(hContact)) {
+ Contact::PutOnList(hContact);
+ Contact::Hide(hContact, false);
}
}
db_free(&dbv);
@@ -402,9 +402,9 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
// contact visible
// and add them on the list
samename++;
- if (!Contact_OnList(hContact2)) {
- Contact_PutOnList(hContact2);
- Contact_Hide(hContact2, false);
+ if (!Contact::OnList(hContact2)) {
+ Contact::PutOnList(hContact2);
+ Contact::Hide(hContact2, false);
}
db_free(&dbv);
}
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp
index 690cad6e86..62151fb134 100644
--- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp
+++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp
@@ -289,10 +289,10 @@ int RegisterPOP3Plugin(WPARAM, LPARAM)
g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE);
db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message"));
if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT))
- Contact_Hide(Finder->hContact, false);
+ Contact::Hide(Finder->hContact, false);
if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT))
- Contact_Hide(Finder->hContact);
+ Contact::Hide(Finder->hContact);
}
db_free(&dbv);
}
diff --git a/protocols/YAMN/src/services.cpp b/protocols/YAMN/src/services.cpp
index b84acefcec..2562b58e20 100644
--- a/protocols/YAMN/src/services.cpp
+++ b/protocols/YAMN/src/services.cpp
@@ -433,7 +433,7 @@ void RefreshContact(void)
CAccount *Finder;
for (Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) {
if (Finder->hContact != NULL) {
- Contact_Hide(Finder->hContact, !(Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT));
+ Contact::Hide(Finder->hContact, !(Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT));
}
else if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) {
Finder->hContact = db_add_contact();
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp
index a2dcca0220..94f097fbe1 100644
--- a/src/core/stdaway/src/awaymsg.cpp
+++ b/src/core/stdaway/src/awaymsg.cpp
@@ -131,7 +131,7 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM)
{
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr) {
- if (!Contact_IsGroupChat(hContact, szProto)) {
+ if (!Contact::IsGroupChat(hContact, szProto)) {
int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGRECV) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(status)) {
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index 39e24e7c50..8dcb922619 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -35,11 +35,11 @@ static HGENMENU hSRFileMenuItem;
wchar_t* GetContactID(MCONTACT hContact)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (Contact_IsGroupChat(hContact, szProto))
+ if (Contact::IsGroupChat(hContact, szProto))
if (wchar_t *theValue = db_get_wsa(hContact, szProto, "ChatRoomID"))
return theValue;
- return Contact_GetInfo(CNF_UNIQUEID, hContact, szProto);
+ return Contact::GetInfo(CNF_UNIQUEID, hContact, szProto);
}
static INT_PTR SendFileCommand(WPARAM hContact, LPARAM)
@@ -101,7 +101,7 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam)
cle.hContact = hContact;
cle.hDbEvent = hdbe;
cle.lParam = lParam;
- if (g_plugin.bAutoAccept && Contact_OnList(hContact)) {
+ if (g_plugin.bAutoAccept && Contact::OnList(hContact)) {
CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_FILERECV), NULL, DlgProcRecvFile, (LPARAM)&cle);
}
else {
@@ -288,7 +288,7 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM)
bool bEnabled = false;
char *szProto = Proto_GetBaseAccountName(wParam);
if (szProto != nullptr) {
- bool isChat = Contact_IsGroupChat(wParam, szProto);
+ bool isChat = Contact::IsGroupChat(wParam, szProto);
if (CallProtoService(szProto, PS_GETCAPS, isChat ? PFLAGNUM_4 : PFLAGNUM_1, 0) & (isChat ? PF4_GROUPCHATFILES : PF1_FILESEND)) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
bEnabled = true;
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 651ae2746a..54aefe44c5 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -244,10 +244,10 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
TimeZone_PrintTimeStamp(NULL, dbei.timestamp, L"t d", datetimestr, _countof(datetimestr), 0);
SetDlgItemText(hwndDlg, IDC_DATE, datetimestr);
- ptrW info(Contact_GetInfo(CNF_UNIQUEID, dat->hContact));
+ ptrW info(Contact::GetInfo(CNF_UNIQUEID, dat->hContact));
SetDlgItemText(hwndDlg, IDC_NAME, (info) ? info : contactName);
- if (!Contact_OnList(dat->hContact)) {
+ if (!Contact::OnList(dat->hContact)) {
RECT rcBtn1, rcBtn2, rcDateCtrl;
GetWindowRect(GetDlgItem(hwndDlg, IDC_ADD), &rcBtn1);
GetWindowRect(GetDlgItem(hwndDlg, IDC_USERMENU), &rcBtn2);
@@ -258,7 +258,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
//don't check auto-min here to fix BUG#647620
PostMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDOK, BN_CLICKED), (LPARAM)GetDlgItem(hwndDlg, IDOK));
}
- if (Contact_OnList(dat->hContact))
+ if (Contact::OnList(dat->hContact))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), SW_HIDE);
}
return TRUE;
@@ -343,9 +343,9 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
break;
case IDC_ADD:
- Contact_Add(dat->hContact, hwndDlg);
+ Contact::Add(dat->hContact, hwndDlg);
- if (Contact_OnList(dat->hContact))
+ if (Contact::OnList(dat->hContact))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), SW_HIDE);
break;
diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp
index 30f6fa84b8..017725e89d 100644
--- a/src/core/stdfile/src/filesenddlg.cpp
+++ b/src/core/stdfile/src/filesenddlg.cpp
@@ -238,7 +238,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
wchar_t *contactName = Clist_GetContactDisplayName(dat->hContact);
SetDlgItemText(hwndDlg, IDC_TO, contactName);
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, dat->hContact));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, dat->hContact));
SetDlgItemText(hwndDlg, IDC_NAME, (id) ? id : contactName);
if (fsd->ppFiles == nullptr) {
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index 81f849acbb..bcd6c16c54 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -260,7 +260,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
CreateDirectoryTreeW(dat->szSavePath);
dat->fs = (HANDLE)ProtoChainSend(dat->hContact, PSS_FILEALLOW, (WPARAM)dat->fs, (LPARAM)dat->szSavePath);
dat->transferStatus.szWorkingDir.w = mir_wstrdup(dat->szSavePath);
- if (!Contact_OnList(dat->hContact))
+ if (!Contact::OnList(dat->hContact))
dat->resumeBehaviour = FILERESUME_ASK;
else
dat->resumeBehaviour = g_plugin.getByte("IfExists", FILERESUME_ASK);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 8578ea4b2b..b05f576411 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -290,7 +290,7 @@ void CMsgDialog::OnDestroy()
// a temporary contact should be destroyed after removing window from the window list to prevent recursion
if (m_hContact && g_plugin.bDeleteTempCont)
- if (!Contact_OnList(m_hContact))
+ if (!Contact::OnList(m_hContact))
db_delete_contact(m_hContact);
}
@@ -771,7 +771,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (LOWORD(wParam)) {
case IDC_USERMENU:
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 (id != nullptr && OpenClipboard(m_hwnd)) {
HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, mir_wstrlen(id) * sizeof(wchar_t) + 1);
if (hData) {
@@ -796,9 +796,9 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case IDC_ADD:
- 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), FALSE);
break;
}
@@ -1262,7 +1262,7 @@ void CMsgDialog::OnOptionsApplied(bool bUpdateAvatar)
bool bShow = false;
if (m_hContact && g_plugin.bShowButtons) {
if (cbd->m_dwButtonCID == IDC_ADD) {
- bShow = !Contact_OnList(m_hContact);
+ bShow = !Contact::OnList(m_hContact);
cbd->m_bHidden = !bShow;
}
else bShow = true;
@@ -1395,7 +1395,7 @@ void CMsgDialog::NotifyTyping(int mode)
if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(m_hContact, m_szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
return;
- if (!g_plugin.bTypingUnknown && !Contact_OnList(m_hContact))
+ if (!g_plugin.bTypingUnknown && !Contact::OnList(m_hContact))
return;
// End user check
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index 228ec4ea53..8fb1f5edbd 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -265,7 +265,7 @@ static bool CreateRTFFromDbEvent(LogStreamData *dat)
wchar_t *szName;
if (dbei.flags & DBEF_SENT) {
- if (wchar_t *p = Contact_GetInfo(CNF_DISPLAY, 0, dbei.szModule))
+ if (wchar_t *p = Contact::GetInfo(CNF_DISPLAY, 0, dbei.szModule))
szName = NEWWSTR_ALLOCA(p);
else
szName = TranslateT("Me");
@@ -285,7 +285,7 @@ static bool CreateRTFFromDbEvent(LogStreamData *dat)
case EVENTTYPE_JABBER_CHATSTATES:
case EVENTTYPE_JABBER_PRESENCE:
if (dbei.flags & DBEF_SENT) {
- if (wchar_t *p = Contact_GetInfo(CNF_DISPLAY, 0, dbei.szModule)) {
+ if (wchar_t *p = Contact::GetInfo(CNF_DISPLAY, 0, dbei.szModule)) {
szName = NEWWSTR_ALLOCA(p);
mir_free(p);
}
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index a0fb9d874f..95b209fd02 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -488,7 +488,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/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index ff7feb044b..3b1520a0a6 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -36,7 +36,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
int oldStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
g_plugin.setWord(hContact, "OldStatus", (uint16_t)newStatus);
if (Ignore_IsIgnored(hContact, IGNOREEVENT_USERONLINE)) return 0;
- if (Contact_IsHidden(hContact)) return 0;
+ if (Contact::IsHidden(hContact)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
// Remove the event from the queue if it exists since they are now offline
MEVENT lastEvent = g_plugin.getDword(hContact, "LastEvent");
diff --git a/src/mir_app/mir_app.vcxproj b/src/mir_app/mir_app.vcxproj
index ed34881dd2..1979222313 100644
--- a/src/mir_app/mir_app.vcxproj
+++ b/src/mir_app/mir_app.vcxproj
@@ -54,7 +54,7 @@
<ClCompile Include="src\cluiservices.cpp" />
<ClCompile Include="src\CMPluginBase.cpp" />
<ClCompile Include="src\colorchooser.cpp" />
- <ClCompile Include="src\contact.cpp" />
+ <ClCompile Include="src\clccontact.cpp" />
<ClCompile Include="src\contacts.cpp" />
<ClCompile Include="src\database.cpp" />
<ClCompile Include="src\db_events.cpp" />
diff --git a/src/mir_app/mir_app.vcxproj.filters b/src/mir_app/mir_app.vcxproj.filters
index e31438c9c9..dafdde8604 100644
--- a/src/mir_app/mir_app.vcxproj.filters
+++ b/src/mir_app/mir_app.vcxproj.filters
@@ -11,9 +11,6 @@
<ClCompile Include="src\button.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\contact.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="src\contacts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -401,6 +398,9 @@
<ClCompile Include="src\userInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\clccontact.cpp">
+ <Filter>Source Files\Contact list</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\filter.h">
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp
index afefeda2b4..e065bf94df 100644
--- a/src/mir_app/src/addcontact.cpp
+++ b/src/mir_app/src/addcontact.cpp
@@ -123,7 +123,7 @@ public:
if (iGroup >= 0)
Clist_ContactChangeGroup(hContact, iGroup);
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
if (m_chkAuth.GetState()) {
uint32_t flags = CallProtoServiceInt(0, m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
@@ -159,7 +159,7 @@ public:
}
};
-MIR_APP_DLL(void) Contact_Add(MCONTACT hContact, HWND hwndParent)
+MIR_APP_DLL(void) Contact::Add(MCONTACT hContact, HWND hwndParent)
{
if (hContact == 0)
return;
@@ -182,7 +182,7 @@ MIR_APP_DLL(void) Contact_Add(MCONTACT hContact, HWND hwndParent)
else (new CAddByContact(hContact))->Show();
}
-MIR_APP_DLL(void) Contact_AddByEvent(MEVENT hEvent, MWindow hwndParent)
+MIR_APP_DLL(void) Contact::AddByEvent(MEVENT hEvent, MWindow hwndParent)
{
struct CAddByEvent : public CAddContactDlg
{
@@ -214,7 +214,7 @@ MIR_APP_DLL(void) Contact_AddByEvent(MEVENT hEvent, MWindow hwndParent)
else (new CAddByEvent(hEvent))->Show();
}
-MIR_APP_DLL(void) Contact_AddBySearch(const char *szProto, struct PROTOSEARCHRESULT *psr, HWND hwndParent)
+MIR_APP_DLL(void) Contact::AddBySearch(const char *szProto, struct PROTOSEARCHRESULT *psr, HWND hwndParent)
{
struct CAddBySearch : public CAddContactDlg
{
diff --git a/src/mir_app/src/auth.cpp b/src/mir_app/src/auth.cpp
index 8518bc1a63..c40053819f 100644
--- a/src/mir_app/src/auth.cpp
+++ b/src/mir_app/src/auth.cpp
@@ -114,7 +114,7 @@ public:
fldReason.SetText(reasonT);
- if (m_hContact == INVALID_CONTACT_ID || Contact_OnList(m_hContact))
+ if (m_hContact == INVALID_CONTACT_ID || Contact::OnList(m_hContact))
btnAdd.Hide();
edtReason.SetMaxLength(255);
@@ -123,7 +123,7 @@ public:
edtReason.SetText(TranslateT("Feature is not supported by protocol"));
}
- if (Contact_OnList(m_hContact)) {
+ if (Contact::OnList(m_hContact)) {
chkAdd.Disable();
chkAdd.SetState(false);
}
@@ -136,7 +136,7 @@ public:
CallProtoService(m_szProto, PS_AUTHALLOW, m_hDbEvent, 0);
if (chkAdd.GetState())
- Contact_AddByEvent(m_hDbEvent, m_hwnd);
+ Contact::AddByEvent(m_hDbEvent, m_hwnd);
return true;
}
@@ -254,14 +254,14 @@ public:
mir_snwprintf(hdr, TranslateT("%s added you to the contact list\n%s on %s"), name, emailT[0] ? emailT.get() : TranslateT("(Unknown)"), acc->tszAccountName);
fldHeader.SetText(hdr);
- if (m_hContact == INVALID_CONTACT_ID || Contact_OnList(m_hContact))
+ if (m_hContact == INVALID_CONTACT_ID || Contact::OnList(m_hContact))
btnAdd.Hide();
return true;
}
bool OnApply()
{
- Contact_AddByEvent(m_hDbEvent, m_hwnd);
+ Contact::AddByEvent(m_hDbEvent, m_hwnd);
return true;
}
@@ -278,9 +278,9 @@ public:
void onClick_Add(CCtrlButton*)
{
- Contact_AddByEvent(m_hDbEvent, m_hwnd);
+ Contact::AddByEvent(m_hDbEvent, m_hwnd);
- if (m_hContact == INVALID_CONTACT_ID || Contact_OnList(m_hContact))
+ if (m_hContact == INVALID_CONTACT_ID || Contact::OnList(m_hContact))
btnAdd.Hide();
}
@@ -323,7 +323,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam)
cle.lParam = lParam;
cle.hDbEvent = hDbEvent;
- ptrW szUid(Contact_GetInfo(CNF_UNIQUEID, hContact));
+ ptrW szUid(Contact::GetInfo(CNF_UNIQUEID, hContact));
if (dbei.eventType == EVENTTYPE_AUTHREQUEST) {
Skin_PlaySound("AuthRequest");
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp
index 86f6e451ec..68b9386074 100644
--- a/src/mir_app/src/chat_clist.cpp
+++ b/src/mir_app/src/chat_clist.cpp
@@ -80,7 +80,7 @@ BOOL SetAllOffline(BOOL, const char *pszModule)
if (!MM_FindModule(szProto))
continue;
- if (Contact_IsGroupChat(hContact, szProto)) {
+ if (Contact::IsGroupChat(hContact, szProto)) {
db_set_w(hContact, szProto, "ApparentMode", 0);
db_set_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
}
@@ -97,7 +97,7 @@ int RoomDoubleclicked(WPARAM hContact, LPARAM)
char *szProto = Proto_GetBaseAccountName(hContact);
if (MM_FindModule(szProto) == nullptr)
return 0;
- if (!Contact_IsGroupChat(hContact, szProto))
+ if (!Contact::IsGroupChat(hContact, szProto))
return 0;
ptrW roomid(db_get_wsa(hContact, szProto, "ChatRoomID"));
@@ -118,7 +118,7 @@ int RoomDoubleclicked(WPARAM hContact, LPARAM)
MCONTACT FindRoom(const char *pszModule, const wchar_t *pszRoom)
{
for (auto &hContact : Contacts(pszModule)) {
- if (!Contact_IsGroupChat(hContact, pszModule))
+ if (!Contact::IsGroupChat(hContact, pszModule))
continue;
ptrW roomid(db_get_wsa(hContact, pszModule, "ChatRoomID"));
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 0b5485a03a..3e0f2b8b5d 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -199,7 +199,7 @@ static void SM_FreeSession(SESSION_INFO *si, bool bRemoveContact = false)
// contact may have been deleted here already, since function may be called after deleting
// contact so the handle may be invalid, therefore db_get_b shall return 0
- if (si->hContact && Contact_IsGroupChat(si->hContact, si->pszModule)) {
+ if (si->hContact && Contact::IsGroupChat(si->hContact, si->pszModule)) {
g_chatApi.SetOffline(si->hContact, (si->iType == GCW_CHATROOM || si->iType == GCW_PRIVMESS) ? TRUE : FALSE);
db_set_s(si->hContact, si->pszModule, "Topic", "");
db_set_s(si->hContact, si->pszModule, "StatusBar", "");
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 1c34b4cbf2..072fd6789a 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -768,8 +768,8 @@ static INT_PTR LeaveChat(WPARAM hContact, LPARAM)
static int OnContactDeleted(WPARAM hContact, LPARAM)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (szProto && Contact_IsGroupChat(hContact, szProto))
- if (Contact_GetStatus(hContact) != ID_STATUS_OFFLINE)
+ if (szProto && Contact::IsGroupChat(hContact, szProto))
+ if (Contact::GetStatus(hContact) != ID_STATUS_OFFLINE)
CallProtoService(szProto, PS_LEAVECHAT, hContact, 0);
return 0;
@@ -791,7 +791,7 @@ static int PrebuildContactMenu(WPARAM hContact, LPARAM)
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto) {
// display this menu item only for chats
- if (Contact_IsGroupChat(hContact, szProto)) {
+ if (Contact::IsGroupChat(hContact, szProto)) {
bIsChat = true;
// still hide it for offline protos
if (Proto_GetStatus(szProto) != ID_STATUS_OFFLINE) {
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 4eba89b258..b3a45440b8 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -379,8 +379,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
if (bHighlight) {
gce->iType |= GC_EVENT_HIGHLIGHT;
- if (Contact_IsHidden(si->hContact))
- Contact_Hide(si->hContact, false);
+ if (Contact::IsHidden(si->hContact))
+ Contact::Hide(si->hContact, false);
}
// do blinking icons in tray
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 8fbeff6257..d44673425e 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -443,7 +443,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
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)) {
NMCLISTCONTROL nm;
g_clistApi.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
if (Clist_FindItem(hwnd, dat, wParam, &contact)) {
@@ -477,7 +477,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
// this means an offline msg is flashing, so the contact should be shown
uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
- int shouldShow = (style & CLS_SHOWHIDDEN || !Contact_IsHidden(wParam))
+ int shouldShow = (style & CLS_SHOWHIDDEN || !Contact::IsHidden(wParam))
&& (!Clist_IsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam);
contact = nullptr;
diff --git a/src/mir_app/src/contact.cpp b/src/mir_app/src/clccontact.cpp
index 8edb91bf60..3dbf578cd6 100644
--- a/src/mir_app/src/contact.cpp
+++ b/src/mir_app/src/clccontact.cpp
@@ -31,8 +31,8 @@ MIR_APP_DLL(void) Clist_LoadContactTree(void)
{
bool hideOffline = Clist::HideOffline;
for (auto &hContact : Contacts()) {
- int status = Contact_GetStatus(hContact);
- if ((!hideOffline || status != ID_STATUS_OFFLINE) && !Contact_IsHidden(hContact))
+ int status = Contact::GetStatus(hContact);
+ if ((!hideOffline || status != ID_STATUS_OFFLINE) && !Contact::IsHidden(hContact))
Clist_ChangeContactIcon(hContact, g_clistApi.pfnIconFromStatusMode(Proto_GetBaseAccountName(hContact), status, hContact));
}
Clist_EndRebuild();
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 052d160745..42c3f37d2f 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -201,7 +201,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact
cc->flags |= CONTACTF_VISTO;
else if (apparentMode)
cc->flags |= CONTACTF_VISTO | CONTACTF_INVISTO;
- if (!Contact_OnList(hContact))
+ if (!Contact::OnList(hContact))
cc->flags |= CONTACTF_NOTONLIST;
uint32_t idleMode = szProto != nullptr ? db_get_dw(hContact, szProto, "IdleTS", 0) : 0;
if (idleMode)
@@ -342,7 +342,7 @@ MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem)
int fnGetContactHiddenStatus(MCONTACT hContact, char*, ClcData*)
{
- return Contact_IsHidden(hContact);
+ return Contact::IsHidden(hContact);
}
void fnRebuildEntireList(HWND hwnd, ClcData *dat)
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index b6df08ff48..6a205db148 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -428,7 +428,7 @@ void UnloadContactListModule()
if (Clist::RemoveTempContacts) {
for (MCONTACT hContact = db_find_first(); hContact != 0; ) {
MCONTACT hNext = db_find_next(hContact);
- if (!Contact_OnList(hContact))
+ if (!Contact::OnList(hContact))
db_delete_contact(hContact);
hContact = hNext;
}
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp
index 074e9f031b..6b160e0046 100644
--- a/src/mir_app/src/clistsettings.cpp
+++ b/src/mir_app/src/clistsettings.cpp
@@ -70,7 +70,7 @@ void fnCheckCacheItem(ClcCacheEntry *p)
p->szProto = Proto_GetBaseAccountName(p->hContact);
if (p->bIsHidden == -1)
- p->bIsHidden = Contact_IsHidden(p->hContact);
+ p->bIsHidden = Contact::IsHidden(p->hContact);
}
void fnFreeCacheItem(ClcCacheEntry *p)
@@ -125,7 +125,7 @@ MIR_APP_DLL(wchar_t*) Clist_GetContactDisplayName(MCONTACT hContact, int mode)
return cacheEntry->tszName;
}
- ptrW tszDisplayName(Contact_GetInfo((mode == GCDNF_NOMYHANDLE) ? CNF_DISPLAYNC : CNF_DISPLAY, hContact));
+ ptrW tszDisplayName(Contact::GetInfo((mode == GCDNF_NOMYHANDLE) ? CNF_DISPLAYNC : CNF_DISPLAY, hContact));
if (tszDisplayName != nullptr) {
if (cacheEntry != nullptr)
replaceStrW(cacheEntry->tszName, tszDisplayName);
@@ -208,7 +208,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
g_clistApi.pfnCheckCacheItem(pdnce);
}
else if (!strcmp(cws->szSetting, "Status")) {
- if (!Contact_IsHidden(hContact))
+ if (!Contact::IsHidden(hContact))
Clist_ChangeContactIcon(hContact, g_clistApi.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact));
}
}
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 633603f62e..e5201fb244 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -187,7 +187,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
switch (action) {
case IDC_HIDE: // Archive contact
- Contact_Hide(wParam);
+ Contact::Hide(wParam);
break;
case IDYES: // Delete contact
@@ -217,7 +217,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
static INT_PTR MenuItem_AddContactToList(WPARAM hContact, LPARAM)
{
- Contact_Add(hContact);
+ Contact::Add(hContact);
return 0;
}
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp
index 81a899368c..3a4c32b18b 100644
--- a/src/mir_app/src/contacts.cpp
+++ b/src/mir_app/src/contacts.cpp
@@ -72,7 +72,7 @@ static wchar_t* ProcessDatabaseValueDefault(MCONTACT hContact, const char *szPro
return nullptr;
}
-MIR_APP_DLL(wchar_t*) Contact_GetInfo(int type, MCONTACT hContact, const char *szProto)
+MIR_APP_DLL(wchar_t*) Contact::GetInfo(int type, MCONTACT hContact, const char *szProto)
{
if (hContact == 0 && szProto == nullptr)
return nullptr;
@@ -266,7 +266,7 @@ MIR_APP_DLL(wchar_t*) Contact_GetInfo(int type, MCONTACT hContact, const char *s
return nullptr;
}
-MIR_APP_DLL(int) Contact_GetStatus(MCONTACT hContact)
+MIR_APP_DLL(int) Contact::GetStatus(MCONTACT hContact)
{
if (hContact == 0)
return ID_STATUS_OFFLINE;
@@ -280,7 +280,7 @@ MIR_APP_DLL(int) Contact_GetStatus(MCONTACT hContact)
///////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(bool) Contact_IsGroupChat(MCONTACT hContact, const char *szProto)
+MIR_APP_DLL(bool) Contact::IsGroupChat(MCONTACT hContact, const char *szProto)
{
if (szProto == nullptr) {
szProto = Proto_GetBaseAccountName(hContact);
@@ -293,12 +293,12 @@ MIR_APP_DLL(bool) Contact_IsGroupChat(MCONTACT hContact, const char *szProto)
///////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(bool) Contact_IsHidden(MCONTACT hContact)
+MIR_APP_DLL(bool) Contact::IsHidden(MCONTACT hContact)
{
return db_get_b(hContact, "CList", "Hidden") != 0;
}
-MIR_APP_DLL(void) Contact_Hide(MCONTACT hContact, bool bHidden)
+MIR_APP_DLL(void) Contact::Hide(MCONTACT hContact, bool bHidden)
{
if (bHidden)
db_set_b(hContact, "CList", "Hidden", 1);
@@ -308,17 +308,17 @@ MIR_APP_DLL(void) Contact_Hide(MCONTACT hContact, bool bHidden)
///////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(bool) Contact_OnList(MCONTACT hContact)
+MIR_APP_DLL(bool) Contact::OnList(MCONTACT hContact)
{
return db_get_b(hContact, "CList", "NotOnList", 0) == 0;
}
-MIR_APP_DLL(void) Contact_PutOnList(MCONTACT hContact)
+MIR_APP_DLL(void) Contact::PutOnList(MCONTACT hContact)
{
db_unset(hContact, "CList", "NotOnList");
}
-MIR_APP_DLL(void) Contact_RemoveFromList(MCONTACT hContact)
+MIR_APP_DLL(void) Contact::RemoveFromList(MCONTACT hContact)
{
db_set_b(hContact, "CList", "NotOnList", 1);
}
diff --git a/src/mir_app/src/ei_defaulticons.cpp b/src/mir_app/src/ei_defaulticons.cpp
index 8cfe52defb..14c1b2b359 100644
--- a/src/mir_app/src/ei_defaulticons.cpp
+++ b/src/mir_app/src/ei_defaulticons.cpp
@@ -46,7 +46,7 @@ static void SetVisibility(MCONTACT hContact, int apparentMode, bool clear)
HANDLE hExtraIcon, hIcolib = nullptr;
// Is chat
- if (Contact_IsGroupChat(hContact, proto)) {
+ if (Contact::IsGroupChat(hContact, proto)) {
hExtraIcon = hExtraChat;
if (apparentMode == ID_STATUS_OFFLINE)
hIcolib = IcoLib_GetIconHandle("ChatActivity");
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp
index 7ddb583339..88850481d8 100644
--- a/src/mir_app/src/findadd.cpp
+++ b/src/mir_app/src/findadd.cpp
@@ -749,7 +749,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP
lvi.iItem = ListView_GetNextItem(hwndList, -1, LVNI_ALL | LVNI_SELECTED);
ListView_GetItem(hwndList, &lvi);
ListSearchResult *lsr = (ListSearchResult*)lvi.lParam;
- Contact_AddBySearch(lsr->szProto, &lsr->psr, hwndDlg);
+ Contact::AddBySearch(lsr->szProto, &lsr->psr, hwndDlg);
}
else {
wchar_t str[256];
@@ -764,7 +764,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP
psr.cbSize = sizeof(psr);
psr.flags = PSR_UNICODE;
psr.id.w = str;
- Contact_AddBySearch(szProto, &psr, hwndDlg);
+ Contact::AddBySearch(szProto, &psr, hwndDlg);
}
break;
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp
index 7dc8d2cc41..4e5eb804cf 100644
--- a/src/mir_app/src/ignore.cpp
+++ b/src/mir_app/src/ignore.cpp
@@ -38,7 +38,7 @@ static uint32_t GetMask(MCONTACT hContact)
if (hContact == 0)
mask = 0;
else {
- if ((Contact_IsHidden(hContact) && !db_mc_isSub(hContact)) || !Contact_OnList(hContact))
+ if ((Contact::IsHidden(hContact) && !db_mc_isSub(hContact)) || !Contact::OnList(hContact))
mask = db_get_dw(0, "Ignore", "Mask1", 0);
else
mask = db_get_dw(0, "Ignore", "Default1", 0);
@@ -192,7 +192,7 @@ static void SetAllContactIcons(HWND hwndList)
}
else proto1Caps = proto4Caps = 0;
InitialiseItem(hwndList, hContact, hItem, proto1Caps, proto4Caps);
- if (!Contact_IsHidden(hContact))
+ if (!Contact::IsHidden(hContact))
SendMessage(hwndList, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
}
@@ -306,7 +306,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
- Contact_Hide(hContact, !SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
+ Contact::Hide(hContact, !SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
}
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), 0, hItemAll, "Default1");
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp
index 811a4f949a..0a545db4a0 100644
--- a/src/mir_app/src/menu_clist.cpp
+++ b/src/mir_app/src/menu_clist.cpp
@@ -230,7 +230,7 @@ EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildContactMenu(MCONTACT hContact)
BuildContactParam bcp;
bcp.szProto = szProto;
- bcp.isOnList = Contact_OnList(hContact);
+ bcp.isOnList = Contact::OnList(hContact);
bcp.isOnline = (szProto != nullptr && ID_STATUS_OFFLINE != db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE));
HMENU hMenu = CreatePopupMenu();
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index f337b699bb..dc4ad1252f 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -79,7 +79,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM)
// hide the contact if clist groups disabled (shouldn't create one anyway since menus disabled)
if (!db_mc_isEnabled())
- Contact_Hide(hMetaContact);
+ Contact::Hide(hMetaContact);
return hMetaContact;
}
@@ -96,7 +96,7 @@ void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateI
DBCachedContact *ccSub = g_pCurrDb->getCache()->GetCachedContact(Meta_GetContactHandle(ccMeta, number));
if (ccSub != nullptr)
if (ccSub->parentID == ccMeta->contactID)
- Contact_Hide(ccSub->contactID, false);
+ Contact::Hide(ccSub->contactID, false);
// each contact from 'number' upwards will be moved down one
// and the last one will be deleted
@@ -318,7 +318,7 @@ int Meta_ModifyMenu(WPARAM hMeta, LPARAM)
}
else {
// The contact is neutral
- bool bHideChat = !Contact_IsGroupChat(hMeta, cc->szProto);
+ bool bHideChat = !Contact::IsGroupChat(hMeta, cc->szProto);
Menu_ShowItem(hMenuAdd, bHideChat);
Menu_ShowItem(hMenuConvert, bHideChat);
Menu_ShowItem(hMenuEdit, false);
diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp
index a6a36d435a..ad75ed4910 100644
--- a/src/mir_app/src/meta_utils.cpp
+++ b/src/mir_app/src/meta_utils.cpp
@@ -41,7 +41,7 @@ POINT menuMousePoint;
int Meta_SetNick(char *szProto)
{
- ptrW tszNick(Contact_GetInfo(CNF_DISPLAY, 0, szProto));
+ ptrW tszNick(Contact::GetInfo(CNF_DISPLAY, 0, szProto));
if (tszNick == nullptr)
return 1;
@@ -79,7 +79,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, bool set_as_default)
}
// Check that is is 'on the list'
- if (!Contact_OnList(hSub)) {
+ if (!Contact::OnList(hSub)) {
MessageBoxW(nullptr, TranslateT("Contact is 'not on list' - please add the contact to your contact list before assigning."), TranslateT("Assignment error"), MB_OK | MB_ICONWARNING);
db_free(&dbv);
return FALSE;
@@ -181,7 +181,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, bool set_as_default)
g_pCurrDb->MetaMergeHistory(ccDest, ccSub);
// hide sub finally
- Contact_Hide(ccSub->contactID);
+ Contact::Hide(ccSub->contactID);
NotifyEventHooks(hSubcontactsChanged, hMeta, 0);
return TRUE;
@@ -391,7 +391,7 @@ int Meta_HideMetaContacts(bool bHide)
else
continue;
- Contact_Hide(hContact, bSet);
+ Contact::Hide(hContact, bSet);
}
if (bHide) {
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index ac4c2904f3..3dea17ab9a 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -190,7 +190,7 @@ Clist_GroupGetName @257
Clist_GroupRename @258
Clist_EndRebuild @259
Clist_GroupAdded @260
-Contact_GetInfo @261
+?GetInfo@Contact@@YGPA_WHIPBD@Z @261 NONAME
Clist_ContactToHItem @262
Clist_ContactToItemHandle @263
Window_SetSkinIcon_IcoLib @264
@@ -362,8 +362,8 @@ Chat_UpdateOptions @418 NONAME
?onDblClick_List@CSrmmBaseDialog@@IAEXPAVCCtrlListBox@@@Z @440 NONAME
?OnDestroy@CSrmmBaseDialog@@MAEXXZ @441 NONAME
Chat_AddMenuItems @442 NONAME
-Contact_IsHidden @443
-Contact_Hide @444
+?Hide@Contact@@YGXI_N@Z @443 NONAME
+?IsHidden@Contact@@YG_NI@Z @444 NONAME
Chat_DoEventHook @445 NONAME
_stubLogProc@16 @446 NONAME
_stubMessageProc@16 @447 NONAME
@@ -408,9 +408,9 @@ Clist_SetStatusMode @464
?EnumResidentSettings@MDatabaseCommon@@UAGHP6AHPBDPAX@Z1@Z @494 NONAME
KillModuleOptions @495
Srmm_GetColorTable @496
-Contact_Add @497
-Contact_AddByEvent @498
-Contact_AddBySearch @499
+?Add@Contact@@YGXIPAUHWND__@@@Z @497 NONAME
+?AddByEvent@Contact@@YGXIPAUHWND__@@@Z @498 NONAME
+?AddBySearch@Contact@@YGXPBDPAUPROTOSEARCHRESULT@@PAUHWND__@@@Z @499 NONAME
?setAllContactStatuses@PROTO_INTERFACE@@QAEXH_N@Z @500 NONAME
??0PROTO_INTERFACE@@QAE@PBDPB_W@Z @501 NONAME
??1PROTO_INTERFACE@@QAE@XZ @502 NONAME
@@ -518,7 +518,7 @@ Proto_GetStatus @601
?IsReadyToExit@PROTO_INTERFACE@@UAE_NXZ @606 NONAME
?OnModulesLoaded@PROTO_INTERFACE@@UAEXXZ @607 NONAME
?OnShutdown@PROTO_INTERFACE@@UAEXXZ @608 NONAME
-Contact_GetStatus @609
+?GetStatus@Contact@@YGHI@Z @609 NONAME
?OnContactDeleted@PROTO_INTERFACE@@UAEXI@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UAEXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UAEXXZ @612 NONAME
@@ -687,9 +687,9 @@ Clist_SetGroup @776
Ignore_Allow @779
Ignore_Ignore @780
Ignore_IsIgnored @781
-Contact_OnList @782
-Contact_PutOnList @783
-Contact_RemoveFromList @784
+?OnList@Contact@@YG_NI@Z @782 NONAME
+?PutOnList@Contact@@YGXI@Z @783 NONAME
+?RemoveFromList@Contact@@YGXI@Z @784 NONAME
RegisterHppLogger @785
UnregisterHppLogger @786
??0CRtfLogWindow@@QAE@AAVCMsgDialog@@@Z @787 NONAME
@@ -798,4 +798,4 @@ Srmm_CreateHotkey @886 NONAME
??_7CUserInfoPageDlg@@6B@ @891 NONAME
?OnRefresh@CUserInfoPageDlg@@UAE_NXZ @892 NONAME
?SetContact@CUserInfoPageDlg@@QAEXI@Z @893 NONAME
-?Contact_IsGroupChat@@YG_NIPBD@Z @894 NONAME
+?IsGroupChat@Contact@@YG_NIPBD@Z @894 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index ed227d6adb..835d6919a6 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -190,7 +190,7 @@ Clist_GroupGetName @257
Clist_GroupRename @258
Clist_EndRebuild @259
Clist_GroupAdded @260
-Contact_GetInfo @261
+?GetInfo@Contact@@YAPEA_WHIPEBD@Z @261 NONAME
Clist_ContactToHItem @262
Clist_ContactToItemHandle @263
Window_SetSkinIcon_IcoLib @264
@@ -362,8 +362,8 @@ Chat_UpdateOptions @418 NONAME
?onDblClick_List@CSrmmBaseDialog@@IEAAXPEAVCCtrlListBox@@@Z @440 NONAME
?OnDestroy@CSrmmBaseDialog@@MEAAXXZ @441 NONAME
Chat_AddMenuItems @442 NONAME
-Contact_IsHidden @443
-Contact_Hide @444
+?Hide@Contact@@YAXI_N@Z @443 NONAME
+?IsHidden@Contact@@YA_NI@Z @444 NONAME
Chat_DoEventHook @445 NONAME
stubLogProc @446 NONAME
stubMessageProc @447 NONAME
@@ -408,9 +408,9 @@ Clist_SetStatusMode @464
?EnumResidentSettings@MDatabaseCommon@@UEAAHP6AHPEBDPEAX@Z1@Z @494 NONAME
KillModuleOptions @495
Srmm_GetColorTable @496
-Contact_Add @497
-Contact_AddByEvent @498
-Contact_AddBySearch @499
+?Add@Contact@@YAXIPEAUHWND__@@@Z @497 NONAME
+?AddByEvent@Contact@@YAXIPEAUHWND__@@@Z @498 NONAME
+?AddBySearch@Contact@@YAXPEBDPEAUPROTOSEARCHRESULT@@PEAUHWND__@@@Z @499 NONAME
?setAllContactStatuses@PROTO_INTERFACE@@QEAAXH_N@Z @500 NONAME
??0PROTO_INTERFACE@@QEAA@PEBDPEB_W@Z @501 NONAME
??1PROTO_INTERFACE@@QEAA@XZ @502 NONAME
@@ -518,7 +518,7 @@ Proto_GetStatus @601
?IsReadyToExit@PROTO_INTERFACE@@UEAA_NXZ @606 NONAME
?OnModulesLoaded@PROTO_INTERFACE@@UEAAXXZ @607 NONAME
?OnShutdown@PROTO_INTERFACE@@UEAAXXZ @608 NONAME
-Contact_GetStatus @609
+?GetStatus@Contact@@YAHI@Z @609 NONAME
?OnContactDeleted@PROTO_INTERFACE@@UEAAXI@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UEAAXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UEAAXXZ @612 NONAME
@@ -687,9 +687,9 @@ Clist_SetGroup @776
Ignore_Allow @779
Ignore_Ignore @780
Ignore_IsIgnored @781
-Contact_OnList @782
-Contact_PutOnList @783
-Contact_RemoveFromList @784
+?OnList@Contact@@YA_NI@Z @782 NONAME
+?PutOnList@Contact@@YAXI@Z @783 NONAME
+?RemoveFromList@Contact@@YAXI@Z @784 NONAME
RegisterHppLogger @785
UnregisterHppLogger @786
??0CRtfLogWindow@@QEAA@AEAVCMsgDialog@@@Z @787 NONAME
@@ -798,4 +798,4 @@ Srmm_CreateHotkey @886 NONAME
??_7CUserInfoPageDlg@@6B@ @891 NONAME
?OnRefresh@CUserInfoPageDlg@@UEAA_NXZ @892 NONAME
?SetContact@CUserInfoPageDlg@@QEAAXI@Z @893 NONAME
-?Contact_IsGroupChat@@YA_NIPEBD@Z @894 NONAME
+?IsGroupChat@Contact@@YA_NIPEBD@Z @894 NONAME
diff --git a/src/mir_app/src/path.cpp b/src/mir_app/src/path.cpp
index aebc78e66b..616100510f 100644
--- a/src/mir_app/src/path.cpp
+++ b/src/mir_app/src/path.cpp
@@ -35,10 +35,10 @@ static wchar_t tszAvatarRoot[MAX_PATH];
wchar_t* GetContactID(MCONTACT hContact)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (Contact_IsGroupChat(hContact, szProto))
+ if (Contact::IsGroupChat(hContact, szProto))
return db_get_wsa(hContact, szProto, "ChatRoomID");
- return Contact_GetInfo(CNF_UNIQUEID, hContact, szProto);
+ return Contact::GetInfo(CNF_UNIQUEID, hContact, szProto);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index a8641683bc..ff67ef0092 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -704,7 +704,7 @@ BOOL CAccountListCtrl::OnDrawItem(DRAWITEMSTRUCT *lps)
if (wszIdName == nullptr || (UINT_PTR)wszIdName == CALLSERVICE_NOTFOUND)
wszIdName = TranslateT("Account ID");
- ptrW tszUniqueID(Contact_GetInfo(CNF_UNIQUEID, 0, acc->szModuleName));
+ ptrW tszUniqueID(Contact::GetInfo(CNF_UNIQUEID, 0, acc->szModuleName));
if (tszUniqueID != nullptr)
text.Format(L"%s: %s", wszIdName, tszUniqueID.get());
else
diff --git a/src/mir_app/src/searchresults.cpp b/src/mir_app/src/searchresults.cpp
index 2c70bea508..2a298d6598 100644
--- a/src/mir_app/src/searchresults.cpp
+++ b/src/mir_app/src/searchresults.cpp
@@ -344,7 +344,7 @@ void ShowMoreOptionsMenu(HWND hwndDlg, int x, int y)
int commandId = TrackPopupMenu(hPopupMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD, x, y, 0, hwndDlg, nullptr);
switch (commandId) {
case IDC_ADD:
- Contact_AddBySearch(lsr->szProto, &lsr->psr, hwndDlg);
+ Contact::AddBySearch(lsr->szProto, &lsr->psr, hwndDlg);
break;
case IDC_DETAILS:
diff --git a/src/mir_app/src/utils.cpp b/src/mir_app/src/utils.cpp
index 582b22d54e..36260b3905 100644
--- a/src/mir_app/src/utils.cpp
+++ b/src/mir_app/src/utils.cpp
@@ -349,7 +349,7 @@ bool ProcessFileDrop(HDROP hDrop, MCONTACT hContact)
if (!(pcaps & PF1_FILESEND))
return false;
- if (Contact_GetStatus(hContact) == ID_STATUS_OFFLINE) {
+ if (Contact::GetStatus(hContact) == ID_STATUS_OFFLINE) {
pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (!(pcaps & PF4_OFFLINEFILES))
return false;