diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-21 09:48:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-21 09:48:22 +0000 |
commit | 8d5ba8b33cad9eb86066fefc29102d2734f4a292 (patch) | |
tree | 8ba73b8a9f72c76b7803249dba47bdec3b421987 | |
parent | 14581eb25783e0ffadb2af430b97074f6f1ec652 (diff) |
improperly named helper renamed
git-svn-id: http://svn.miranda-ng.org/main/trunk@17110 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
68 files changed, 167 insertions, 150 deletions
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index c13dfe190d..7f9d6a3ec2 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -141,8 +141,6 @@ procedure KillModuleServices(hInst:HINST); stdcall; procedure KillObjectServices(var ptr); stdcall;
external CoreDLL name 'KillObjectServices';
-function CallContactService(hContact:TMCONTACT;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; stdcall;
- external AppDLL name 'CallContactService';
function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; stdcall;
external AppDLL name 'CallProtoService';
diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc index 31f9456782..5fb1c39ad7 100644 --- a/include/delphi/m_protocols.inc +++ b/include/delphi/m_protocols.inc @@ -38,9 +38,6 @@ type lParam : LPARAM;
end;
-const
- MS_PROTO_CALLCONTACTSERVICE:PAnsiChar = 'Proto/CallContactService';
-
//a general network 'ack'
//wParam=0
//lParam=(LPARAM)(ACKDATA*)&ack
diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc index 664b8552c6..83e1c2a841 100644 --- a/include/delphi/m_protosvc.inc +++ b/include/delphi/m_protosvc.inc @@ -635,7 +635,7 @@ const }
PS_GETUNREADEMAILCOUNT = '/GetUnreadEmailCount';
-// these should be called with CallContactService()
+// these should be called with ProtoChainSend()
{<</
!IMPORTANT!
diff --git a/include/m_core.h b/include/m_core.h index 04bbacc2af..f4c6fcaea0 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -123,7 +123,6 @@ MIR_CORE_DLL(void) KillModuleServices(HINSTANCE hInst); MIR_CORE_DLL(void) KillObjectServices(void* pObject);
MIR_APP_DLL(int) ProtoServiceExists(LPCSTR szModule, const char *szService);
-MIR_APP_DLL(INT_PTR) CallContactService(MCONTACT, const char*, WPARAM wParam = 0, LPARAM lParam = 0);
MIR_APP_DLL(INT_PTR) CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam = 0, LPARAM lParam = 0);
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_protocols.h b/include/m_protocols.h index 01997885e2..7bfe515eab 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -477,6 +477,12 @@ EXTERN_C MIR_APP_DLL(int) Proto_RemoveFromContact(MCONTACT, const char *szProto) EXTERN_C MIR_APP_DLL(INT_PTR) Proto_ChainSend(int iOrder, CCSDATA *ccs);
+__forceinline INT_PTR ProtoChainSend(MCONTACT hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam)
+{
+ CCSDATA ccs = { hContact, szProtoService, wParam, lParam };
+ return Proto_ChainSend(0, &ccs);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// Call the next service in the chain for this receive operation
// The return value should be returned immediately
diff --git a/plugins/Actman/actman.dpr b/plugins/Actman/actman.dpr index c33478a021..bd2e759ccc 100644 --- a/plugins/Actman/actman.dpr +++ b/plugins/Actman/actman.dpr @@ -185,7 +185,7 @@ var ccs:PCCSDATA;
begin
ccs := PCCSDATA(lParam);
- result := CallContactService(ccs^.hContact, ccs^.szProtoService, ccs^.wParam, ccs^.lParam);
+ result := Proto_ChainSend(0, ccs);
end;
function DoOpenUrl(wParam:WPARAM;lParam:LPARAM):int;cdecl;
diff --git a/plugins/Actman/iac_inout.pas b/plugins/Actman/iac_inout.pas index b5fcbb466a..0626de08f2 100644 --- a/plugins/Actman/iac_inout.pas +++ b/plugins/Actman/iac_inout.pas @@ -88,6 +88,7 @@ var tmp:PWideChar;
blob,p:PAnsiChar;
w:PWideChar;
+ ccs:TCCSDATA;
hContact:TMCONTACT;
wnd:HWND;
fexist:bool;
@@ -272,7 +273,13 @@ begin if DBReadByte(hContact,p,'ChatRoom',0)<>1 then
begin
WidetoUTF8(last,blob);
- CallContactService(hContact,PSS_MESSAGE,0,tlparam(blob));
+
+ ccs.hContact := hContact;
+ ccs.szProtoService := PSS_MESSAGE;
+ ccs.wParam := 0;
+ ccs.lParam := tlparam(blob);
+ Proto_ChainSend(0, @ccs);
+
dbei.cbSize :=sizeof(dbei);
dbei.cbBlob :=StrLen(blob);
dbei.pBlob :=pByte(blob);
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 3acc9154e0..d64914d12f 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -289,16 +289,16 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) db_unset(hContact, "CList", "NotOnList");
if (IsDlgButtonChecked(hdlg, IDC_ADDED))
- CallContactService(hContact, PSS_ADDED, 0, 0);
+ ProtoChainSend(hContact, PSS_ADDED, 0, 0);
if (IsDlgButtonChecked(hdlg, IDC_AUTH)) {
DWORD flags = CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
- CallContactService(hContact, PSS_AUTHREQUEST, 0, 0);
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0);
else {
TCHAR tszReason[512];
GetDlgItemText(hdlg, IDC_AUTHREQ, tszReason, _countof(tszReason));
- CallContactService(hContact, PSS_AUTHREQUEST, 0, (LPARAM)tszReason);
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, (LPARAM)tszReason);
}
}
}
diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp index 3eaa6200f0..3d7d322bf9 100644 --- a/plugins/Boltun/src/actionQueue.cpp +++ b/plugins/Boltun/src/actionQueue.cpp @@ -86,7 +86,7 @@ static void TimerAnswer(MCONTACT hContact, const TalkBot::MessageInfo* info) T2Utf msg(info->Answer.c_str());
size_t bufsize = mir_strlen(msg);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)msg);
DBEVENTINFO dbei = { 0 };
dbei.cbSize = sizeof(dbei);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 9aa3c6326e..2203a20d8d 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -144,7 +144,7 @@ int CheckDate(MCONTACT hContact) void SendPounce(TCHAR *text, MCONTACT hContact)
{
- if (HANDLE hSendId = (HANDLE)CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(text)))
+ if (HANDLE hSendId = (HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(text)))
WindowList_Add(hWindowList, (HWND)hSendId, hContact);
}
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index 0cdae03c29..f18fc05e10 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -92,7 +92,7 @@ static void amThreadProc(void *) HANDLE ACK = 0;
if (pdnce->ApparentMode != ID_STATUS_OFFLINE) //don't ask if contact is always invisible (should be done with protocol)
- ACK = (HANDLE)CallContactService(hContact, PSS_GETAWAYMSG, 0, 0);
+ ACK = (HANDLE)ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0);
if (!ACK) {
ACKDATA ack;
ack.hContact = hContact;
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index cf2ece8265..a36112488e 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -315,7 +315,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA else if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSOFFLINE))
wApparentMode = ID_STATUS_OFFLINE;
- CallContactService(hContact, PSS_SETAPPARENTMODE, (WPARAM)wApparentMode, 0);
+ ProtoChainSend(hContact, PSS_SETAPPARENTMODE, (WPARAM)wApparentMode, 0);
SendMessage(hWnd, WM_USER + 120, 0, 0);
}
}
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index f5454b2f2f..1dd0509bf3 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -785,7 +785,7 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re if (hContact) {
bShouldProcessAcks = TRUE;
- HANDLE hProcess = (HANDLE)CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)message);
+ HANDLE hProcess = (HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message);
const int MAX_COUNT = 60;
int counter = 0;
while (((ack = GetAck(hProcess)) == NULL) && (counter < MAX_COUNT)) {
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 42665b0183..38505ded75 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -114,7 +114,7 @@ void TSendContactsData::AddContact(MCONTACT hContact1) int TSendContactsData::SendContactsPacket(HWND hwndDlg, MCONTACT *phContacts, int nContacts1)
{
- HANDLE hProcc = (HANDLE)CallContactService(hContact, PSS_CONTACTS, MAKEWPARAM(0, nContacts1), (LPARAM)phContacts);
+ HANDLE hProcc = (HANDLE)ProtoChainSend(hContact, PSS_CONTACTS, MAKEWPARAM(0, nContacts1), (LPARAM)phContacts);
if (!hProcc) {
// on trivial error - do not close dialog
ShowErrorDlg(hwndDlg, "Contacts transfer failed!", FALSE);
@@ -293,7 +293,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case MSGERROR_RETRY:// resend timeouted packets
for (int i = 0; i < wndData->uacklist.Count; i++) {
TAckData *lla = g_aAckData.Remove(wndData->uacklist.Items[i]);
- HANDLE hProcc = (HANDLE)CallContactService(wndData->hContact, PSS_CONTACTS, MAKEWPARAM(0, lla->nContacts), (LPARAM)lla->aContacts);
+ HANDLE hProcc = (HANDLE)ProtoChainSend(wndData->hContact, PSS_CONTACTS, MAKEWPARAM(0, lla->nContacts), (LPARAM)lla->aContacts);
if (!hProcc) { // if fatal do not include
wndData->uacklist.Remove(wndData->uacklist.Items[i]);
diff --git a/plugins/Dropbox/src/dropbox_commands.cpp b/plugins/Dropbox/src/dropbox_commands.cpp index 4a369bb7f3..397daecf49 100644 --- a/plugins/Dropbox/src/dropbox_commands.cpp +++ b/plugins/Dropbox/src/dropbox_commands.cpp @@ -15,7 +15,7 @@ void CDropbox::CommandHelp(void *arg) help += "\"/delete <path>\" \t- "; help += T2Utf(TranslateT("deletes file or folder with specified path (\"path\" is relative from root folder)"));
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)help.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)help.GetBuffer());
}
void CDropbox::CommandList(void *arg)
@@ -27,7 +27,7 @@ void CDropbox::CommandList(void *arg) if (path[0] == NULL) {
CMStringA error(FORMAT, T2Utf(TranslateT("\"%s\" command has invalid parameter.\nUse \"/help\" for more info.")), "/share");
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
return;
}
@@ -61,7 +61,7 @@ void CDropbox::CommandList(void *arg) }
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)message.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)message.GetBuffer());
}
void CDropbox::CommandShare(void *arg)
@@ -73,7 +73,7 @@ void CDropbox::CommandShare(void *arg) if (path[0] == NULL) {
CMStringA error(FORMAT, T2Utf(TranslateT("\"%s\" command has invalid parameter.\nUse \"/help\" for more info.")), "/share");
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
return;
}
@@ -96,7 +96,7 @@ void CDropbox::CommandShare(void *arg) CMStringA link = root.at("url").as_string().c_str();
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)link.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)link.GetBuffer());
}
void CDropbox::CommandSearch(void *arg)
@@ -107,7 +107,7 @@ void CDropbox::CommandSearch(void *arg) if (query == NULL) {
CMStringA error(FORMAT, T2Utf(TranslateT("\"%s\" command has invalid parameter.\nUse \"/help\" for more info.")), "/search");
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
return;
}
@@ -141,7 +141,7 @@ void CDropbox::CommandSearch(void *arg) }
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)message.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)message.GetBuffer());
}
void CDropbox::CommandDelete(void *arg)
@@ -153,7 +153,7 @@ void CDropbox::CommandDelete(void *arg) if (path[0] == NULL) {
CMStringA error(FORMAT, T2Utf(TranslateT("\"%s\" command has invalid parameter.\nUse \"/help\" for more info.")), "/delete");
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
return;
}
@@ -167,7 +167,7 @@ void CDropbox::CommandDelete(void *arg) CMStringA message(FORMAT, "%s %s", path, T2Utf(TranslateT("is deleted")));
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
- CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)message.GetBuffer());
+ ProtoChainSend(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)message.GetBuffer());
}
catch (DropboxException &ex)
{
diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index ead7cac8f1..6d6100568f 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -147,7 +147,7 @@ INT_PTR CDropbox::ProtoSendMessage(WPARAM, LPARAM lParam) ProtoBroadcastAck(MODULE, pccsd->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, 0, 0);
char help[1024];
mir_snprintf(help, Translate("\"%s\" is not valid.\nUse \"/help\" for more info."), szMessage);
- CallContactService(GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)help);
+ ProtoChainSend(GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)help);
return 0;
}
diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp index 7976f08985..67994b6e1b 100644 --- a/plugins/Dropbox/src/dropbox_utils.cpp +++ b/plugins/Dropbox/src/dropbox_utils.cpp @@ -118,7 +118,7 @@ void CDropbox::SendToContact(MCONTACT hContact, const TCHAR *data) }
char *message = mir_utf8encodeT(data);
- if (CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)message) != ACKRESULT_FAILED)
+ if (ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message) != ACKRESULT_FAILED)
AddEventToDb(hContact, EVENTTYPE_MESSAGE, DBEF_UTF | DBEF_SENT, (DWORD)mir_strlen(message), (PBYTE)message);
}
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp index c0d4cebc12..cc21b299cc 100644 --- a/plugins/FTPFileYM/src/job_upload.cpp +++ b/plugins/FTPFileYM/src/job_upload.cpp @@ -93,7 +93,7 @@ void UploadJob::autoSend() dbei.cbBlob = (DWORD)mir_strlen(m_szFileLink) + 1;
dbei.pBlob = (PBYTE)m_szFileLink;
db_event_add(m_hContact, &dbei);
- CallContactService(m_hContact, PSS_MESSAGE, 0, (LPARAM)m_szFileLink);
+ ProtoChainSend(m_hContact, PSS_MESSAGE, 0, (LPARAM)m_szFileLink);
CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)m_hContact, 0);
}
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index 8092c804a8..ad2b494846 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -855,7 +855,7 @@ int FILEECHO::sendCmd(int id, int cmd, char *szParam, char *szPrefix) mir_snprintf(buf, buflen, "%s%c%s", szServicePrefix, cCmdList[cmd], szParam);
else
mir_snprintf(buf, buflen, "%s%c%s%s", szServicePrefix, cCmdList[cmd], szPrefix, szParam);
- retval = CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
+ retval = ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
free(buf);
updateProgress();
return retval;
diff --git a/plugins/IEView/src/external_funcs.cpp b/plugins/IEView/src/external_funcs.cpp index 829ebefe36..d5c75e5e89 100644 --- a/plugins/IEView/src/external_funcs.cpp +++ b/plugins/IEView/src/external_funcs.cpp @@ -67,7 +67,7 @@ namespace External WPARAM wParam = Var_To<WPARAM>(pDispParams->rgvarg[1], wType);
LPARAM lParam = Var_To<LPARAM>(pDispParams->rgvarg[0], lType);
- INT_PTR res = CallContactService(hContact, _T2A((TCHAR*)szName), wParam, lParam);
+ INT_PTR res = ProtoChainSend(hContact, _T2A((TCHAR*)szName), wParam, lParam);
if (wType == 'A' || wType == 'U') mir_free((void*)wParam);
if (lType == 'A' || lType == 'U') mir_free((void*)lParam);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 9f8c38e9b6..8ff3733012 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -403,7 +403,7 @@ INT_PTR CALLBACK AuthReqWndProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpara {
TCHAR tszReason[256] = { 0 };
GetDlgItemText(hdlg, IDC_REASON, tszReason, _countof(tszReason));
- CallContactService(hcontact, PSS_AUTHREQUEST, 0, (LPARAM)tszReason);
+ ProtoChainSend(hcontact, PSS_AUTHREQUEST, 0, (LPARAM)tszReason);
} // fall through
case IDCANCEL:
DestroyWindow(hdlg);
@@ -428,7 +428,7 @@ INT_PTR onSendAuthRequest(WPARAM wparam, LPARAM) DWORD flags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags&PF4_NOCUSTOMAUTH)
- CallContactService(hContact, PSS_AUTHREQUEST, 0, (LPARAM)_T(""));
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, (LPARAM)_T(""));
else
CreateDialogParam(hinstance, MAKEINTRESOURCE(IDD_AUTHREQ), pcli->hwndContactList, AuthReqWndProc, (LPARAM)hContact);
@@ -438,7 +438,7 @@ INT_PTR onSendAuthRequest(WPARAM wparam, LPARAM) INT_PTR onSendAdded(WPARAM wparam, LPARAM)
{
MCONTACT hContact = (MCONTACT) wparam;
- CallContactService(hContact, PSS_ADDED, 0, 0);
+ ProtoChainSend(hContact, PSS_ADDED, 0, 0);
return 0;
}
@@ -446,7 +446,7 @@ INT_PTR onSendAdded(WPARAM wparam, LPARAM) INT_PTR onSetInvis(WPARAM wparam, LPARAM)
{
MCONTACT hContact = (MCONTACT) wparam;
- CallContactService(hContact, PSS_SETAPPARENTMODE, (db_get_w(hContact, GetContactProto(hContact), "ApparentMode", 0) == ID_STATUS_OFFLINE) ? 0 : ID_STATUS_OFFLINE, 0);
+ ProtoChainSend(hContact, PSS_SETAPPARENTMODE, (db_get_w(hContact, GetContactProto(hContact), "ApparentMode", 0) == ID_STATUS_OFFLINE) ? 0 : ID_STATUS_OFFLINE, 0);
return 0;
}
@@ -454,7 +454,7 @@ INT_PTR onSetInvis(WPARAM wparam, LPARAM) INT_PTR onSetVis(WPARAM wparam, LPARAM)
{
MCONTACT hContact = (MCONTACT) wparam;
- CallContactService(hContact, PSS_SETAPPARENTMODE, (db_get_w(hContact, GetContactProto(hContact), "ApparentMode", 0) == ID_STATUS_ONLINE) ? 0 : ID_STATUS_ONLINE, 0);
+ ProtoChainSend(hContact, PSS_SETAPPARENTMODE, (db_get_w(hContact, GetContactProto(hContact), "ApparentMode", 0) == ID_STATUS_ONLINE) ? 0 : ID_STATUS_ONLINE, 0);
return 0;
}
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp index 5743be7a08..8c4861580a 100644 --- a/plugins/MirFox/src/MirandaUtils.cpp +++ b/plugins/MirFox/src/MirandaUtils.cpp @@ -286,7 +286,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ HANDLE MirandaUtils::sendMessageMiranda(MCONTACT hContact, char *msgBuffer)
{
- return (HANDLE)CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)msgBuffer);
+ return (HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)msgBuffer);
}
void MirandaUtils::addMessageToDB(MCONTACT hContact, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto)
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp index 707489b24c..ec5dac43bf 100644 --- a/plugins/MirLua/src/m_message.cpp +++ b/plugins/MirLua/src/m_message.cpp @@ -47,7 +47,7 @@ static int message_Send(lua_State *L) mir_free((void*)gce.ptszText);
}
- else if ((res = ::CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)message)) != ACKRESULT_FAILED)
+ else if ((res = ::ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message)) != ACKRESULT_FAILED)
{
DBEVENTINFO dbei;
dbei.cbSize = sizeof(dbei);
diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp index 60f4dd4136..8125247cd2 100644 --- a/plugins/MirOTR/src/otr.cpp +++ b/plugins/MirOTR/src/otr.cpp @@ -138,7 +138,7 @@ extern "C" { DEBUGOUT_T("OTR_GUI_INJECT_MESSAGE\n"); MCONTACT hContact = (UINT_PTR)opdata; if (db_get_w(hContact, protocol, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) - CallContactService(hContact, PSS_MESSAGE, PREF_BYPASS_OTR, (LPARAM)message); + ProtoChainSend(hContact, PSS_MESSAGE, PREF_BYPASS_OTR, (LPARAM)message); } /* When the list of ConnContexts changes (including a change in @@ -383,7 +383,7 @@ extern "C" { TCHAR* tmp = mir_utf8decodeT(message); mir_snwprintf(msg, _countof(msg), TranslateT("The following message received from '%s' was NOT encrypted:\n\n%s"), contact, tmp); mir_free(tmp); - CallContactService(hContact, PSS_MESSAGE, PREF_BYPASS_OTR, (LPARAM)message); + ProtoChainSend(hContact, PSS_MESSAGE, PREF_BYPASS_OTR, (LPARAM)message); break; } case OTRL_MSGEVENT_RCVDMSG_FOR_OTHER_INSTANCE: // title = TranslateT("Received message for a different session"); diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index e5ffaffd22..1ce1f559bb 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -791,7 +791,7 @@ MEVENT CAppletManager::SendMessageToContact(MCONTACT hContact, tstring strMessag memcpy(pJob->pcBuffer, szMsgUtf, pJob->iBufferSize); mir_free(szMsgUtf); - pJob->hEvent = (MEVENT)CallContactService(pJob->hContact, PSS_MESSAGE, 0, (LPARAM)pJob->pcBuffer); + pJob->hEvent = (MEVENT)ProtoChainSend(pJob->hContact, PSS_MESSAGE, 0, (LPARAM)pJob->pcBuffer); CAppletManager::GetInstance()->AddMessageJob(pJob); return pJob->hEvent; } diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index 6b8d51228f..5efa887ed5 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -62,7 +62,7 @@ void __cdecl AutoreplyDelayThread(void *_ad) T2Utf pszReply(ad->Reply);
int ReplyLen = (int)mir_strlen(pszReply);
- CallContactService(ad->hContact, PSS_MESSAGE, 0, (LPARAM)pszReply);
+ ProtoChainSend(ad->hContact, PSS_MESSAGE, 0, (LPARAM)pszReply);
if (g_AutoreplyOptPage.GetDBValueCopy(IDC_REPLYDLG_LOGREPLY)) { // store in the history
DBEVENTINFO dbeo = { 0 };
diff --git a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp index 1be72fc1aa..a095882f72 100644 --- a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp @@ -59,7 +59,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)awayData);
awayData->hContact = lParam;
awayData->hAwayMsgEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, UM_RAM_AWAYMSGACK);
- awayData->hSeq = (HANDLE)CallContactService(awayData->hContact, PSS_GETAWAYMSG, 0, 0);
+ awayData->hSeq = (HANDLE)ProtoChainSend(awayData->hContact, PSS_GETAWAYMSG, 0, 0);
WindowList_Add(g_hReadWndList, hwndDlg, awayData->hContact);
TCHAR str[256], format[128];
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index 7aed434811..f305ee1bd8 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -106,7 +106,7 @@ void QueryAwayMessage(HWND hWnd, PLUGINDATA *pdp) //The following HookEventMessage will hook the ME_PROTO_ACK event and send a WM_AWAYMSG to hWnd when the hooks get notified.
pdp->hAwayMsgHook = HookEventParam(ME_PROTO_ACK, AwayMsgHook, (LPARAM)pdp);
//The following instruction asks Miranda to retrieve the away message and associates a hProcess (handle) to this request. This handle will appear in the ME_PROTO_ACK event.
- pdp->hAwayMsgProcess = (HANDLE)CallContactService(hContact, PSS_GETAWAYMSG, 0, 0);
+ pdp->hAwayMsgProcess = (HANDLE)ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0);
}
}
}
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 61db0a7d0e..e04ccc6e7f 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -170,7 +170,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags)); BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc); return; @@ -208,7 +208,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR if (_terminate) { BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc); break; @@ -249,7 +249,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags)); BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc); return; @@ -278,7 +278,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags)); BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc); return; @@ -311,7 +311,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags)); BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc); return; @@ -354,7 +354,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags)); BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc); return; @@ -588,7 +588,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) string str1 = "-----PGP KEY RESPONSE-----"; str1.append(tmp); - CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)str1.c_str()); + ProtoChainSend(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)str1.c_str()); if (enc_state) db_set_b(ccs->hContact, szGPGModuleName, "GPGEncryption", 1); } @@ -606,7 +606,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps)); if (CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) { - CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); + ProtoChainSend(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); return 0; } } @@ -634,7 +634,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) mir_free(caps); if (str1.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos) { - CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); + ProtoChainSend(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); return 0; } } @@ -672,7 +672,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) if (!tmp[0]) { mir_free(tmp); HistoryLog(hContact, db_event("Failed to encrypt message with GPG (not found key for encryption in db)", 0, 0, DBEF_SENT)); - CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg); + ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg); return; } if (!bJabberAPI || !bIsMiranda09) //force jabber to handle encrypted message by itself @@ -734,12 +734,12 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) params.result = &result; if (!gpg_launcher(params)) { //mir_free(msg); - CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg); + ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg); return; } if (result == pxNotFound) { //mir_free(msg); - CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg); + ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg); return; } } @@ -757,11 +757,11 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) params.code = &code; params.result = &result; if (!gpg_launcher(params)) { - CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg); + ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg); return; } if (result == pxNotFound) { - CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg); + ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg); return; } //TODO: check gpg output for errors @@ -781,7 +781,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) if (out.find("usage: ") != string::npos) { MessageBox(0, TranslateT("Something is wrong, GPG does not understand us, aborting encryption."), TranslateT("Warning"), MB_OK); //mir_free(msg); - CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg); + ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg); if(!bDebugLog) { boost::system::error_code e; @@ -830,7 +830,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) HistoryLog(hContact, db_event("Failed to encrypt message with GPG", 0, 0, DBEF_SENT)); if (bDebugLog) debuglog << std::string(time_str() + ": info: Failed to encrypt message with GPG"); - CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg); + ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg); return; } string str_event = msg; @@ -843,7 +843,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) debuglog << std::string(time_str() + ": adding event to contact: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " on send message."); fix_line_term(str); - sent_msgs.push_back((HANDLE)CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)toUTF8(str).c_str())); + sent_msgs.push_back((HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)toUTF8(str).c_str())); } INT_PTR SendMsgSvc(WPARAM w, LPARAM l) @@ -925,7 +925,7 @@ int HookSendMsg(WPARAM w, LPARAM l) if (CallProtoService(proto2, PS_ICQ_CHECKCAPABILITY, hContact, (LPARAM)&cap)) { if (bDebugLog) debuglog << std::string(time_str() + ": info(autoexchange, icq): sending key requiest, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob); new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact)); return 0; @@ -953,7 +953,7 @@ int HookSendMsg(WPARAM w, LPARAM l) if (str.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos) { if (bDebugLog) debuglog << std::string(time_str() + ": info(autoexchange, jabber): autoexchange capability found, sending key request, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob); new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact)); return 0; diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 0ac2d3bec1..97c5999500 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -168,7 +168,7 @@ INT_PTR SendKey(WPARAM w, LPARAM) if (szMessage[0]) { BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)szMessage); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)szMessage); std::string msg = "Public key "; char *keyid = UniGetContactSettingUtf(NULL, szGPGModuleName, key_id_str.c_str(), ""); if (!keyid[0]) { @@ -1204,7 +1204,7 @@ void send_encrypted_msgs_thread(void *param) list<string>::iterator end = hcontact_data[hContact].msgs_to_send.end(); extern std::list<HANDLE> sent_msgs; for (list<string>::iterator p = hcontact_data[hContact].msgs_to_send.begin(); p != end; ++p) { - sent_msgs.push_back((HANDLE)CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)p->c_str())); + sent_msgs.push_back((HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)p->c_str())); HistoryLog(hContact, db_event((char*)p->c_str(), 0, 0, DBEF_SENT)); boost::this_thread::sleep(boost::posix_time::seconds(1)); } diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index d9ac4e2b13..a9f1a47ece 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -134,7 +134,7 @@ void PasteIt(MCONTACT hContact, int mode) dbei.cbBlob = (DWORD)mir_strlen(pasteToWeb->szFileLink) + 1;
dbei.pBlob = (PBYTE)pasteToWeb->szFileLink;
db_event_add(hContact, &dbei);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)pasteToWeb->szFileLink);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)pasteToWeb->szFileLink);
}
else
{
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 9420cf4e77..d0db367d5a 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -840,7 +840,7 @@ LRESULT CALLBACK ReplyEditWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM {
T2Utf buf(msg);
- CallContactService(dat->hContact, PSS_MESSAGE, 0, buf);
+ ProtoChainSend(dat->hContact, PSS_MESSAGE, 0, buf);
AddMessageToDB(dat->hContact, buf);
}
// fall through
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp index 1b2b358bdb..908056ee08 100644 --- a/plugins/Scriver/src/sendqueue.cpp +++ b/plugins/Scriver/src/sendqueue.cpp @@ -181,5 +181,5 @@ void SendSendQueueItem(MessageSendQueueItem* item) }
lock.unlock();
- item->hSendId = (HANDLE)CallContactService(item->hContact, PSS_MESSAGE, item->flags, (LPARAM)item->sendBuffer);
+ item->hSendId = (HANDLE)ProtoChainSend(item->hContact, PSS_MESSAGE, item->flags, (LPARAM)item->sendBuffer);
}
diff --git a/plugins/SecureIM/src/crypt_misc.cpp b/plugins/SecureIM/src/crypt_misc.cpp index 097ce2b873..dfda8a284a 100644 --- a/plugins/SecureIM/src/crypt_misc.cpp +++ b/plugins/SecureIM/src/crypt_misc.cpp @@ -25,7 +25,7 @@ static void sttWaitForExchange(LPVOID param) Sent_NetLog("Sent (unencrypted) message from queue: %s", ptrMessage->Message);
// send unencrypted messages
- CallContactService(ptr->hContact, PSS_MESSAGE, (WPARAM)ptrMessage->wParam | PREF_METANODB, (LPARAM)ptrMessage->Message);
+ ProtoChainSend(ptr->hContact, PSS_MESSAGE, (WPARAM)ptrMessage->wParam | PREF_METANODB, (LPARAM)ptrMessage->Message);
mir_free(ptrMessage->Message);
pWM tmp = ptrMessage;
ptrMessage = ptrMessage->nextMessage;
@@ -45,7 +45,7 @@ static void sttWaitForExchange(LPVOID param) Sent_NetLog("Sent (encrypted) message from queue: %s", ptrMessage->Message);
// send unencrypted messages
- CallContactService(ptr->hContact, PSS_MESSAGE, (WPARAM)ptrMessage->wParam | PREF_METANODB, (LPARAM)ptrMessage->Message);
+ ProtoChainSend(ptr->hContact, PSS_MESSAGE, (WPARAM)ptrMessage->wParam | PREF_METANODB, (LPARAM)ptrMessage->Message);
mir_free(ptrMessage->Message);
pWM tmp = ptrMessage;
ptrMessage = ptrMessage->nextMessage;
diff --git a/plugins/SecureIM/src/splitmsg.cpp b/plugins/SecureIM/src/splitmsg.cpp index c502c5c16f..db0cf190a2 100644 --- a/plugins/SecureIM/src/splitmsg.cpp +++ b/plugins/SecureIM/src/splitmsg.cpp @@ -102,7 +102,7 @@ int splitMessageSend(pUinKey ptr, LPSTR szMsg) while (*buf) {
len = (int)mir_strlen(buf);
LPSTR tmp = mir_strdup(buf);
- ret = CallContactService(ptr->hContact, PSS_MESSAGE, (WPARAM)PREF_METANODB, (LPARAM)tmp);
+ ret = ProtoChainSend(ptr->hContact, PSS_MESSAGE, (WPARAM)PREF_METANODB, (LPARAM)tmp);
mir_free(tmp);
buf += len + 1;
}
@@ -110,5 +110,5 @@ int splitMessageSend(pUinKey ptr, LPSTR szMsg) return ret;
}
- return (int)CallContactService(ptr->hContact, PSS_MESSAGE, (WPARAM)PREF_METANODB, (LPARAM)szMsg);
+ return (int)ProtoChainSend(ptr->hContact, PSS_MESSAGE, (WPARAM)PREF_METANODB, (LPARAM)szMsg);
}
diff --git a/plugins/SecureIM/src/svcs_menu.cpp b/plugins/SecureIM/src/svcs_menu.cpp index a5df00082b..79c12b0b83 100644 --- a/plugins/SecureIM/src/svcs_menu.cpp +++ b/plugins/SecureIM/src/svcs_menu.cpp @@ -7,13 +7,13 @@ INT_PTR __cdecl Service_IsContactSecured(WPARAM wParam, LPARAM) INT_PTR __cdecl Service_CreateIM(WPARAM wParam, LPARAM)
{
- CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
+ ProtoChainSend(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
return 1;
}
INT_PTR __cdecl Service_DisableIM(WPARAM wParam, LPARAM)
{
- CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
+ ProtoChainSend(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
return 1;
}
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index b2524bf315..01daca3cd9 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -82,7 +82,7 @@ void CSend::SetContact(MCONTACT hContact) //--------------------------------------------------------------------------- /*bool CSend::hasCap(unsigned int Flag) { - return (Flag & CallContactService(m_hContact, PS_GETCAPS, PFLAGNUM_1, NULL)) == Flag; + return (Flag & ProtoChainSend(m_hContact, PS_GETCAPS, PFLAGNUM_1, NULL)) == Flag; }// */ //--------------------------------------------------------------------------- @@ -263,7 +263,7 @@ void CSend::svcSendMsgExit(const char* szMessage) m_hOnSend = HookEventObj(ME_PROTO_ACK, OnSend, this); } //start PSS_MESSAGE service - m_hSend = (HANDLE)CallContactService(m_hContact, PSS_MESSAGE, NULL, ptrA(mir_utf8encode(m_szEventMsg))); + m_hSend = (HANDLE)ProtoChainSend(m_hContact, PSS_MESSAGE, NULL, ptrA(mir_utf8encode(m_szEventMsg))); // check we actually got an ft handle back from the protocol if (!m_hSend) { Unhook(); @@ -311,7 +311,7 @@ void CSend::svcSendFileExit() TCHAR* pDesc = mir_tstrdup(m_pszFileDesc); ppFile[0] = mir_tstrdup(m_pszFile); ppFile[1] = NULL; - m_hSend = (HANDLE)CallContactService(m_hContact, PSS_FILE, (WPARAM)pDesc, (LPARAM)ppFile); + m_hSend = (HANDLE)ProtoChainSend(m_hContact, PSS_FILE, (WPARAM)pDesc, (LPARAM)ppFile); mir_free(pDesc); mir_free(ppFile[0]); diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index d980a4298a..5ec1972ca5 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -214,7 +214,7 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent) else ptszTemp = Utils_ReplaceVarsT(ptszTemp2);
T2Utf pszUtf(ptszTemp);
- CallContactService(hContact, PSS_MESSAGE, 0, pszUtf);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, pszUtf);
dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 1671584e39..c8b0f37e56 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -75,7 +75,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
dat->hContact = lParam;
- dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
+ dat->hSeq = (HANDLE)ProtoChainSend(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL;
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
{
@@ -199,7 +199,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
dat->hContact = lParam;
- dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
+ dat->hSeq = (HANDLE)ProtoChainSend(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL;
WindowList_Add(hWindowList2, hwndDlg, dat->hContact);
TCHAR *contactName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index 6ce5f16438..c007f71d43 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -159,7 +159,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) db_unset(hContact, "CList", "Delete");
if (_getOptB("ReplyOnSuccess", defaultReplyOnSuccess) && (_getCOptB(hContact, "MsgSent", 0))) {
T2Utf response(_getOptS(buf, buflen, "SuccessResponse", defaultSuccessResponse));
- CallContactService(hContact, PSS_MESSAGE, 0, response);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, response);
}
return 0;
}
@@ -225,7 +225,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) db_unset(hContact, "CList", "ResponseNum");
if (_getOptB("ReplyOnSuccess", defaultReplyOnSuccess)) {
T2Utf response(_getOptS(buf, buflen, "SuccessResponse", defaultSuccessResponse));
- CallContactService(hContact, PSS_MESSAGE, 0, response);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, response);
}
_notify(hContact, POPUP_APPROVED, TranslateT("Contact %s approved."), NULL);
@@ -353,7 +353,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) else
_getOptS(challengeW, maxmsglen, "Challenge", defaultChallenge);
ReplaceVars(challengeW, maxmsglen);
- CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
_notify(hContact, POPUP_CHALLENGE, TranslateT("Sending plain challenge to %s."), message);
break;
@@ -368,7 +368,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) _setCOptD(hContact, "ResponseNum", _getCOptD(hContact, "ResponseNum", -1) + 1);
ReplaceVarsNum(challengeW, maxmsglen, _getCOptD(hContact, "ResponseNum", 0));
- CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
_notify(hContact, POPUP_CHALLENGE, TranslateT("Sending round-robin challenge to %s."), message);
break;
@@ -381,7 +381,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) srand(time(NULL));
_setCOptD(hContact, "ResponseNum", rand() % get_response_num(buf));
ReplaceVarsNum(challengeW, maxmsglen, _getCOptD(hContact, "ResponseNum", 0));
- CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
_notify(hContact, POPUP_CHALLENGE, TranslateT("Sending random challenge to %s."), message);
break;
@@ -395,7 +395,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) _getOptS(challengeW, maxmsglen, "ChallengeMath", defaultChallengeMath);
ReplaceVar(challengeW, maxmsglen, _T("%mathexpr%"), mexpr);
_setCOptD(hContact, "ResponseMath", a + b);
- CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
_notify(hContact, POPUP_CHALLENGE, TranslateT("Sending math expression challenge to %s."), message);
break;
}
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index c1aa915c5c..81a31bda8e 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -61,7 +61,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, hContact, hDbEvent) } if (msg) { ptrA buff(mir_utf8encodeW(variables_parse(gbAuthRepl, hcntct).c_str())); - CallContactService(hcntct, PSS_MESSAGE, 0, (LPARAM)buff); + ProtoChainSend(hcntct, PSS_MESSAGE, 0, (LPARAM)buff); } return 1; } @@ -177,7 +177,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // for notICQ protocols or disable auto auth. reqwest if ((Stricmp(_T("ICQ"), prot.c_str())) || (!gbAutoReqAuth)) { char * buf = mir_utf8encodeW(variables_parse(gbCongratulation, hContact).c_str()); - CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)buf); + ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf); mir_free(buf); } // Note: For ANSI can be not work @@ -193,7 +193,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) }; // auto auth. reqwest with send congratulation if (gbAutoReqAuth) - CallContactService(hContact, PSS_AUTHREQUEST, 0, (LPARAM)variables_parse(gbCongratulation, hContact).c_str()); + ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, (LPARAM)variables_parse(gbCongratulation, hContact).c_str()); } } return 0; @@ -270,7 +270,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) else q += variables_parse(gbQuestion, hContact); - CallContactService(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeW(q.c_str()))); + ProtoChainSend(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeW(q.c_str()))); // increment question count DWORD questCount = db_get_dw(hContact, pluginName, "QuestionCount", 0); diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index a7cdf9ed0f..a4996d034a 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -28,7 +28,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) if (db_get_b(hcntct, "CList", "NotOnList", 0) && !db_get_b(hcntct, pluginName, answeredSetting, 0) && !IsExistMyMessage(hcntct)) {
if (!plSets->HandleAuthReq.Get()) {
char *buf = mir_utf8encodeW(variables_parse(plSets->AuthRepl.Get(), hcntct).c_str());
- CallContactService(hcntct, PSS_MESSAGE, 0, (LPARAM)buf);
+ ProtoChainSend(hcntct, PSS_MESSAGE, 0, (LPARAM)buf);
mir_free(buf);
}
@@ -121,7 +121,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // send congratulation
char * buf = mir_utf8encodeW(variables_parse(plSets->Congratulation.Get(), hContact).c_str());
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
mir_free(buf);
// process the event
@@ -141,7 +141,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) char * buf = mir_utf8encodeW(q.c_str());
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
mir_free(buf);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 2bff3d0ad3..45bdb71c22 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2379,7 +2379,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (job->hSendId == 0 && job->hContact == 0)
break;
- job->hSendId = (HANDLE)CallContactService(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)job->szSendBuffer);
+ job->hSendId = (HANDLE)ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)job->szSendBuffer);
resent++;
}
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 4fbcfc8fcd..068c0baab7 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -404,7 +404,7 @@ int CSendLater::sendIt(CSendLaterJob *job) job->iSendCount++;
job->hTargetContact = hContact;
job->bCode = CSendLaterJob::JOB_WAITACK;
- job->hProcess = (HANDLE)CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)job->sendBuffer);
+ job->hProcess = (HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)job->sendBuffer);
return 0;
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 428883a1da..616f1e76c9 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -154,7 +154,7 @@ static void DoSplitSendA(LPVOID param) char savedChar = *szSaved; *szSaved = 0; - int id = CallContactService(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); + int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); if (!fFirstSend) { job->hSendId = (HANDLE)id; fFirstSend = TRUE; @@ -168,7 +168,7 @@ static void DoSplitSendA(LPVOID param) } } else { - int id = CallContactService(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); + int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); if (!fFirstSend) { job->hSendId = (HANDLE)id; fFirstSend = TRUE; @@ -283,7 +283,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) clearJob(iEntry); return 0; } - m_jobs[iEntry].hSendId = (HANDLE)CallContactService(dat->hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer); + m_jobs[iEntry].hSendId = (HANDLE)ProtoChainSend(dat->hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer); if (dat->sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks ACKDATA ack = { 0 }; diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 6f6f8d47ef..42fb11a362 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -55,7 +55,7 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) if (opt.bWaitForStatusMsg && !bStatusMsgReady)
{
db_unset(hContact, MODULE, "TempStatusMsg");
- if (CanRetrieveStatusMsg(hContact, szProto) && CallContactService(hContact, PSS_GETAWAYMSG, 0, 0))
+ if (CanRetrieveStatusMsg(hContact, szProto) && ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0))
{
if (WaitForContentTimerID)
KillTimer(0, WaitForContentTimerID);
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 1c6ae40d88..070583c60b 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -229,7 +229,7 @@ TCHAR* GetStatusMessageText(MCONTACT hContact) if (!swzMsg) { if (CanRetrieveStatusMsg(hContact, szProto)) - if (CallContactService(hContact, PSS_GETAWAYMSG, 0, 0)) + if (ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0)) return NULL; if (!db_get_ts(hContact, "CList", "StatusMsg", &dbv)) { diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index f5f6a127ba..409f33f87a 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -1564,7 +1564,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar // call the services
for (int i = 0; i < pPs->nSubContacts; i++)
- if (!CallContactService(pPs->infosUpdated[pPs->nSubContacts].hContact, PSS_GETINFO, NULL, NULL))
+ if (!ProtoChainSend(pPs->infosUpdated[pPs->nSubContacts].hContact, PSS_GETINFO, NULL, NULL))
bDo = TRUE;
if (bDo) {
@@ -1574,7 +1574,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar }
}
}
- else if (!CallContactService(pPs->hContact, PSS_GETINFO, NULL, NULL)) {
+ else if (!ProtoChainSend(pPs->hContact, PSS_GETINFO, NULL, NULL)) {
pPs->infosUpdated = (TAckInfo *)mir_calloc(sizeof(TAckInfo));
pPs->infosUpdated[0].hContact = pPs->hContact;
pPs->nSubContacts = 1;
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index c7365289f7..c9b67be6e6 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -637,7 +637,7 @@ class CContactUpdater : public CContactQueue if (IsProtoOnline(pszProto))
{
int i;
- for (i = 0; i < 3 && CallContactService(hContact, PSS_GETINFO, 0, 0); i++)
+ for (i = 0; i < 3 && ProtoChainSend(hContact, PSS_GETINFO, 0, 0); i++)
{
Sleep(3000);
}
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas index cd8d52a79d..7db8c1e058 100644 --- a/plugins/Watrack/proto/proto.pas +++ b/plugins/Watrack/proto/proto.pas @@ -86,6 +86,7 @@ const bufsize = 4096*SizeOf(WideChar);
var
ccs:PCCSDATA;
+ ccdata:TCCSDATA;
s:pWideChar;
buf:PWideChar;
data:PByte;
@@ -182,7 +183,12 @@ begin if (HistMask and hmOutInfo)<>0 then
AddEvent(ccs^.hContact,EVENTTYPE_WAT_ANSWER,DBEF_SENT,data,dataSize);
- CallContactService(ccs^.hContact,PSS_MESSAGE,0,tlparam(encbuf));
+
+ ccdata.hContact := ccs^.hContact;
+ ccdata.szProtoService := PSS_MESSAGE;
+ ccdata.wParam := 0;
+ ccdata.lParam := tlparam(encbuf);
+ Proto_ChainSend(0, @ccdata);
mFreeMem(encbuf);
end
else
@@ -190,7 +196,11 @@ begin WideToUTF8(textpos,encodedStr);
if (HistMask and hmOutInfo)<>0 then
AddEvent(ccs^.hContact,EVENTTYPE_WAT_MESSAGE,DBEF_SENT or DBEF_UTF,encodedStr,StrLen(encodedStr));
- CallContactService(ccs^.hContact,PSS_MESSAGE,0,tlparam(encodedStr));
+ ccdata.hContact := ccs^.hContact;
+ ccdata.szProtoService := PSS_MESSAGE;
+ ccdata.wParam := 0;
+ ccdata.lParam := tlparam(encodedStr);
+ Proto_ChainSend(0, @ccdata);
mFreeMem(encodedStr);
end;
end;
@@ -211,7 +221,11 @@ begin pc:=PAnsiChar(buf)+Length(wpError);
end;
StrCopy(pc,'Sorry, but you have no permission to obtain this info!');
- CallContactService(ccs^.hContact,PSS_MESSAGE,0,tlparam(buf));
+ ccdata.hContact := ccs^.hContact;
+ ccdata.szProtoService := PSS_MESSAGE;
+ ccdata.wParam := 0;
+ ccdata.lParam := tlparam(buf);
+ Proto_ChainSend(0, @ccdata);
if (HistMask and hmOutError)<>0 then
begin
AddEvent(ccs^.hContact,EVENTTYPE_WAT_ERROR,DBEF_SENT,nil,0,
@@ -249,12 +263,6 @@ begin if (HistMask and hmInError)<>0 then
AddEvent(ccs^.hContact,EVENTTYPE_WAT_ERROR,DBEF_READ,nil,0,
PPROTORECVEVENT(ccs^.lParam)^.Timestamp);
-{
- AnsiToWide(PAnsiChar(CallService(MS_CLIST_GETCONTACTDISPLAYNAME,ccs^.hContact,0)),s);
- StrCopyW(buf,s);
- StrCatW (buf,TranslateW(' answer you'));
- mFreeMem(s);
-}
MessageBoxA(0,Translate(PPROTORECVEVENT(ccs^.lParam)^.szMessage.a+Length(wpError)),
Translate('You Get Error'),MB_ICONERROR);
end
@@ -266,11 +274,18 @@ end; function SendRequest(hContact:WPARAM;lParam:LPARAM):int_ptr; cdecl;
var
buf:array [0..2047] of AnsiChar;
+ ccdata:TCCSDATA;
begin
result:=0;
StrCopy(buf,wpRequest);
StrCopy(buf+Length(wpRequest),SendRequestText);
- CallContactService(hContact,PSS_MESSAGE,0,tlparam(@buf));
+
+ ccdata.hContact := hContact;
+ ccdata.szProtoService := PSS_MESSAGE;
+ ccdata.wParam := 0;
+ ccdata.lParam := tlparam(@buf);
+ Proto_ChainSend(0, @ccdata);
+
if (HistMask and hmOutRequest)<>0 then
AddEvent(hContact,EVENTTYPE_WAT_REQUEST,DBEF_SENT,nil,0);
end;
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index 46a8a173a6..f6d27f5a5f 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -196,7 +196,7 @@ void __cdecl RefreshUserDetailsWorkerThread(void*) MCONTACT hContact = db_find_first();
while (hContact != NULL) {
- CallContactService(hContact, PSS_GETINFO, 0, 0);
+ ProtoChainSend(hContact, PSS_GETINFO, 0, 0);
hContact = db_find_next(hContact);
if (hContact)
Sleep(delay); //sleep for a few seconds between requests
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index a39708cbce..8756f19d86 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -199,7 +199,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent) strncpy(szMsgPart, szBuf, cbPortion);
szMsgPart[cbPortion] = 0;
- HANDLE hMsgProc = (HANDLE)CallContactService(hForwardTo, PSS_MESSAGE, 0, (LPARAM)szMsgPart);
+ HANDLE hMsgProc = (HANDLE)ProtoChainSend(hForwardTo, PSS_MESSAGE, 0, (LPARAM)szMsgPart);
MESSAGE_PROC* msgProc = (MESSAGE_PROC*)mir_alloc(sizeof(MESSAGE_PROC));
msgProc->hProcess = hMsgProc;
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index e14e68d3b6..e2c4fcd5b7 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -20,7 +20,7 @@ INT_PTR CSteamProto::MenuChooseService(WPARAM wParam, LPARAM lParam) int CSteamProto::AuthRequestCommand(WPARAM hContact, LPARAM)
{
- CallContactService(hContact, PSS_AUTHREQUEST, 0, 0);
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0);
return 0;
}
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 14a21a619e..e2985504b8 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -656,7 +656,7 @@ INT_PTR __cdecl CVkProto::SvcAddAsFriend(WPARAM hContact, LPARAM) LONG userID = getDword(hContact, "ID", -1);
if (!IsOnline() || userID == -1 || userID == VK_FEED_USER)
return 1;
- CallContactService(hContact, PSS_AUTHREQUEST, 0, (LPARAM)TranslateT("Please authorize me to add you to my friend list."));
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, (LPARAM)TranslateT("Please authorize me to add you to my friend list."));
return 0;
}
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp index 3a12064e55..2efff40a04 100644 --- a/src/core/stdaway/src/awaymsg.cpp +++ b/src/core/stdaway/src/awaymsg.cpp @@ -51,7 +51,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP if (dat->hContact == NULL)
dat->hContact = lParam;
dat->hAwayMsgEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG);
- dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
+ dat->hSeq = (HANDLE)ProtoChainSend(dat->hContact, PSS_GETAWAYMSG, 0, 0);
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
{
TCHAR str[256], format[128];
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index cbed678e37..637ab19208 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -340,7 +340,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l break;
case IDCANCEL:
- if (dat->fs) CallContactService(dat->hContact, PSS_FILEDENY, (WPARAM)dat->fs, (LPARAM)TranslateT("Canceled"));
+ if (dat->fs) ProtoChainSend(dat->hContact, PSS_FILEDENY, (WPARAM)dat->fs, (LPARAM)TranslateT("Canceled"));
dat->fs = NULL; /* the protocol will free the handle */
DestroyWindow(hwndDlg);
break;
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index 347fc79a56..e8f4d1212b 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -236,7 +236,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (dat->send) { if (db_mc_isMeta(dat->hContact)) dat->hContact = db_mc_getMostOnline(dat->hContact); - dat->fs = (HANDLE)CallContactService(dat->hContact, PSS_FILE, (WPARAM)dat->szMsg, (LPARAM)dat->files); + dat->fs = (HANDLE)ProtoChainSend(dat->hContact, PSS_FILE, (WPARAM)dat->szMsg, (LPARAM)dat->files); SetFtStatus(hwndDlg, LPGENT("Request sent, waiting for acceptance..."), FTS_TEXT); SetOpenFileButtonStyle(GetDlgItem(hwndDlg, IDC_OPENFILE), 1); dat->waitingForAcceptance = 1; @@ -246,7 +246,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR } else { //recv CreateDirectoryTreeT(dat->szSavePath); - dat->fs = (HANDLE)CallContactService(dat->hContact, PSS_FILEALLOW, (WPARAM)dat->fs, (LPARAM)dat->szSavePath); + dat->fs = (HANDLE)ProtoChainSend(dat->hContact, PSS_FILEALLOW, (WPARAM)dat->fs, (LPARAM)dat->szSavePath); dat->transferStatus.tszWorkingDir = mir_tstrdup(dat->szSavePath); if (db_get_b(dat->hContact, "CList", "NotOnList", 0)) dat->resumeBehaviour = FILERESUME_ASK; else dat->resumeBehaviour = db_get_b(NULL, "SRFile", "IfExists", FILERESUME_ASK); @@ -462,7 +462,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR switch (pfr->action) { case FILERESUME_CANCEL: - if (dat->fs) CallContactService(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0); + if (dat->fs) ProtoChainSend(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0); dat->fs = NULL; mir_free(szOriginalFilename); if (pfr->szFilename) mir_free((char*)pfr->szFilename); @@ -742,7 +742,7 @@ void FreeFileDlgData(FileDlgData* dat) return; if (dat->fs) - CallContactService(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0); + ProtoChainSend(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0); if (dat->hPreshutdownEvent) UnhookEvent(dat->hPreshutdownEvent); if (dat->hNotifyEvent) diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 9e43d2cf48..ce327aad3a 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -82,7 +82,7 @@ int SendMessageDirect(const TCHAR *szMsg, MCONTACT hContact, char*) if (db_mc_isMeta(hContact))
hContact = db_mc_getSrmmSub(hContact);
- int sendId = CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)sendBuffer);
+ int sendId = ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)sendBuffer);
msgQueue_add(hContact, sendId, sendBuffer.detach(), flags);
return sendId;
}
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 23009dcaa5..97948126df 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -343,7 +343,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP dat->updateAnimFrame = 0;
GetDlgItemText(hwndDlg, IDC_UPDATING, dat->szUpdating, _countof(dat->szUpdating));
SendMessage(hwndDlg, M_CHECKONLINE, 0, 0);
- if (!CallContactService(dat->hContact, PSS_GETINFO, SGIF_ONOPEN, 0)) {
+ if (!ProtoChainSend(dat->hContact, PSS_GETINFO, SGIF_ONOPEN, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), FALSE);
SetTimer(hwndDlg, 1, 100, NULL);
}
@@ -565,7 +565,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP dat->infosUpdated = NULL;
}
if (dat->hContact != NULL) {
- if (!CallContactService(dat->hContact, PSS_GETINFO, 0, 0)) {
+ if (!ProtoChainSend(dat->hContact, PSS_GETINFO, 0, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), FALSE);
ShowWindow(GetDlgItem(hwndDlg, IDC_UPDATING), SW_SHOW);
SetTimer(hwndDlg, 1, 100, NULL);
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp index 0a712d6833..34d314ef62 100644 --- a/src/mir_app/src/addcontact.cpp +++ b/src/mir_app/src/addcontact.cpp @@ -209,14 +209,14 @@ public: db_unset(hContact, "CList", "NotOnList");
if (m_chkAdded.GetState())
- CallContactService(hContact, PSS_ADDED, 0, 0);
+ ProtoChainSend(hContact, PSS_ADDED, 0, 0);
if (m_chkAuth.GetState()) {
DWORD flags = CallProtoServiceInt(NULL, m_acs.szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
- CallContactService(hContact, PSS_AUTHREQUEST, 0, 0);
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0);
else
- CallContactService(hContact, PSS_AUTHREQUEST, 0, ptrT(m_authReq.GetText()));
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, ptrT(m_authReq.GetText()));
}
if (m_chkOpen.GetState())
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 083352ddf7..afe24c34e7 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -66,11 +66,13 @@ void fnClcOptionsChanged(void) /////////////////////////////////////////////////////////////////////////////////////////
// standard CLC services
+extern bool g_bGroupsLocked;
+
static int ClcSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
if (hContact == NULL) {
- if (!strcmp(cws->szModule, "CListGroups"))
+ if (!strcmp(cws->szModule, "CListGroups") && !g_bGroupsLocked)
Clist_Broadcast(INTM_GROUPSCHANGED, hContact, lParam);
return 0;
}
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp index dd4d23571a..a903646839 100644 --- a/src/mir_app/src/clistgroups.cpp +++ b/src/mir_app/src/clistgroups.cpp @@ -73,6 +73,7 @@ static CGroupList arByIds; /////////////////////////////////////////////////////////////////////////////////////////
HANDLE hGroupChangeEvent;
+bool g_bGroupsLocked = false;
static mir_cs csGroups;
@@ -295,6 +296,7 @@ MIR_APP_DLL(int) Clist_GroupMoveBefore(MGROUP hGroup, MGROUP hGroupBefore) }
}
+ g_bGroupsLocked = true;
arByIds.remove(pGroup);
for (int i = shuffleFrom; i != shuffleTo; i += shuffleStep) {
@@ -307,6 +309,7 @@ MIR_APP_DLL(int) Clist_GroupMoveBefore(MGROUP hGroup, MGROUP hGroupBefore) pGroup->save();
arByIds.insert(pGroup);
+ g_bGroupsLocked = false;
return shuffleTo + 1;
}
@@ -371,7 +374,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) }
}
}
- cli.pfnInitAutoRebuild(cli.hwndContactTree);
+ Clist_BroadcastAsync(CLM_AUTOREBUILD, 0, 0);
}
const CLISTGROUPCHANGE grpChg = { sizeof(grpChg), oldName, (TCHAR*)szName };
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index 0e245c4d63..0e452807de 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -121,7 +121,7 @@ TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode) return tszDisplayName.detach();
}
- CallContactService(hContact, PSS_GETINFO, SGIF_MINIMAL, 0);
+ ProtoChainSend(hContact, PSS_GETINFO, SGIF_MINIMAL, 0);
TCHAR *buffer = TranslateT("(Unknown contact)");
return (cacheEntry == NULL) ? mir_tstrdup(buffer) : buffer;
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index 6540a39b67..a4c9d1988b 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -259,7 +259,7 @@ INT_PTR Meta_SendMessage(WPARAM wParam, LPARAM lParam) char *proto = GetContactProto(hMostOnline);
Meta_SetNick(proto); // (no matter what was there before)
- return CallContactService(ccs->hContact, PSS_MESSAGE, ccs->wParam, ccs->lParam);
+ return ProtoChainSend(ccs->hContact, PSS_MESSAGE, ccs->wParam, ccs->lParam);
}
/** Called when an ACK is received.
@@ -724,7 +724,7 @@ INT_PTR Meta_FileSend(WPARAM, LPARAM lParam) char *proto = GetContactProto(hMostOnline);
if (proto)
- return CallContactService(hMostOnline, PSS_FILE, ccs->wParam, ccs->lParam);
+ return ProtoChainSend(hMostOnline, PSS_FILE, ccs->wParam, ccs->lParam);
return 0; // fail
}
@@ -745,7 +745,7 @@ INT_PTR Meta_GetAwayMsg(WPARAM, LPARAM lParam) return 0;
ccs->hContact = hMostOnline;
- return CallContactService(ccs->hContact, PSS_GETAWAYMSG, ccs->wParam, ccs->lParam);
+ return ProtoChainSend(ccs->hContact, PSS_GETAWAYMSG, ccs->wParam, ccs->lParam);
}
INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam)
@@ -810,7 +810,7 @@ INT_PTR Meta_GetInfo(WPARAM, LPARAM lParam) if (!ProtoServiceExists(proto, PSS_GETINFO))
return 0; // fail
- return CallContactService(ccs->hContact, PSS_GETINFO, ccs->wParam, ccs->lParam);
+ return ProtoChainSend(ccs->hContact, PSS_GETINFO, ccs->wParam, ccs->lParam);
}
int Meta_CallMostOnline(WPARAM hContact, LPARAM)
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 6f5048578f..b8ffebf951 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -1,7 +1,6 @@ LIBRARY mir_app.mir
EXPORTS
-CallContactService @1
CallProtoService @2
Skin_LoadProtoIcon @4
Skin_LoadIcon @5
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 6f48beb92d..9ac85f12c7 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -1,7 +1,6 @@ LIBRARY mir_app.mir
EXPORTS
-CallContactService @1
CallProtoService @2
Skin_LoadProtoIcon @4
Skin_LoadIcon @5
diff --git a/src/mir_app/src/proto_chains.cpp b/src/mir_app/src/proto_chains.cpp index 2bfc143f43..42d34cad15 100644 --- a/src/mir_app/src/proto_chains.cpp +++ b/src/mir_app/src/proto_chains.cpp @@ -89,14 +89,6 @@ MIR_APP_DLL(INT_PTR) Proto_ChainSend(int iOrder, CCSDATA *ccs) /////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(INT_PTR) CallContactService(MCONTACT hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam)
-{
- CCSDATA ccs = { hContact, szProtoService, wParam, lParam };
- return Proto_ChainSend(0, &ccs);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
INT_PTR stubChainRecv(WPARAM wParam, LPARAM lParam)
{
CCSDATA *ccs = (CCSDATA*)lParam;
diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp index 930e3c1805..6f2e540a84 100644 --- a/src/mir_app/src/visibility.cpp +++ b/src/mir_app/src/visibility.cpp @@ -244,13 +244,13 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP for (int i = 0; i < 2; i++) {
int iImage = SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, 0));
if (iImage == i + 1) {
- CallContactService(hContact, PSS_SETAPPARENTMODE, iImage == 1 ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE, 0);
+ ProtoChainSend(hContact, PSS_SETAPPARENTMODE, iImage == 1 ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE, 0);
set = 1;
break;
}
}
if (!set)
- CallContactService(hContact, PSS_SETAPPARENTMODE, 0, 0);
+ ProtoChainSend(hContact, PSS_SETAPPARENTMODE, 0, 0);
}
return TRUE;
}
|