diff options
author | George Hazan <george.hazan@gmail.com> | 2024-02-13 13:08:47 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-02-13 13:08:47 +0300 |
commit | dbbec79f16da294890420538ec3957115d2ba820 (patch) | |
tree | 929d5e08049162010b5da488241f374a7dd8a3f3 /src | |
parent | f0c061fcee46de8eaceebd58d101c00e041c4aa2 (diff) |
code cleaning
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/addcontact.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/auth.cpp | 12 | ||||
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/clc.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clcfiledrop.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clui.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/file.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/filesenddlg.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/findadd.cpp | 16 | ||||
-rw-r--r-- | src/mir_app/src/ignore.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/menu_clist.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/meta_services.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/meta_utils.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/protocols.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/searchresults.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/skinicons.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_log_rtf.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_main.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_util.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/utils.cpp | 4 |
20 files changed, 45 insertions, 45 deletions
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp index 958a078590..06fe164d5c 100644 --- a/src/mir_app/src/addcontact.cpp +++ b/src/mir_app/src/addcontact.cpp @@ -89,7 +89,7 @@ public: if (db_get_b(0, "Miranda", "AuthOpenWindow", 1))
m_chkOpen.SetState(true);
- uint32_t flags = (m_szProto) ? CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
+ uint32_t flags = (m_szProto) ? CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4) : 0;
if (flags & PF4_FORCEAUTH) // force auth requests for this protocol
m_chkAuth.Disable();
@@ -143,7 +143,7 @@ public: Contact::PutOnList(hContact);
if (m_chkAuth.GetState()) {
- uint32_t flags = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t flags = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4);
if (flags & PF4_NOCUSTOMAUTH)
ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0);
else
@@ -162,7 +162,7 @@ public: void OnAuthClicked(CCtrlButton*)
{
- uint32_t flags = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t flags = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_4);
if (flags & PF4_NOCUSTOMAUTH)
m_authReq.Enable(false);
else
diff --git a/src/mir_app/src/auth.cpp b/src/mir_app/src/auth.cpp index b3aa68c785..79f0f6657e 100644 --- a/src/mir_app/src/auth.cpp +++ b/src/mir_app/src/auth.cpp @@ -77,8 +77,8 @@ public: char *reason = email + mir_strlen(email) + 1;
#ifdef _WINDOWS
- SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0));
- SendMessage(m_hwnd, WM_SETICON, ICON_BIG, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_LARGE, 0));
+ SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL));
+ SendMessage(m_hwnd, WM_SETICON, ICON_BIG, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_LARGE));
#endif
ptrW lastT(dbei.flags & DBEF_UTF ? mir_utf8decodeW(last) : mir_a2u(last));
@@ -118,7 +118,7 @@ public: btnAdd.Hide();
edtReason.SetMaxLength(255);
- if (CallProtoService(dbei.szModule, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_NOAUTHDENYREASON) {
+ if (CallProtoService(dbei.szModule, PS_GETCAPS, PFLAGNUM_4) & PF4_NOAUTHDENYREASON) {
edtReason.Disable();
edtReason.SetText(TranslateT("Feature is not supported by protocol"));
}
@@ -133,7 +133,7 @@ public: bool OnApply() override
{
- CallProtoService(m_szProto, PS_AUTHALLOW, m_hDbEvent, 0);
+ CallProtoService(m_szProto, PS_AUTHALLOW, m_hDbEvent);
if (chkAdd.GetState())
Contact::AddByEvent(m_hDbEvent, m_hwnd);
@@ -214,8 +214,8 @@ public: char* email = last + mir_strlen(last) + 1;
#ifdef _WINDOWS
- SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0));
- SendMessage(m_hwnd, WM_SETICON, ICON_BIG, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_LARGE, 0));
+ SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL));
+ SendMessage(m_hwnd, WM_SETICON, ICON_BIG, CallProtoService(dbei.szModule, PS_LOADICON, PLI_PROTOCOL | PLIF_LARGE));
#endif
PROTOACCOUNT* acc = Proto_GetAccount(dbei.szModule);
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index fcfb54bf70..4b4f3ce057 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -825,7 +825,7 @@ static INT_PTR LeaveChat(WPARAM hContact, LPARAM) if (hContact) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto)
- CallProtoService(szProto, PS_LEAVECHAT, hContact, 0);
+ CallProtoService(szProto, PS_LEAVECHAT, hContact);
}
return 0;
}
@@ -864,7 +864,7 @@ static int OnContactDeleted(WPARAM hContact, LPARAM) _wremove(Chat_GetFolderName(si));
if (Contact::GetStatus(hContact) != ID_STATUS_OFFLINE)
- CallProtoService(szProto, PS_LEAVECHAT, hContact, 0);
+ CallProtoService(szProto, PS_LEAVECHAT, hContact);
}
return 0;
}
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index fe5b974b8e..253f787e54 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -130,7 +130,7 @@ static int ClcProtoAck(WPARAM, LPARAM lParam) if ((INT_PTR)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
// if we're going offline, kill all contacts scheduled for deletion
- uint32_t caps = (uint32_t)CallProtoService(ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = (uint32_t)CallProtoService(ack->szModule, PS_GETCAPS, PFLAGNUM_1);
if (caps & PF1_SERVERCLIST) {
for (MCONTACT hContact = db_find_first(ack->szModule); hContact; ) {
MCONTACT hNext = db_find_next(hContact, ack->szModule);
diff --git a/src/mir_app/src/clcfiledrop.cpp b/src/mir_app/src/clcfiledrop.cpp index 574fc094e7..6ee2cb1d8a 100644 --- a/src/mir_app/src/clcfiledrop.cpp +++ b/src/mir_app/src/clcfiledrop.cpp @@ -82,7 +82,7 @@ static MCONTACT HContactFromPoint(HWND hwnd, ClcData *dat, int x, int y, int *hi if (szProto == nullptr)
return 0;
- uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1);
if (!(protoCaps & PF1_FILESEND))
return 0;
if (ID_STATUS_OFFLINE == db_get_w(contact->hContact, szProto, "Status", ID_STATUS_OFFLINE))
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 4896524ce4..3a4ee46c8b 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -63,7 +63,7 @@ void fnLoadCluiGlobalOpts() static void DisconnectAll()
{
for (auto &it : g_arAccounts)
- CallProtoService(it->szModuleName, PS_SETSTATUS, ID_STATUS_OFFLINE, 0);
+ CallProtoService(it->szModuleName, PS_SETSTATUS, ID_STATUS_OFFLINE);
}
static int CluiIconsChanged(WPARAM, LPARAM)
@@ -145,9 +145,9 @@ public: chkForEveryone(this, IDC_BOTH)
{
szProto = Proto_GetBaseAccountName(hContact);
- bDelContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_SERVERCLIST) != 0;
+ bDelContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1) & PF1_SERVERCLIST) != 0;
bDelHistory = ProtoServiceExists(szProto, PS_EMPTY_SRV_HISTORY);
- bForEveryone = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_DELETEFORALL) != 0;
+ bForEveryone = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4) & PF4_DELETEFORALL) != 0;
}
bool OnInitDialog() override
diff --git a/src/mir_app/src/file.cpp b/src/mir_app/src/file.cpp index 5d15a06801..9b1bafe1ad 100644 --- a/src/mir_app/src/file.cpp +++ b/src/mir_app/src/file.cpp @@ -93,8 +93,8 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM) char *szProto = Proto_GetBaseAccountName(wParam); if (szProto != nullptr) { 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) + if (CallProtoService(szProto, PS_GETCAPS, isChat ? PFLAGNUM_4 : PFLAGNUM_1) & (isChat ? PF4_GROUPCHATFILES : PF1_FILESEND)) { + if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4) & PF4_OFFLINEFILES) bEnabled = true; else if (db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) bEnabled = true; diff --git a/src/mir_app/src/filesenddlg.cpp b/src/mir_app/src/filesenddlg.cpp index bbac724a07..2da4ec2edb 100644 --- a/src/mir_app/src/filesenddlg.cpp +++ b/src/mir_app/src/filesenddlg.cpp @@ -168,7 +168,7 @@ void __cdecl ChooseFilesThread(void *param) ofn.Flags = OFN_NOCHANGEDIR | OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_HIDEREADONLY | OFN_DONTADDTORECENT; char *szProto = Proto_GetBaseAccountName(dat->hContact); - if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_SINGLEFILEONLY)) + if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4) & PF4_SINGLEFILEONLY)) ofn.Flags |= OFN_ALLOWMULTISELECT; if (GetOpenFileName(&ofn)) diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index f9f4ac47ac..3aa07ef97f 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -373,7 +373,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (!pa->IsEnabled())
continue;
- uint32_t caps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1);
if (caps & PF1_ANYSEARCH)
netProtoCount++;
}
@@ -400,7 +400,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (!pa->IsEnabled())
continue;
- uint32_t caps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1);
if (!(caps & PF1_ANYSEARCH))
continue;
@@ -409,7 +409,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (textSize.cx > cbwidth)
cbwidth = textSize.cx;
- HICON hIcon = (HICON)CallProtoService(pa->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
+ HICON hIcon = (HICON)CallProtoService(pa->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL);
cbei.iImage = cbei.iSelectedImage = ImageList_AddIcon(dat->himlComboIcons, hIcon);
DestroyIcon(hIcon);
cbei.lParam = (LPARAM)pa->szModuleName;
@@ -474,14 +474,14 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (szProto == nullptr) {
for (auto &pa : g_arAccounts) {
if (pa->IsEnabled()) {
- uint32_t protoCaps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t protoCaps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1);
if (protoCaps & PF1_SEARCHBYEMAIL) dat->showEmail = 1;
if (protoCaps & PF1_SEARCHBYNAME) dat->showName = 1;
}
}
}
else {
- uint32_t protoCaps = (uint32_t)CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t protoCaps = (uint32_t)CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1);
if (protoCaps & PF1_BASICSEARCH) dat->showProtoId = 1;
if (protoCaps & PF1_SEARCHBYEMAIL) dat->showEmail = 1;
if (protoCaps & PF1_SEARCHBYNAME) dat->showName = 1;
@@ -491,7 +491,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (protoCaps & PF1_USERIDISEMAIL && dat->showProtoId) { dat->showProtoId = 0; dat->showEmail = 1; }
if (dat->showProtoId) {
- wchar_t *wszUniqueId = (wchar_t *)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT, 0);
+ wchar_t *wszUniqueId = (wchar_t *)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT);
if (wszUniqueId)
SetDlgItemTextW(hwndDlg, IDC_BYPROTOID, wszUniqueId);
else
@@ -986,7 +986,7 @@ static INT_PTR FindAddCommand(WPARAM, LPARAM) if (!pa->IsEnabled())
continue;
- int protoCaps = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ int protoCaps = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1);
if (protoCaps & PF1_ANYSEARCH)
netProtoCount++;
}
@@ -1028,7 +1028,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM) // Make sure we have some networks to search on.
for (auto &pa : g_arAccounts) {
- int protoCaps = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ int protoCaps = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1);
if (protoCaps & PF1_ANYSEARCH)
netProtoCount++;
}
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp index 07f49f9e3e..83d0bfb0e0 100644 --- a/src/mir_app/src/ignore.cpp +++ b/src/mir_app/src/ignore.cpp @@ -187,8 +187,8 @@ static void SetAllContactIcons(HWND hwndList) uint32_t proto1Caps, proto4Caps;
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto) {
- proto1Caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
- proto4Caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ proto1Caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1);
+ proto4Caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4);
}
else proto1Caps = proto4Caps = 0;
InitialiseItem(hwndList, hContact, hItem, proto1Caps, proto4Caps);
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index 74abd6075a..edffe8e774 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -708,7 +708,7 @@ void RebuildMenuOrder(void) CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE | CMIF_KEEPUNTRANSLATED;
mi.position = pos++;
- mi.hIcon = ic = (HICON)CallProtoService(pa->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
+ mi.hIcon = ic = (HICON)CallProtoService(pa->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL);
if (pa->IsLocked()) {
mir_snwprintf(tbuf, TranslateT("%s (locked)"), pa->tszAccountName);
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index 108fae7414..7500ed6bdb 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -627,7 +627,7 @@ INT_PTR Meta_ContactMenuFunc(WPARAM hMeta, LPARAM lParam) // open message window if protocol supports message sending or chat, else simulate double click
char *proto = Proto_GetBaseAccountName(hContact);
if (proto) {
- INT_PTR caps = CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0);
+ INT_PTR caps = CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1);
if ((caps & PF1_IMSEND) || (caps & PF1_CHAT)) {
// set default contact for sending/status and open message window
Meta_SetSrmmSub(hMeta, hContact);
diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp index afef914a62..c4baef1221 100644 --- a/src/mir_app/src/meta_utils.cpp +++ b/src/mir_app/src/meta_utils.cpp @@ -232,7 +232,7 @@ MCONTACT Meta_GetMostOnlineSupporting(DBCachedContact *cc, int pflagnum, unsigne MCONTACT most_online_contact = Meta_GetContactHandle(cc, cc->nDefault);
char *szProto = Proto_GetBaseAccountName(most_online_contact);
if (szProto && Proto_GetStatus(szProto) >= ID_STATUS_ONLINE) {
- uint32_t caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0);
+ uint32_t caps = CallProtoService(szProto, PS_GETCAPS, pflagnum);
if (capability == -1 || (caps & capability) == capability) {
most_online_status = db_get_w(most_online_contact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -256,7 +256,7 @@ MCONTACT Meta_GetMostOnlineSupporting(DBCachedContact *cc, int pflagnum, unsigne if (szProto == nullptr || Proto_GetStatus(szProto) < ID_STATUS_ONLINE) // szProto offline or connecting
continue;
- uint32_t caps = CallProtoService(szProto, PS_GETCAPS, pflagnum, 0);
+ uint32_t caps = CallProtoService(szProto, PS_GETCAPS, pflagnum);
if (capability == -1 || (caps & capability) == capability) {
int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (status == ID_STATUS_ONLINE) {
diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp index 3aa9f1e888..568ee41e5d 100644 --- a/src/mir_app/src/protocols.cpp +++ b/src/mir_app/src/protocols.cpp @@ -188,7 +188,7 @@ static int Proto_ValidTypingContact(MCONTACT hContact, char *szProto) if (!hContact || !szProto)
return 0;
- return (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_SUPPORTTYPING) ? 1 : 0;
+ return (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4) & PF4_SUPPORTTYPING) ? 1 : 0;
}
static INT_PTR Proto_SelfIsTyping(WPARAM wParam, LPARAM lParam)
@@ -226,11 +226,11 @@ static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam) void Proto_SetStatus(const char *szProto, unsigned status)
{
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1) & PF1_MODEMSGSEND) {
ptrW tszAwayMsg((wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGW, status, (LPARAM)szProto));
CallProtoService(szProto, PS_SETAWAYMSG, status, tszAwayMsg);
}
- CallProtoService(szProto, PS_SETSTATUS, status, 0);
+ CallProtoService(szProto, PS_SETSTATUS, status);
}
char** __fastcall Proto_FilesMatrixA(wchar_t **files)
diff --git a/src/mir_app/src/searchresults.cpp b/src/mir_app/src/searchresults.cpp index 3e6ba88ba6..72033c3f18 100644 --- a/src/mir_app/src/searchresults.cpp +++ b/src/mir_app/src/searchresults.cpp @@ -73,7 +73,7 @@ void LoadColumnSizes(HWND hwndResults, const char *szProto) if (i == COLUMNID_HANDLE) {
lvc.pszText = L"ID";
if (szProto) {
- INT_PTR ret = CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT, 0);
+ INT_PTR ret = CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT);
if (ret != CALLSERVICE_NOTFOUND)
lvc.pszText = (wchar_t*)ret;
}
@@ -195,7 +195,7 @@ int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const cha if (!pa->IsEnabled())
continue;
- uint32_t caps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t caps = (uint32_t)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1);
if (!(caps & requiredCapability))
continue;
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index 5941c5b929..ff07e277c0 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -239,7 +239,7 @@ MIR_APP_DLL(HANDLE) Skin_GetProtoIcon(const char *szProto, int status) INT_PTR caps2;
if (szProto == nullptr)
caps2 = -1;
- else if ((caps2 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0)) == CALLSERVICE_NOTFOUND)
+ else if ((caps2 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2)) == CALLSERVICE_NOTFOUND)
caps2 = 0;
if (IsStatusConnecting(status)) {
diff --git a/src/mir_app/src/srmm_log_rtf.cpp b/src/mir_app/src/srmm_log_rtf.cpp index ffc695c6d7..6b81c438d0 100644 --- a/src/mir_app/src/srmm_log_rtf.cpp +++ b/src/mir_app/src/srmm_log_rtf.cpp @@ -252,7 +252,7 @@ INT_PTR CRtfLogWindow::Notify(WPARAM, LPARAM lParam) {
OFDTHREAD *ofd = new OFDTHREAD(hDbEvent, L"", OFD_COPYURL);
ofd->pCallback = new OFD_CopyUrl(blob.getUrl());
- CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)ofd, 0);
+ CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)ofd);
}
break;
diff --git a/src/mir_app/src/srmm_main.cpp b/src/mir_app/src/srmm_main.cpp index 99b54d7f5a..c78da36ffb 100644 --- a/src/mir_app/src/srmm_main.cpp +++ b/src/mir_app/src/srmm_main.cpp @@ -47,7 +47,7 @@ public: { szProto = Proto_GetBaseAccountName(hContact); bDelHistory = ProtoServiceExists(szProto, PS_EMPTY_SRV_HISTORY); - bForEveryone = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_DELETEFORALL) != 0; + bForEveryone = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4) & PF4_DELETEFORALL) != 0; } bool OnInitDialog() override diff --git a/src/mir_app/src/srmm_util.cpp b/src/mir_app/src/srmm_util.cpp index 875d97bad4..f78513cd70 100644 --- a/src/mir_app/src/srmm_util.cpp +++ b/src/mir_app/src/srmm_util.cpp @@ -204,7 +204,7 @@ void DownloadOfflineFile(MCONTACT hContact, MEVENT hDbEvent, DB::EventInfo &dbei else {
OFDTHREAD *ofd = new OFDTHREAD(hDbEvent, blob.getLocalName(), iCommand);
ofd->pCallback = pCallback;
- CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)ofd, 0);
+ CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)ofd);
}
}
@@ -222,7 +222,7 @@ MIR_APP_DLL(void) Srmm_DownloadOfflineFile(MCONTACT hContact, MEVENT hDbEvent, i {
OFDTHREAD *ofd = new OFDTHREAD(hDbEvent, L"", iCommand);
ofd->pCallback = new OFD_CopyUrl(blob.getUrl());
- CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)ofd, 0);
+ CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)ofd);
}
return;
diff --git a/src/mir_app/src/utils.cpp b/src/mir_app/src/utils.cpp index 25ab986618..56f7bdec1b 100644 --- a/src/mir_app/src/utils.cpp +++ b/src/mir_app/src/utils.cpp @@ -346,12 +346,12 @@ bool ProcessFileDrop(HDROP hDrop, MCONTACT hContact) if (szProto == nullptr)
return false;
- int pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ int pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1);
if (!(pcaps & PF1_FILESEND))
return false;
if (Contact::GetStatus(hContact) == ID_STATUS_OFFLINE) {
- pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4);
if (!(pcaps & PF4_OFFLINEFILES))
return false;
}
|