summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/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 /protocols/Gadu-Gadu/src
parentb47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff)
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp12
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp2
2 files changed, 7 insertions, 7 deletions
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"));