summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ContactsPlus/main.cpp4
-rw-r--r--plugins/ContactsPlus/receive.cpp8
-rw-r--r--plugins/ContactsPlus/send.cpp6
-rw-r--r--plugins/ContactsPlus/utils.cpp31
-rw-r--r--plugins/ContactsPlus/utils.h4
5 files changed, 11 insertions, 42 deletions
diff --git a/plugins/ContactsPlus/main.cpp b/plugins/ContactsPlus/main.cpp
index fff3770566..9316e2ed54 100644
--- a/plugins/ContactsPlus/main.cpp
+++ b/plugins/ContactsPlus/main.cpp
@@ -136,7 +136,7 @@ static bool CheckContactsServiceSupport(const char* szProto)
{
if (g_NewProtoAPI)
{ // there is no way to determine if the service exists (only proto_interface call is supported by 0.8+)
- if (SRCCallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_CONTACTSEND)
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_CONTACTSEND)
return true;
}
else
@@ -161,7 +161,7 @@ static int HookPreBuildContactMenu(WPARAM wParam, LPARAM lParam)
if (szProto && CheckContactsServiceSupport(szProto))
{ // known protocol, protocol supports contacts sending
// check the selected contact if it supports contacts receive
- if (SRCCallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, (LPARAM)hContact))
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, (LPARAM)hContact))
bVisible = TRUE;
}
diff --git a/plugins/ContactsPlus/receive.cpp b/plugins/ContactsPlus/receive.cpp
index a480d3d990..3d3fb2f773 100644
--- a/plugins/ContactsPlus/receive.cpp
+++ b/plugins/ContactsPlus/receive.cpp
@@ -138,12 +138,12 @@ static HANDLE CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData* wnd
{
char* caUIN = ListView_GetItemTextEx(GetDlgItem(hwndDlg, IDC_CONTACTS), iItem, 0);
char* szProto = GetContactProto(wndData->mhContact);
- wndData->rhSearch = (HANDLE)SRCCallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
+ wndData->rhSearch = (HANDLE)CallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
SAFE_FREE((void**)&wndData->haUin);
wndData->haUin = caUIN;
for (int j = 0; j < wndData->cbReceived; j++)
if (!strcmpnull(wndData->maReceived[j]->mcaUIN, caUIN))
- return (HANDLE)SRCCallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
+ return (HANDLE)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
return NULL;
}
@@ -198,7 +198,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
HWND hLV = GetDlgItem(hwndDlg, IDC_CONTACTS);
ListView_SetExtendedListViewStyle(hLV, LVS_EX_CHECKBOXES|LVS_EX_FULLROWSELECT);
// add columns
- RecvListView_AddColumn(hLV, 120, (char*)SRCCallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT, 0), FALSE, 0);
+ RecvListView_AddColumn(hLV, 120, (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT, 0), FALSE, 0);
RecvListView_AddColumn(hLV, 100, "Nick", TRUE, 1);
RecvListView_AddColumn(hLV, 100, "First Name", TRUE, 2);
RecvListView_AddColumn(hLV, 100, "Last Name", TRUE, 3);
@@ -333,7 +333,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
if (!strcmpnull(wndData->maReceived[j]->mcaUIN, caUIN))
{
char* szProto = GetContactProto(wndData->mhContact);
- HANDLE hContact = (HANDLE)SRCCallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(0, j), (LPARAM)wndData->mhDbEvent);
+ HANDLE hContact = (HANDLE)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(0, j), (LPARAM)wndData->mhDbEvent);
if (hContact && caGroup)
{ // use newest group API if available
if (ServiceExists(MS_CLIST_CONTACTCHANGEGROUP))
diff --git a/plugins/ContactsPlus/send.cpp b/plugins/ContactsPlus/send.cpp
index 3ea997b0dd..ac042fa63e 100644
--- a/plugins/ContactsPlus/send.cpp
+++ b/plugins/ContactsPlus/send.cpp
@@ -120,7 +120,7 @@ void TSendContactsData::AddContact(HANDLE hContact) {
int TSendContactsData::SendContactsPacket(HWND hwndDlg, HANDLE *phContacts, int nContacts) {
- HANDLE hProcc = (HANDLE)SRCCallContactService(hContact, PSS_CONTACTS, MAKEWPARAM(0, nContacts), (LPARAM)phContacts);
+ HANDLE hProcc = (HANDLE)CallContactService(hContact, PSS_CONTACTS, MAKEWPARAM(0, nContacts), (LPARAM)phContacts);
if (!hProcc)
{ // on trivial error - do not close dialog
ShowErrorDlg(hwndDlg, "Contacts transfer failed!", FALSE);
@@ -140,7 +140,7 @@ int TSendContactsData::SendContactsPacket(HWND hwndDlg, HANDLE *phContacts, int
int TSendContactsData::SendContacts(HWND hwndDlg) {
char* szProto = GetContactProto(hContact);
- int nMaxContacts = SRCCallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, (LPARAM)hContact);
+ int nMaxContacts = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, (LPARAM)hContact);
if (!nMaxContacts) {
ShowErrorDlg(hwndDlg, "The selected contact does not support receiving contacts.", FALSE);
@@ -354,7 +354,7 @@ INT_PTR CALLBACK SendDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
for (int i=0; i<wndData->uacklist.Count; i++)
{
TAckData* lla = gaAckData.Remove(wndData->uacklist.Items[i]);
- HANDLE hProcc = (HANDLE)SRCCallContactService(wndData->hContact, PSS_CONTACTS, MAKEWPARAM(0, lla->nContacts), (LPARAM)lla->aContacts);
+ HANDLE hProcc = (HANDLE)CallContactService(wndData->hContact, PSS_CONTACTS, MAKEWPARAM(0, lla->nContacts), (LPARAM)lla->aContacts);
if (!hProcc) // if fatal do not include
{
diff --git a/plugins/ContactsPlus/utils.cpp b/plugins/ContactsPlus/utils.cpp
index aad17fe555..1838b3bea8 100644
--- a/plugins/ContactsPlus/utils.cpp
+++ b/plugins/ContactsPlus/utils.cpp
@@ -23,33 +23,6 @@
#include "contacts.h"
-int SRCCallProtoService(const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam)
-{
- if (!g_NewProtoAPI)
- {
- char str[MAXMODULELABELLENGTH];
- strcpy(str,szModule);
- strcat(str,szService);
- return CallService(str,wParam,lParam);
- }
- return CallProtoService(szModule, szService, wParam, lParam);
-}
-
-int SRCCallContactService(HANDLE hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam)
-{
- if (!g_NewProtoAPI)
- {
- CCSDATA ccs;
- ccs.hContact=hContact;
- ccs.szProtoService=szProtoService;
- ccs.wParam=wParam;
- ccs.lParam=lParam;
- return CallService(MS_PROTO_CALLCONTACTSERVICE,0,(LPARAM)&ccs);
- }
-
- return CallContactService(hContact, szProtoService, wParam, lParam);
-}
-
int utf8_decode(const unsigned char *from, char **to);
/* a strlennull() that likes NULL */
@@ -107,7 +80,7 @@ char *GetContactUID(HANDLE hContact, int bTchar)
char *szUid = NULL;
char *szProto = GetContactProto(hContact);
- char *uid = (char*)SRCCallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); // v0.3+ only
+ char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); // v0.3+ only
if (((int)uid != CALLSERVICE_NOTFOUND) && uid)
{ // it worked, yeah :)
@@ -302,7 +275,7 @@ HICON LoadContactProtoIcon(HANDLE hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto)
- return (HICON)SRCCallProtoService(szProto, PS_LOADICON, PLI_PROTOCOL|PLIF_SMALL, 0);
+ return (HICON)CallProtoService(szProto, PS_LOADICON, PLI_PROTOCOL|PLIF_SMALL, 0);
return NULL;
}
diff --git a/plugins/ContactsPlus/utils.h b/plugins/ContactsPlus/utils.h
index b59364ee81..3bc2d8e00d 100644
--- a/plugins/ContactsPlus/utils.h
+++ b/plugins/ContactsPlus/utils.h
@@ -27,10 +27,6 @@
extern HINSTANCE hInst;
-// Compatibility functions
-int SRCCallProtoService(const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam);
-int SRCCallContactService(HANDLE hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam);
-
// utils.cpp
void __fastcall SAFE_FREE(void** p);
size_t __fastcall strlennull(const char *string);