summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
commit500dd4848842f6d4207584417448586d060fbd6a (patch)
tree569ac641e814da1d706d36b12eaf35183a3ce7a5 /src
parentb47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff)
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'src')
-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
36 files changed, 108 insertions, 108 deletions
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;