diff options
Diffstat (limited to 'protocols')
49 files changed, 120 insertions, 120 deletions
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(); |