summaryrefslogtreecommitdiff
path: root/protocols/Sametime/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/Sametime/src
parentb47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff)
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'protocols/Sametime/src')
-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
5 files changed, 19 insertions, 19 deletions
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)) {