summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-09-16 11:50:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-09-16 11:50:15 +0000
commit5161fd3fe53b85f579cfece81e25b562f1fa56ae (patch)
tree3ac6979cd3774351cb68431da64ca014f1170e98 /protocols/JabberG
parentce6e5ab03d58151c4eda36d05a8436d337b2d3c0 (diff)
- event code standardization for protocols
- fix for EVENTTYPE_AUTHREQUEST processing - protocols' custom CallService core removed git-svn-id: http://svn.miranda-ng.org/main/trunk@1576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/jabber.cpp4
-rw-r--r--protocols/JabberG/jabber.h6
-rw-r--r--protocols/JabberG/jabber_bookmarks.cpp2
-rw-r--r--protocols/JabberG/jabber_byte.cpp6
-rw-r--r--protocols/JabberG/jabber_captcha.cpp2
-rw-r--r--protocols/JabberG/jabber_chat.cpp4
-rw-r--r--protocols/JabberG/jabber_events.cpp2
-rw-r--r--protocols/JabberG/jabber_file.cpp4
-rw-r--r--protocols/JabberG/jabber_ft.cpp2
-rw-r--r--protocols/JabberG/jabber_icolib.cpp10
-rw-r--r--protocols/JabberG/jabber_iq_handlers.cpp2
-rw-r--r--protocols/JabberG/jabber_iqid.cpp10
-rw-r--r--protocols/JabberG/jabber_menu.cpp68
-rw-r--r--protocols/JabberG/jabber_misc.cpp41
-rw-r--r--protocols/JabberG/jabber_opt.cpp6
-rw-r--r--protocols/JabberG/jabber_privacy.cpp8
-rw-r--r--protocols/JabberG/jabber_proto.cpp56
-rw-r--r--protocols/JabberG/jabber_proxy.cpp2
-rw-r--r--protocols/JabberG/jabber_rc.cpp36
-rw-r--r--protocols/JabberG/jabber_secur.cpp4
-rw-r--r--protocols/JabberG/jabber_std.cpp13
-rw-r--r--protocols/JabberG/jabber_thread.cpp34
-rw-r--r--protocols/JabberG/jabber_treelist.cpp6
-rw-r--r--protocols/JabberG/jabber_userinfo.cpp6
-rw-r--r--protocols/JabberG/jabber_util.cpp18
-rw-r--r--protocols/JabberG/jabber_vcard.cpp6
-rw-r--r--protocols/JabberG/jabber_ws.cpp4
-rw-r--r--protocols/JabberG/jabber_xstatus.cpp2
28 files changed, 174 insertions, 190 deletions
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp
index 5ea6fc7b84..a3dd31a3fa 100644
--- a/protocols/JabberG/jabber.cpp
+++ b/protocols/JabberG/jabber.cpp
@@ -224,10 +224,10 @@ extern "C" int __declspec( dllexport ) Load()
mir_getLP( &pluginInfo );
WORD v[4];
- JCallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v);
+ CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v);
mir_sntprintf(szCoreVersion, SIZEOF(szCoreVersion), _T("%d.%d.%d.%d"), v[0], v[1], v[2], v[3]);
- JCallService( MS_UTILS_GETCOUNTRYLIST, ( WPARAM )&g_cbCountries, ( LPARAM )&g_countries );
+ CallService( MS_UTILS_GETCOUNTRYLIST, ( WPARAM )&g_cbCountries, ( LPARAM )&g_countries );
setlocale(LC_ALL, "");
diff --git a/protocols/JabberG/jabber.h b/protocols/JabberG/jabber.h
index f9ffdda8a6..957b7d66bf 100644
--- a/protocols/JabberG/jabber.h
+++ b/protocols/JabberG/jabber.h
@@ -703,12 +703,6 @@ struct JabberAdHocData
void __fastcall JFreeVariant( DBVARIANT* dbv );
char* __fastcall JTranslate( const char* str );
-#if defined( _DEBUG )
- #define JCallService CallService
-#else
- INT_PTR __stdcall JCallService( const char* szSvcName, WPARAM wParam, LPARAM lParam );
-#endif
-
//---- jabber_util.cpp ------------------------------------------------------------------
struct TStringPairsElem
diff --git a/protocols/JabberG/jabber_bookmarks.cpp b/protocols/JabberG/jabber_bookmarks.cpp
index 9ad9baf91a..158f83e669 100644
--- a/protocols/JabberG/jabber_bookmarks.cpp
+++ b/protocols/JabberG/jabber_bookmarks.cpp
@@ -370,7 +370,7 @@ void CJabberDlgBookmarks::OpenBookmark()
} else
{
char *szUrl = mir_t2a(item->jid);
- JCallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl);
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl);
mir_free(szUrl);
}
}
diff --git a/protocols/JabberG/jabber_byte.cpp b/protocols/JabberG/jabber_byte.cpp
index 2126aab373..9e86b51388 100644
--- a/protocols/JabberG/jabber_byte.cpp
+++ b/protocols/JabberG/jabber_byte.cpp
@@ -207,7 +207,7 @@ void CJabberProto::ByteSendThread( JABBER_BYTE_TRANSFER *jbt )
nlb.pfnNewConnectionV2 = JabberByteSendConnection;
nlb.pExtra = this;
nlb.wPort = 0; // Use user-specified incoming port ranges, if available
- jbt->hConn = ( HANDLE ) JCallService( MS_NETLIB_BINDPORT, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nlb );
+ jbt->hConn = ( HANDLE ) CallService( MS_NETLIB_BINDPORT, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nlb );
if ( jbt->hConn == NULL ) {
Log( "Cannot allocate port for bytestream_send thread, thread ended." );
delete jbt;
@@ -463,7 +463,7 @@ void CJabberProto::ByteSendViaProxy( JABBER_BYTE_TRANSFER *jbt )
nloc.cbSize = sizeof( nloc );
nloc.szHost = mir_t2a(szHost);
nloc.wPort = port;
- hConn = ( HANDLE ) JCallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
+ hConn = ( HANDLE ) CallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
mir_free((void*)nloc.szHost);
if ( hConn != NULL ) {
@@ -645,7 +645,7 @@ void __cdecl CJabberProto::ByteReceiveThread( JABBER_BYTE_TRANSFER *jbt )
nloc.cbSize = sizeof( nloc );
nloc.szHost = mir_t2a(szHost);
nloc.wPort = port;
- hConn = ( HANDLE ) JCallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
+ hConn = ( HANDLE ) CallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
mir_free((void*)nloc.szHost);
if ( hConn == NULL ) {
diff --git a/protocols/JabberG/jabber_captcha.cpp b/protocols/JabberG/jabber_captcha.cpp
index 641538d190..88d3038ab7 100644
--- a/protocols/JabberG/jabber_captcha.cpp
+++ b/protocols/JabberG/jabber_captcha.cpp
@@ -144,7 +144,7 @@ bool CJabberProto::ProcessCaptcha (HXML node, HXML parentNode, ThreadData* info
GetCaptchaImage(parentNode, ImageBuf, PicType, CaptchaPath);
char* p = mir_t2a( CaptchaPath );
- param.bmp = ( HBITMAP ) JCallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )p );
+ param.bmp = ( HBITMAP ) CallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )p );
DeleteFile(CaptchaPath);
mir_free(CaptchaPath);
mir_free(p);
diff --git a/protocols/JabberG/jabber_chat.cpp b/protocols/JabberG/jabber_chat.cpp
index f73d2c1559..7a36012092 100644
--- a/protocols/JabberG/jabber_chat.cpp
+++ b/protocols/JabberG/jabber_chat.cpp
@@ -1427,7 +1427,7 @@ static void sttLogListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (item != NULL) {
item->type = _T("conference");
HANDLE hContact = ppro->HContactFromJID( item->jid );
- item->name = ( TCHAR* )JCallService( MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR );
+ item->name = ( TCHAR* )CallService( MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR );
ppro->AddEditBookmark( item );
}
}
@@ -1507,7 +1507,7 @@ static void sttSendPrivateMessage( CJabberProto* ppro, JABBER_LIST_ITEM* item, c
DBWriteContactSettingByte( hContact, "CList", "Hidden", 1 );
ppro->JSetStringT( hContact, "Nick", nick );
DBWriteContactSettingDword( hContact, "Ignore", "Mask1", 0 );
- JCallService( MS_MSG_SENDMESSAGE, ( WPARAM )hContact, 0 );
+ CallService( MS_MSG_SENDMESSAGE, ( WPARAM )hContact, 0 );
} }
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/jabber_events.cpp b/protocols/JabberG/jabber_events.cpp
index 87a4aa4e7a..3f416aa54b 100644
--- a/protocols/JabberG/jabber_events.cpp
+++ b/protocols/JabberG/jabber_events.cpp
@@ -137,7 +137,7 @@ void __cdecl CJabberProto::OnRenameContact( DBCONTACTWRITESETTING* cws, HANDLE h
return;
if ( cws->value.type == DBVT_DELETED ) {
- TCHAR* nick = ( TCHAR* )JCallService( MS_CLIST_GETCONTACTDISPLAYNAME, ( WPARAM )hContact, GCDNF_NOMYHANDLE | GCDNF_TCHAR );
+ TCHAR* nick = ( TCHAR* )CallService( MS_CLIST_GETCONTACTDISPLAYNAME, ( WPARAM )hContact, GCDNF_NOMYHANDLE | GCDNF_TCHAR );
AddContactToRoster( item->jid, nick, item->group );
mir_free(nick);
return;
diff --git a/protocols/JabberG/jabber_file.cpp b/protocols/JabberG/jabber_file.cpp
index c445e1f4b0..5db215d024 100644
--- a/protocols/JabberG/jabber_file.cpp
+++ b/protocols/JabberG/jabber_file.cpp
@@ -51,7 +51,7 @@ void __cdecl CJabberProto::FileReceiveThread( filetransfer* ft )
nloc.cbSize = sizeof( NETLIBOPENCONNECTION );
nloc.szHost = ft->httpHostName;
nloc.wPort = ft->httpPort;
- info.s = ( HANDLE ) JCallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
+ info.s = ( HANDLE ) CallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
if ( info.s == NULL ) {
Log( "Connection failed ( %d ), thread ended", WSAGetLastError());
JSendBroadcast( ft->std.hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0 );
@@ -262,7 +262,7 @@ void __cdecl CJabberProto::FileServerThread( filetransfer* ft )
nlb.pfnNewConnectionV2 = JabberFileServerConnection;
nlb.pExtra = this;
nlb.wPort = 0; // Use user-specified incoming port ranges, if available
- info.s = ( HANDLE ) JCallService( MS_NETLIB_BINDPORT, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nlb );
+ info.s = ( HANDLE ) CallService( MS_NETLIB_BINDPORT, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nlb );
if ( info.s == NULL ) {
Log( "Cannot allocate port to bind for file server thread, thread ended." );
JSendBroadcast( ft->std.hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0 );
diff --git a/protocols/JabberG/jabber_ft.cpp b/protocols/JabberG/jabber_ft.cpp
index 906b5b3562..4ded28d84d 100644
--- a/protocols/JabberG/jabber_ft.cpp
+++ b/protocols/JabberG/jabber_ft.cpp
@@ -372,7 +372,7 @@ void CJabberProto::FtHandleSiRequest( HXML iqNode )
pre.tszDescription = ( TCHAR* )xmlGetText( n );
CCSDATA ccs = { ft->std.hContact, PSR_FILE, 0, ( LPARAM )&pre };
- JCallService( MS_PROTO_CHAINRECV, 0, ( LPARAM )&ccs );
+ CallService( MS_PROTO_CHAINRECV, 0, ( LPARAM )&ccs );
return;
}
else {
diff --git a/protocols/JabberG/jabber_icolib.cpp b/protocols/JabberG/jabber_icolib.cpp
index 04609604f4..7fae4936cc 100644
--- a/protocols/JabberG/jabber_icolib.cpp
+++ b/protocols/JabberG/jabber_icolib.cpp
@@ -310,7 +310,7 @@ HICON CJabberProto::LoadIconEx( const char* name, bool big )
char szSettingName[100];
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", m_szModuleName, name );
- return ( HICON )JCallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -585,9 +585,9 @@ BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR* jid, HANDLE hContact
void CJabberProto::CheckAllContactsAreTransported()
{
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( !lstrcmpA( m_szModuleName, szProto )) {
DBVARIANT dbv;
if ( !JGetStringT( hContact, "jid", &dbv )) {
@@ -595,7 +595,7 @@ void CJabberProto::CheckAllContactsAreTransported()
JFreeVariant( &dbv );
} }
- hContact = ( HANDLE )JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM )hContact, 0 );
+ hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM )hContact, 0 );
} }
/////////////////////////////////////////////////////////////////////////////////////////
@@ -706,7 +706,7 @@ HICON g_LoadIconEx( const char* name, bool big )
{
char szSettingName[100];
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", GLOBAL_SETTING_PREFIX, name );
- return ( HICON )JCallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
}
void g_ReleaseIcon( HICON hIcon )
diff --git a/protocols/JabberG/jabber_iq_handlers.cpp b/protocols/JabberG/jabber_iq_handlers.cpp
index ff3863e116..7f3385ff6e 100644
--- a/protocols/JabberG/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/jabber_iq_handlers.cpp
@@ -664,7 +664,7 @@ BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
pre.lParam = ( LPARAM )ft;
CCSDATA ccs = { ft->std.hContact, PSR_FILE, 0, ( LPARAM )&pre };
- JCallService( MS_PROTO_CHAINRECV, 0, ( LPARAM )&ccs );
+ CallService( MS_PROTO_CHAINRECV, 0, ( LPARAM )&ccs );
mir_free( str2 );
}
else {
diff --git a/protocols/JabberG/jabber_iqid.cpp b/protocols/JabberG/jabber_iqid.cpp
index dcc7f9c6ee..a4a5d5a5f2 100644
--- a/protocols/JabberG/jabber_iqid.cpp
+++ b/protocols/JabberG/jabber_iqid.cpp
@@ -526,9 +526,9 @@ void CJabberProto::OnIqResultGetRoster( HXML iqNode, CJabberIqInfo* pInfo )
if ( m_options.RosterSync == TRUE ) {
int listSize = 0, listAllocSize = 0;
HANDLE* list = NULL;
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- char* str = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* str = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( str != NULL && !strcmp( str, m_szModuleName )) {
DBVARIANT dbv;
if ( !JGetStringT( hContact, "jid", &dbv )) {
@@ -546,12 +546,12 @@ void CJabberProto::OnIqResultGetRoster( HXML iqNode, CJabberIqInfo* pInfo )
JFreeVariant( &dbv );
} }
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
for ( i=0; i < listSize; i++ ) {
Log( "Syncing roster: deleting 0x%x", list[i] );
- JCallService( MS_DB_CONTACT_DELETE, ( WPARAM ) list[i], 0 );
+ CallService( MS_DB_CONTACT_DELETE, ( WPARAM ) list[i], 0 );
}
if ( list != NULL )
mir_free( list );
@@ -694,7 +694,7 @@ LBL_Ret:
Log( "%d bytes written", nWritten );
if ( hContact == NULL ) {
hasPhoto = TRUE;
- JCallService( MS_AV_SETMYAVATART, ( WPARAM )m_szModuleName, ( LPARAM )szAvatarFileName );
+ CallService( MS_AV_SETMYAVATART, ( WPARAM )m_szModuleName, ( LPARAM )szAvatarFileName );
Log( "My picture saved to " TCHAR_STR_PARAM, szAvatarFileName );
}
diff --git a/protocols/JabberG/jabber_menu.cpp b/protocols/JabberG/jabber_menu.cpp
index 81bfb8d4c9..6bc4c1f8c8 100644
--- a/protocols/JabberG/jabber_menu.cpp
+++ b/protocols/JabberG/jabber_menu.cpp
@@ -81,7 +81,7 @@ static INT_PTR JabberMenuChooseService( WPARAM wParam, LPARAM lParam )
static CJabberProto* JabberGetInstanceByHContact( HANDLE hContact )
{
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto == NULL )
return NULL;
@@ -172,7 +172,7 @@ static void sttEnableMenuItem( HANDLE hMenuItem, BOOL bEnable )
if ( !bEnable )
clmi.flags |= CMIF_HIDDEN;
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hMenuItem, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hMenuItem, ( LPARAM )&clmi );
}
static int JabberPrebuildContactMenu( WPARAM wParam, LPARAM lParam )
@@ -206,7 +206,7 @@ void g_MenuInit( void )
mnu.cbSize = sizeof(mnu);
mnu.name = "JabberAccountChooser";
mnu.ExecService = "Jabber/MenuChoose";
- hChooserMenu = (HANDLE)JCallService( MO_CREATENEWMENUOBJECT, 0, (LPARAM)&mnu );
+ hChooserMenu = (HANDLE)CallService( MO_CREATENEWMENUOBJECT, 0, (LPARAM)&mnu );
TMO_MenuItem tmi = { 0 };
tmi.cbSize = sizeof( tmi );
@@ -214,7 +214,7 @@ void g_MenuInit( void )
tmi.pszName = "Cancel";
tmi.position = 9999999;
tmi.hIcolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
- JCallService( MO_ADDNEWMENUITEM, (WPARAM)hChooserMenu, ( LPARAM )&tmi );
+ CallService( MO_ADDNEWMENUITEM, (WPARAM)hChooserMenu, ( LPARAM )&tmi );
//////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
@@ -358,14 +358,14 @@ void g_MenuInit( void )
void g_MenuUninit( void )
{
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRequestAuth, 0 );
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuGrantAuth, 0 );
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRevokeAuth, 0 );
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuConvert, 0 );
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRosterAdd, 0 );
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuLogin, 0 );
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRefresh, 0 );
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuAddBookmark, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRequestAuth, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuGrantAuth, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRevokeAuth, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuConvert, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRosterAdd, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuLogin, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuRefresh, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )g_hMenuAddBookmark, 0 );
UnhookEvent( hPrebuildMenuHook );
for (int i = 0; i < arServices.realCount; i++)
@@ -394,7 +394,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM )
clmi.cbSize = sizeof( clmi );
clmi.pszName = bIsChatRoom ? (char *)LPGEN("&Convert to Contact") : (char *)LPGEN("&Convert to Chat Room");
clmi.flags = CMIM_NAME | CMIM_FLAGS;
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )g_hMenuConvert, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )g_hMenuConvert, ( LPARAM )&clmi );
} }
if (!m_bJabberOnline)
@@ -678,7 +678,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd( WPARAM wParam, LPARAM )
item = ( JABBER_LIST_ITEM* )mir_alloc( sizeof( JABBER_LIST_ITEM ));
ZeroMemory( item, sizeof( JABBER_LIST_ITEM ));
item->jid = mir_tstrdup(roomID);
- item->name = ( TCHAR* )JCallService( MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR );
+ item->name = ( TCHAR* )CallService( MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR );
item->type = _T("conference");
if ( !JGetStringT(( HANDLE ) wParam, "MyNick", &dbv )) {
item->nick = mir_tstrdup(dbv.ptszVal);
@@ -718,7 +718,7 @@ void CJabberProto::MenuInit()
}
else {
if ( m_hMenuRoot )
- JCallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )m_hMenuRoot, 0 );
+ CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )m_hMenuRoot, 0 );
m_hMenuRoot = NULL;
}
@@ -918,7 +918,7 @@ void CJabberProto::GlobalMenuInit()
tmi.ownerdata = this;
tmi.position = iChooserMenuPos++;
tmi.ptszName = m_tszUserName;
- m_hChooseMenuItem = (HANDLE)JCallService( MO_ADDNEWMENUITEM, (WPARAM)hChooserMenu, ( LPARAM )&tmi );
+ m_hChooseMenuItem = (HANDLE)CallService( MO_ADDNEWMENUITEM, (WPARAM)hChooserMenu, ( LPARAM )&tmi );
//////////////////////////////////////////////////////////////////////////////////////
// Hotkeys
@@ -1005,14 +1005,14 @@ void CJabberProto::GlobalMenuUninit()
{
if ( m_phMenuResourceItems ) {
for ( int i=0; i < m_nMenuResourceItems; i++ )
- JCallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )m_phMenuResourceItems[i], 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )m_phMenuResourceItems[i], 0 );
mir_free(m_phMenuResourceItems);
m_phMenuResourceItems = NULL;
}
m_nMenuResourceItems = 0;
if ( m_hMenuRoot )
- JCallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )m_hMenuRoot, 0 );
+ CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )m_hMenuRoot, 0 );
m_hMenuRoot = NULL;
}
@@ -1030,30 +1030,30 @@ void CJabberProto::CheckMenuItems()
if ( !m_menuItemsStatus )
clmi.flags |= CMIF_GRAYED;
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuChangePassword, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuGroupchat, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuChangePassword, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuGroupchat, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuPrivacyLists, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuRosterControl, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuServiceDiscovery, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuSDMyTransports, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuSDTransports, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuSDConferences, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuPrivacyLists, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuRosterControl, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuServiceDiscovery, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuSDMyTransports, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuSDTransports, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuSDConferences, ( LPARAM )&clmi );
clmi.flags = CMIM_FLAGS | (( m_ThreadInfo && ( m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)) ? 0 : CMIF_HIDDEN );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuBookmarks, ( LPARAM )&clmi );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuNotes, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuBookmarks, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuNotes, ( LPARAM )&clmi );
clmi.flags = CMIM_FLAGS | (( m_ThreadInfo && ( m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVACY_LISTS)) ? 0 : CMIF_HIDDEN );
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hPrivacyMenuRoot, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hPrivacyMenuRoot, ( LPARAM )&clmi );
clmi.flags = CMIM_FLAGS | ( m_menuItemsStatus ? 0 : CMIF_HIDDEN);
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuPriorityRoot, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuPriorityRoot, ( LPARAM )&clmi );
if ( !m_bPepSupported )
clmi.flags |= CMIF_HIDDEN;
for ( int i=0; i < m_pepServices.getCount(); i++ )
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_pepServices[i].GetMenu(), ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_pepServices[i].GetMenu(), ( LPARAM )&clmi );
JabberUpdateDialogs( m_menuItemsStatus );
}
@@ -1296,14 +1296,14 @@ CJabberProto *JabberChooseInstance(bool bIsLink)
}
else clmi.flags |= CMIF_HIDDEN;
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )ppro->m_hChooseMenuItem, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )ppro->m_hChooseMenuItem, ( LPARAM )&clmi );
}
if ( nItems > 1 ) {
ListParam param = { 0 };
param.MenuObjectHandle = hChooserMenu;
HMENU hMenu = CreatePopupMenu();
- JCallService( MO_BUILDMENU, ( WPARAM )hMenu, ( LPARAM )&param );
+ CallService( MO_BUILDMENU, ( WPARAM )hMenu, ( LPARAM )&param );
POINT pt;
GetCursorPos(&pt);
@@ -1313,7 +1313,7 @@ CJabberProto *JabberChooseInstance(bool bIsLink)
if ( res ) {
CJabberProto* pro = NULL;
- JCallService( MO_PROCESSCOMMANDBYMENUIDENT, res, ( LPARAM )&pro );
+ CallService( MO_PROCESSCOMMANDBYMENUIDENT, res, ( LPARAM )&pro );
return pro;
}
diff --git a/protocols/JabberG/jabber_misc.cpp b/protocols/JabberG/jabber_misc.cpp
index 101711e1b7..2fb483f905 100644
--- a/protocols/JabberG/jabber_misc.cpp
+++ b/protocols/JabberG/jabber_misc.cpp
@@ -94,7 +94,7 @@ static void JabberContactListCreateClistGroup( TCHAR* groupName )
_tcsncpy( newName+1, groupName, SIZEOF( newName )-1 );
newName[ SIZEOF( newName )-1] = '\0';
DBWriteContactSettingTString( NULL, "CListGroups", str, newName );
- JCallService( MS_CLUI_GROUPADDED, i+1, 0 );
+ CallService( MS_CLUI_GROUPADDED, i+1, 0 );
}
void JabberContactListCreateGroup( TCHAR* groupName )
@@ -127,25 +127,24 @@ void CJabberProto::DBAddAuthRequest( const TCHAR* jid, const TCHAR* nick )
char* szJid = mir_utf8encodeT( jid );
char* szNick = mir_utf8encodeT( nick );
- //blob is: uin( DWORD ), hContact( HANDLE ), nick( ASCIIZ ), first( ASCIIZ ), last( ASCIIZ ), email( ASCIIZ ), reason( ASCIIZ )
- //blob is: 0( DWORD ), hContact( HANDLE ), nick( ASCIIZ ), ""( ASCIIZ ), ""( ASCIIZ ), email( ASCIIZ ), ""( ASCIIZ )
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof( DBEVENTINFO );
+ //blob is: uin(DWORD), hContact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ)
+ //blob is: 0( DWORD ), hContact(DWORD), nick( ASCIIZ ), ""( ASCIIZ ), ""( ASCIIZ ), email( ASCIIZ ), ""( ASCIIZ )
+ DBEVENTINFO dbei = { sizeof(DBEVENTINFO) };
dbei.szModule = m_szModuleName;
dbei.timestamp = ( DWORD )time( NULL );
dbei.flags = DBEF_UTF;
dbei.eventType = EVENTTYPE_AUTHREQUEST;
- dbei.cbBlob = (DWORD)(sizeof( DWORD )+ sizeof( HANDLE ) + strlen( szNick ) + strlen( szJid ) + 5);
- PBYTE pCurBlob = dbei.pBlob = ( PBYTE ) mir_alloc( dbei.cbBlob );
- *(( PDWORD ) pCurBlob ) = 0; pCurBlob += sizeof( DWORD );
- *(( PHANDLE ) pCurBlob ) = hContact; pCurBlob += sizeof( HANDLE );
+ dbei.cbBlob = (DWORD)(sizeof(DWORD)*2 + strlen( szNick ) + strlen( szJid ) + 5);
+ PBYTE pCurBlob = dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
+ *((PDWORD)pCurBlob) = 0; pCurBlob += sizeof(DWORD);
+ *((PDWORD)pCurBlob) = (DWORD)hContact; pCurBlob += sizeof(DWORD);
strcpy(( char* )pCurBlob, szNick ); pCurBlob += strlen( szNick )+1;
*pCurBlob = '\0'; pCurBlob++; //firstName
*pCurBlob = '\0'; pCurBlob++; //lastName
strcpy(( char* )pCurBlob, szJid ); pCurBlob += strlen( szJid )+1;
*pCurBlob = '\0'; //reason
- JCallService( MS_DB_EVENT_ADD, ( WPARAM ) ( HANDLE ) NULL, ( LPARAM )&dbei );
+ CallService( MS_DB_EVENT_ADD, ( WPARAM ) ( HANDLE ) NULL, ( LPARAM )&dbei );
Log( "Setup DBAUTHREQUEST with nick='%s' jid='%s'", szNick, szJid );
mir_free( szJid );
@@ -176,9 +175,9 @@ HANDLE CJabberProto::DBCreateContact( const TCHAR* jid, const TCHAR* nick, BOOL
len = _tcslen( s );
// We can't use JabberHContactFromJID() here because of the stripResource option
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto!=NULL && !strcmp( m_szModuleName, szProto )) {
DBVARIANT dbv;
if ( !JGetStringT( hContact, "jid", &dbv )) {
@@ -189,12 +188,12 @@ HANDLE CJabberProto::DBCreateContact( const TCHAR* jid, const TCHAR* nick, BOOL
}
JFreeVariant( &dbv );
} }
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
if ( hContact == NULL ) {
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_ADD, 0, 0 );
- JCallService( MS_PROTO_ADDTOCONTACT, ( WPARAM ) hContact, ( LPARAM )m_szModuleName );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_ADD, 0, 0 );
+ CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM ) hContact, ( LPARAM )m_szModuleName );
JSetStringT( hContact, "jid", s );
if ( nick != NULL && *nick != '\0' )
JSetStringT( hContact, "Nick", nick );
@@ -277,7 +276,7 @@ void CJabberProto::GetAvatarFileName( HANDLE hContact, TCHAR* pszDest, size_t cb
DWORD dwAttributes = GetFileAttributes( pszDest );
if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 )
- JCallService( MS_UTILS_CREATEDIRTREET, 0, ( LPARAM )pszDest );
+ CallService( MS_UTILS_CREATEDIRTREET, 0, ( LPARAM )pszDest );
pszDest[ tPathLen++ ] = '\\';
@@ -328,10 +327,10 @@ void CJabberProto::ResolveTransportNicks( const TCHAR* jid )
// Set all contacts to offline
HANDLE hContact = m_ThreadInfo->resolveContact;
if ( hContact == NULL )
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
- for ( ; hContact != NULL; hContact = ( HANDLE )JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 )) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ for ( ; hContact != NULL; hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 )) {
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( lstrcmpA( szProto, m_szModuleName ))
continue;
@@ -620,7 +619,7 @@ void CJabberProto::InitPopups(void)
mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
- JCallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&ppc);
+ CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&ppc);
}
void CJabberProto::MsgPopup(HANDLE hContact, const TCHAR *szMsg, const TCHAR *szTitle)
@@ -635,7 +634,7 @@ void CJabberProto::MsgPopup(HANDLE hContact, const TCHAR *szMsg, const TCHAR *sz
ppd.hContact = hContact;
mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
- JCallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
+ CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
} else {
DWORD mtype = MB_OK | MB_SETFOREGROUND | MB_ICONSTOP;
MessageBox(NULL, szMsg, szTitle, mtype);
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp
index 9f41640340..b3e02d96fc 100644
--- a/protocols/JabberG/jabber_opt.cpp
+++ b/protocols/JabberG/jabber_opt.cpp
@@ -1062,10 +1062,10 @@ void CJabberProto::_RosterHandleGetRequest( HXML node )
}
// now it is require to process whole contact list to add not in roster contacts
{
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL )
{
- char* str = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* str = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( str != NULL && !strcmp( str, m_szModuleName ))
{
DBVARIANT dbv;
@@ -1100,7 +1100,7 @@ void CJabberProto::_RosterHandleGetRequest( HXML node )
DBFreeVariant( &dbv );
}
}
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
}
rrud.bReadyToDownload = FALSE;
diff --git a/protocols/JabberG/jabber_privacy.cpp b/protocols/JabberG/jabber_privacy.cpp
index 7d9258c021..bb9c9fb97b 100644
--- a/protocols/JabberG/jabber_privacy.cpp
+++ b/protocols/JabberG/jabber_privacy.cpp
@@ -432,10 +432,10 @@ public:
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_RESETCONTENT, 0, 0 );
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL )
{
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto != NULL && !strcmp( szProto, m_proto->m_szModuleName ))
{
DBVARIANT dbv;
@@ -445,7 +445,7 @@ public:
JFreeVariant( &dbv );
}
}
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
// append known chatroom jids from bookmarks
@@ -2278,7 +2278,7 @@ void CJabberProto::BuildPrivacyListsMenu( bool bDeleteOld )
int i;
if ( bDeleteOld )
for ( i=0; i < m_hPrivacyMenuItems.getCount(); i++ )
- JCallService( MO_REMOVEMENUITEM, (WPARAM)m_hPrivacyMenuItems[i], 0 );
+ CallService( MO_REMOVEMENUITEM, (WPARAM)m_hPrivacyMenuItems[i], 0 );
m_hPrivacyMenuItems.destroy();
m_privacyListManager.Lock();
diff --git a/protocols/JabberG/jabber_proto.cpp b/protocols/JabberG/jabber_proto.cpp
index 0139bdf0eb..3057267688 100644
--- a/protocols/JabberG/jabber_proto.cpp
+++ b/protocols/JabberG/jabber_proto.cpp
@@ -182,18 +182,18 @@ CJabberProto::CJabberProto( const char* aProtoName, const TCHAR* aUserName ) :
char text[ MAX_PATH ];
mir_snprintf( text, sizeof( text ), "%s/Status", m_szModuleName );
- JCallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
+ CallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
mir_snprintf( text, sizeof( text ), "%s/%s", m_szModuleName, DBSETTING_DISPLAY_UID );
- JCallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
+ CallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
mir_snprintf( text, sizeof( text ), "%s/SubscriptionText", m_szModuleName );
- JCallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
+ CallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
mir_snprintf( text, sizeof( text ), "%s/Subscription", m_szModuleName );
- JCallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
+ CallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
mir_snprintf( text, sizeof( text ), "%s/Auth", m_szModuleName );
- JCallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
+ CallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
mir_snprintf( text, sizeof( text ), "%s/Grant", m_szModuleName );
- JCallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
+ CallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
DBVARIANT dbv;
if ( !JGetStringT( NULL, "XmlLang", &dbv )) {
@@ -203,7 +203,7 @@ CJabberProto::CJabberProto( const char* aProtoName, const TCHAR* aUserName ) :
else m_tszSelectedLang = mir_tstrdup( _T( "en" ));
if (!DBGetContactSettingString(NULL, m_szModuleName, "Password", &dbv)) {
- JCallService(MS_DB_CRYPT_DECODESTRING, lstrlenA(dbv.pszVal) + 1, (LPARAM)dbv.pszVal);
+ CallService(MS_DB_CRYPT_DECODESTRING, lstrlenA(dbv.pszVal) + 1, (LPARAM)dbv.pszVal);
TCHAR *pssw = mir_a2t(dbv.pszVal);
JSetStringCrypt(NULL, "LoginPassword", pssw);
mir_free(pssw);
@@ -320,12 +320,12 @@ int CJabberProto::OnModulesLoadedEx( WPARAM, LPARAM )
JHookEvent( ME_MSG_ICONPRESSED, &CJabberProto::OnProcessSrmmIconClick );
JHookEvent( ME_MSG_WINDOWEVENT, &CJabberProto::OnProcessSrmmEvent );
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto != NULL && !strcmp( szProto, m_szModuleName ))
MenuHideSrmmIcon(hContact);
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
} }
DBEVENTTYPEDESCR dbEventType = {0};
@@ -333,12 +333,12 @@ int CJabberProto::OnModulesLoadedEx( WPARAM, LPARAM )
dbEventType.eventType = JABBER_DB_EVENT_TYPE_CHATSTATES;
dbEventType.module = m_szModuleName;
dbEventType.descr = "Chat state notifications";
- JCallService( MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType );
+ CallService( MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType );
dbEventType.eventType = JABBER_DB_EVENT_TYPE_PRESENCE;
dbEventType.module = m_szModuleName;
dbEventType.descr = "Presence notifications";
- JCallService( MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType );
+ CallService( MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType );
JHookEvent( ME_IDLE_CHANGED, &CJabberProto::OnIdleChanged );
@@ -383,8 +383,8 @@ HANDLE CJabberProto::AddToListByJID( const TCHAR* newJid, DWORD flags )
// not already there: add
jid = mir_tstrdup( newJid );
Log( "Add new jid to contact jid = " TCHAR_STR_PARAM, jid );
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_ADD, 0, 0 );
- JCallService( MS_PROTO_ADDTOCONTACT, ( WPARAM ) hContact, ( LPARAM )m_szModuleName );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_ADD, 0, 0 );
+ CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM ) hContact, ( LPARAM )m_szModuleName );
JSetStringT( hContact, "jid", jid );
if (( nick=JabberNickFromJID( newJid )) == NULL )
nick = mir_tstrdup( newJid );
@@ -435,11 +435,11 @@ HANDLE __cdecl CJabberProto::AddToListByEvent( int flags, int /*iContact*/, HAND
Log( "AddToListByEvent" );
ZeroMemory( &dbei, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
- if (( dbei.cbBlob = JCallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
+ if (( dbei.cbBlob = CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
return NULL;
if (( dbei.pBlob=( PBYTE ) alloca( dbei.cbBlob )) == NULL )
return NULL;
- if ( JCallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei ))
+ if ( CallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei ))
return NULL;
if ( strcmp( dbei.szModule, m_szModuleName ))
return NULL;
@@ -454,7 +454,7 @@ HANDLE __cdecl CJabberProto::AddToListByEvent( int flags, int /*iContact*/, HAND
if ( dbei.eventType != EVENTTYPE_AUTHREQUEST )
return NULL;
- nick = ( char* )( dbei.pBlob + sizeof( DWORD )+ sizeof( HANDLE ));
+ nick = ( char* )( dbei.pBlob + sizeof( DWORD )*2);
firstName = nick + strlen( nick ) + 1;
lastName = firstName + strlen( firstName ) + 1;
jid = lastName + strlen( lastName ) + 1;
@@ -478,11 +478,11 @@ int CJabberProto::Authorize( HANDLE hDbEvent )
memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
- if (( dbei.cbBlob=JCallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
+ if (( dbei.cbBlob=CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
return 1;
if (( dbei.pBlob=( PBYTE )alloca( dbei.cbBlob )) == NULL )
return 1;
- if ( JCallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei ))
+ if ( CallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei ))
return 1;
if ( dbei.eventType != EVENTTYPE_AUTHREQUEST )
return 1;
@@ -531,11 +531,11 @@ int CJabberProto::AuthDeny( HANDLE hDbEvent, const TCHAR* /*szReason*/ )
Log( "Entering AuthDeny" );
memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
- if (( dbei.cbBlob=JCallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
+ if (( dbei.cbBlob=CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
return 1;
if (( dbei.pBlob=( PBYTE ) mir_alloc( dbei.cbBlob )) == NULL )
return 1;
- if ( JCallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei )) {
+ if ( CallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei )) {
mir_free( dbei.pBlob );
return 1;
}
@@ -548,7 +548,7 @@ int CJabberProto::AuthDeny( HANDLE hDbEvent, const TCHAR* /*szReason*/ )
return 1;
}
- nick = ( char* )( dbei.pBlob + sizeof( DWORD )+ sizeof( HANDLE ));
+ nick = ( char* )( dbei.pBlob + sizeof(DWORD)*2);
firstName = nick + strlen( nick ) + 1;
lastName = firstName + strlen( firstName ) + 1;
jid = lastName + strlen( lastName ) + 1;
@@ -990,8 +990,7 @@ int __cdecl CJabberProto::RecvContacts( HANDLE /*hContact*/, PROTORECVEVENT* )
int __cdecl CJabberProto::RecvFile( HANDLE hContact, PROTORECVFILET* evt )
{
- CCSDATA ccs = { hContact, PSR_FILE, 0, ( LPARAM )evt };
- return JCallService( MS_PROTO_RECVFILET, 0, ( LPARAM )&ccs );
+ return Proto_RecvFile(hContact, evt);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -999,13 +998,12 @@ int __cdecl CJabberProto::RecvFile( HANDLE hContact, PROTORECVFILET* evt )
int __cdecl CJabberProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* evt )
{
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, ( LPARAM )evt };
- int nDbEvent = JCallService( MS_PROTO_RECVMSG, 0, ( LPARAM )&ccs );
+ INT_PTR nDbEvent = Proto_RecvMessage(hContact, evt);
EnterCriticalSection( &m_csLastResourceMap );
if (IsLastResourceExists( (void *)evt->lParam)) {
- m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = ( ULONG_PTR )nDbEvent;
- m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = ( ULONG_PTR )evt->lParam;
+ m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = nDbEvent;
+ m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = evt->lParam;
if ( m_dwResourceMapPointer >= SIZEOF( m_ulpResourceToDbEventMap ))
m_dwResourceMapPointer = 0;
}
@@ -1647,7 +1645,7 @@ int __cdecl CJabberProto::OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPAR
clmi.cbSize = sizeof(CLISTMENUITEM);
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = m_tszUserName;
- JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuRoot, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuRoot, ( LPARAM )&clmi );
}
break;
diff --git a/protocols/JabberG/jabber_proxy.cpp b/protocols/JabberG/jabber_proxy.cpp
index 0741dcd53e..1702eb52de 100644
--- a/protocols/JabberG/jabber_proxy.cpp
+++ b/protocols/JabberG/jabber_proxy.cpp
@@ -71,7 +71,7 @@ int JabberHttpGatewayInit( HANDLE /*hConn*/, NETLIBOPENCONNECTION* /*nloc*/, NET
nlhpi.firstPostSequence = 1;
sprintf( szHttpGetUrl, "http://%s/monitor?sid=%s", szHttpServer, szSid );
sprintf( szHttpPostUrl, "http://%s/data?sid=%s&seq=", szHttpServer, szSid );
- return JCallService( MS_NETLIB_SETHTTPPROXYINFO, ( WPARAM )hConn, ( LPARAM )&nlhpi );
+ return CallService( MS_NETLIB_SETHTTPPROXYINFO, ( WPARAM )hConn, ( LPARAM )&nlhpi );
#endif
return 1;
}
diff --git a/protocols/JabberG/jabber_rc.cpp b/protocols/JabberG/jabber_rc.cpp
index 1a9ac3e346..f0a6f658d2 100644
--- a/protocols/JabberG/jabber_rc.cpp
+++ b/protocols/JabberG/jabber_rc.cpp
@@ -275,7 +275,7 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
fieldNode << XCHILD( _T("required"));
- int status = JCallService( MS_CLIST_GETSTATUSMODE, 0, 0 );
+ int status = CallService( MS_CLIST_GETSTATUSMODE, 0, 0 );
switch ( status ) {
case ID_STATUS_INVISIBLE:
fieldNode << XCHILD( _T("value"), _T("invisible"));
@@ -323,7 +323,7 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
fieldNode = xNode << XCHILD( _T("field")) << XATTR( _T("label"), TranslateT("Change global status"))
<< XATTR( _T("type"), _T("boolean")) << XATTR( _T("var"), _T("status-global"));
- char* szStatusMsg = (char *)JCallService( MS_AWAYMSG_GETSTATUSMSG, status, 0 );
+ char* szStatusMsg = (char *)CallService( MS_AWAYMSG_GETSTATUSMSG, status, 0 );
if ( szStatusMsg ) {
fieldNode << XCHILD( _T("value"), _A2T(szStatusMsg));
mir_free( szStatusMsg );
@@ -387,7 +387,7 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-global"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode )))
- JCallService( MS_CLIST_SETSTATUSMODE, status, NULL );
+ CallService( MS_CLIST_SETSTATUSMODE, status, NULL );
else
CallProtoService( m_szModuleName, PS_SETSTATUS, status, NULL );
}
@@ -476,20 +476,20 @@ int CJabberProto::AdhocOptionsHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
int CJabberProto::RcGetUnreadEventsCount()
{
int nEventsSent = 0;
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto != NULL && !strcmp( szProto, m_szModuleName )) {
DBVARIANT dbv;
if ( !JGetStringT( hContact, "jid", &dbv )) {
- HANDLE hDbEvent = (HANDLE)JCallService( MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0 );
+ HANDLE hDbEvent = (HANDLE)CallService( MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0 );
while ( hDbEvent ) {
DBEVENTINFO dbei = { 0 };
dbei.cbSize = sizeof(dbei);
dbei.cbBlob = CallService( MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0 );
if ( dbei.cbBlob != -1 ) {
dbei.pBlob = (PBYTE)mir_alloc( dbei.cbBlob + 1 );
- int nGetTextResult = JCallService( MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei );
+ int nGetTextResult = CallService( MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei );
if ( !nGetTextResult && dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_READ) && !(dbei.flags & DBEF_SENT)) {
TCHAR* szEventText = DbGetEventTextT( &dbei, CP_ACP );
if ( szEventText ) {
@@ -499,12 +499,12 @@ int CJabberProto::RcGetUnreadEventsCount()
}
mir_free( dbei.pBlob );
}
- hDbEvent = (HANDLE)JCallService( MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0 );
+ hDbEvent = (HANDLE)CallService( MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0 );
}
JFreeVariant( &dbv );
}
}
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
return nEventsSent;
}
@@ -573,21 +573,21 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
m_options.RcMarkMessagesAsRead = bRemoveCListEvents ? 1 : 0;
int nEventsSent = 0;
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto != NULL && !strcmp( szProto, m_szModuleName )) {
DBVARIANT dbv;
if ( !JGetStringT( hContact, "jid", &dbv )) {
- HANDLE hDbEvent = (HANDLE)JCallService( MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0 );
+ HANDLE hDbEvent = (HANDLE)CallService( MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0 );
while ( hDbEvent ) {
DBEVENTINFO dbei = { 0 };
dbei.cbSize = sizeof(dbei);
dbei.cbBlob = CallService( MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0 );
if ( dbei.cbBlob != -1 ) {
dbei.pBlob = (PBYTE)mir_alloc( dbei.cbBlob + 1 );
- int nGetTextResult = JCallService( MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei );
+ int nGetTextResult = CallService( MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei );
if ( !nGetTextResult && dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_READ) && !(dbei.flags & DBEF_SENT)) {
TCHAR* szEventText = DbGetEventTextT( &dbei, CP_ACP );
if ( szEventText ) {
@@ -618,21 +618,21 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
nEventsSent++;
- JCallService( MS_DB_EVENT_MARKREAD, (WPARAM)hContact, (LPARAM)hDbEvent );
+ CallService( MS_DB_EVENT_MARKREAD, (WPARAM)hContact, (LPARAM)hDbEvent );
if ( bRemoveCListEvents )
- JCallService( MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hDbEvent );
+ CallService( MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hDbEvent );
mir_free( szEventText );
}
}
mir_free( dbei.pBlob );
}
- hDbEvent = (HANDLE)JCallService( MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0 );
+ hDbEvent = (HANDLE)CallService( MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0 );
}
JFreeVariant( &dbv );
}
}
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("%d message(s) forwarded"), nEventsSent );
@@ -679,7 +679,7 @@ int CJabberProto::AdhocLockWSHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocSe
static void __stdcall JabberQuitMirandaIMThread( void* )
{
- JCallService( "CloseAction", 0, 0 );
+ CallService( "CloseAction", 0, 0 );
}
int CJabberProto::AdhocQuitMirandaHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession )
diff --git a/protocols/JabberG/jabber_secur.cpp b/protocols/JabberG/jabber_secur.cpp
index db928d74ee..c48ded22d6 100644
--- a/protocols/JabberG/jabber_secur.cpp
+++ b/protocols/JabberG/jabber_secur.cpp
@@ -169,7 +169,7 @@ char* TMD5Auth::getChallenge( const TCHAR* challenge )
DWORD digest[4], hash1[4], hash2[4];
mir_md5_state_t ctx;
- JCallService( MS_UTILS_GETRANDOM, sizeof( digest ), ( LPARAM )digest );
+ CallService( MS_UTILS_GETRANDOM, sizeof( digest ), ( LPARAM )digest );
sprintf( cnonce, "%08x%08x%08x%08x", htonl(digest[0]), htonl(digest[1]), htonl(digest[2]), htonl(digest[3]));
char *uname = mir_utf8encodeT( info->username ),
@@ -383,7 +383,7 @@ char* TScramAuth::getInitialRequest()
*serv = mir_utf8encode( info->server );
unsigned char nonce[24];
- JCallService( MS_UTILS_GETRANDOM, sizeof(nonce), ( LPARAM )nonce );
+ CallService( MS_UTILS_GETRANDOM, sizeof(nonce), ( LPARAM )nonce );
cnonce = JabberBase64Encode(( char* )nonce, sizeof( nonce ));
char buf[4096];
diff --git a/protocols/JabberG/jabber_std.cpp b/protocols/JabberG/jabber_std.cpp
index d9d1229e78..099c28b993 100644
--- a/protocols/JabberG/jabber_std.cpp
+++ b/protocols/JabberG/jabber_std.cpp
@@ -65,13 +65,6 @@ HANDLE CJabberProto::JForkThreadEx( JThreadFunc pFunc, void *param, UINT* thread
/////////////////////////////////////////////////////////////////////////////////////////
-#if !defined( _DEBUG )
-INT_PTR __stdcall JCallService( const char* szSvcName, WPARAM wParam, LPARAM lParam )
-{
- return CallService( szSvcName, wParam, lParam );
-}
-#endif
-
void CJabberProto::JDeleteSetting( HANDLE hContact, const char* valueName )
{
DBDeleteContactSetting( hContact, m_szModuleName, valueName );
@@ -89,7 +82,7 @@ DWORD CJabberProto::JGetByte( HANDLE hContact, const char* valueName, int parDef
char* __stdcall JGetContactName( HANDLE hContact )
{
- return ( char* )JCallService( MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM( hContact ), 0 );
+ return ( char* )CallService( MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM( hContact ), 0 );
}
DWORD CJabberProto::JGetDword( HANDLE hContact, const char* valueName, DWORD parDefltValue )
@@ -108,7 +101,7 @@ int CJabberProto::JGetStaticString( const char* valueName, HANDLE hContact, char
sVal.pValue = &dbv;
sVal.szModule = m_szModuleName;
sVal.szSetting = valueName;
- if ( JCallService( MS_DB_CONTACT_GETSETTINGSTATIC, ( WPARAM )hContact, ( LPARAM )&sVal ) != 0 )
+ if ( CallService( MS_DB_CONTACT_GETSETTINGSTATIC, ( WPARAM )hContact, ( LPARAM )&sVal ) != 0 )
return 1;
return ( dbv.type != DBVT_ASCIIZ );
@@ -175,7 +168,7 @@ int CJabberProto::JSendBroadcast( HANDLE hContact, int type, int result, HANDLE
ack.result = result;
ack.hProcess = hProcess;
ack.lParam = lParam;
- return JCallService( MS_PROTO_BROADCASTACK, 0, ( LPARAM )&ack );
+ return CallService( MS_PROTO_BROADCASTACK, 0, ( LPARAM )&ack );
}
/*
DWORD CJabberProto::JSetByte( const char* valueName, int parValue )
diff --git a/protocols/JabberG/jabber_thread.cpp b/protocols/JabberG/jabber_thread.cpp
index b93b1127d8..07c609fc84 100644
--- a/protocols/JabberG/jabber_thread.cpp
+++ b/protocols/JabberG/jabber_thread.cpp
@@ -427,7 +427,7 @@ LBL_FatalError:
// Determine local IP
if ( info->useSSL ) {
Log( "Intializing SSL connection" );
- if (!JCallService( MS_NETLIB_STARTSSL, ( WPARAM )info->s, 0)) {
+ if (!CallService( MS_NETLIB_STARTSSL, ( WPARAM )info->s, 0)) {
Log( "SSL intialization failed" );
if ( info->type == JABBER_SESSION_NORMAL ) {
JSendBroadcast( NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NONETWORK );
@@ -471,7 +471,7 @@ LBL_FatalError:
nls.cbSize = sizeof( NETLIBSELECT );
nls.dwTimeout = dwConnectionKeepAliveInterval - dwIdle;
nls.hReadConns[0] = info->s;
- int nSelRes = JCallService( MS_NETLIB_SELECT, 0, ( LPARAM )&nls );
+ int nSelRes = CallService( MS_NETLIB_SELECT, 0, ( LPARAM )&nls );
if ( nSelRes == -1 ) // error
break;
else if ( nSelRes == 0 && m_bSendKeepAlive ) {
@@ -583,15 +583,15 @@ recvRest:
JSendBroadcast( NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, ( HANDLE ) oldStatus, m_iStatus );
// Set all contacts to offline
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- if ( !lstrcmpA(( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 ), m_szModuleName ))
+ if ( !lstrcmpA(( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 ), m_szModuleName ))
{
SetContactOfflineStatus( hContact );
MenuHideSrmmIcon( hContact );
}
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
mir_free( m_szJabberJID );
@@ -988,7 +988,7 @@ void CJabberProto::OnProcessProceed( HXML node, ThreadData* info )
NETLIBSSL ssl = {0};
ssl.cbSize = sizeof(ssl);
ssl.host = isHosted ? info->manualHost : info->server;
- if (!JCallService( MS_NETLIB_STARTSSL, ( WPARAM )info->s, ( LPARAM )&ssl)) {
+ if (!CallService( MS_NETLIB_STARTSSL, ( WPARAM )info->s, ( LPARAM )&ssl)) {
Log( "SSL initialization failed" );
info->send( "</stream:stream>" );
info->shutdown();
@@ -1066,7 +1066,7 @@ void CJabberProto::OnProcessPubsubEvent( HXML node )
DWORD JabberGetLastContactMessageTime( HANDLE hContact )
{
// TODO: time cache can improve performance
- HANDLE hDbEvent = (HANDLE)JCallService( MS_DB_EVENT_FINDLAST, (WPARAM)hContact, 0 );
+ HANDLE hDbEvent = (HANDLE)CallService( MS_DB_EVENT_FINDLAST, (WPARAM)hContact, 0 );
if ( !hDbEvent )
return 0;
@@ -1077,7 +1077,7 @@ DWORD JabberGetLastContactMessageTime( HANDLE hContact )
dbei.cbBlob = CallService( MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0 );
if ( dbei.cbBlob != -1 ) {
dbei.pBlob = (PBYTE)mir_alloc( dbei.cbBlob + 1 );
- int nGetTextResult = JCallService( MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei );
+ int nGetTextResult = CallService( MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei );
if ( !nGetTextResult )
dwTime = dbei.timestamp;
mir_free( dbei.pBlob );
@@ -1204,15 +1204,15 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
// chatstates composing event
if ( hContact && xmlGetChildByTag( node, "composing", "xmlns", _T( JABBER_FEAT_CHATSTATES )))
- JCallService( MS_PROTO_CONTACTISTYPING, ( WPARAM )hContact, 60 );
+ CallService( MS_PROTO_CONTACTISTYPING, ( WPARAM )hContact, 60 );
// chatstates paused event
if ( hContact && xmlGetChildByTag( node, "paused", "xmlns", _T( JABBER_FEAT_CHATSTATES )))
- JCallService( MS_PROTO_CONTACTISTYPING, ( WPARAM )hContact, PROTOTYPE_CONTACTTYPING_OFF );
+ CallService( MS_PROTO_CONTACTISTYPING, ( WPARAM )hContact, PROTOTYPE_CONTACTTYPING_OFF );
// chatstates inactive event
if ( hContact && xmlGetChildByTag( node, "inactive", "xmlns", _T( JABBER_FEAT_CHATSTATES )))
- JCallService( MS_PROTO_CONTACTISTYPING, ( WPARAM )hContact, PROTOTYPE_CONTACTTYPING_OFF );
+ CallService( MS_PROTO_CONTACTISTYPING, ( WPARAM )hContact, PROTOTYPE_CONTACTTYPING_OFF );
// message receipts delivery notification
if ( n = xmlGetChildByTag( node, "received", "xmlns", _T( JABBER_FEAT_MESSAGE_RECEIPTS ))) {
@@ -1348,12 +1348,12 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
}
if ( hContact && xmlGetChild( xNode , "composing" ) != NULL )
- JCallService( MS_PROTO_CONTACTISTYPING, ( WPARAM ) hContact, 60 );
+ CallService( MS_PROTO_CONTACTISTYPING, ( WPARAM ) hContact, 60 );
// Maybe a cancel to the previous composing
HXML child = xmlGetChild( xNode ,0);
if ( hContact && ( !child || ( child && idNode != NULL )))
- JCallService( MS_PROTO_CONTACTISTYPING, ( WPARAM ) hContact, PROTOTYPE_CONTACTTYPING_OFF );
+ CallService( MS_PROTO_CONTACTISTYPING, ( WPARAM ) hContact, PROTOTYPE_CONTACTTYPING_OFF );
}
else {
// Check whether any event is requested
@@ -1428,7 +1428,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
else if ( !_tcscmp( action, _T("delete"))) {
HANDLE hContact = HContactFromJID( jid );
if ( hContact )
- JCallService( MS_DB_CONTACT_DELETE, ( WPARAM ) hContact, 0 );
+ CallService( MS_DB_CONTACT_DELETE, ( WPARAM ) hContact, 0 );
}
}
}
@@ -1473,7 +1473,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
if ( item != NULL ) {
if ( resourceStatus ) resourceStatus->bMessageSessionActive = TRUE;
if ( hContact != NULL )
- JCallService( MS_PROTO_CONTACTISTYPING, ( WPARAM ) hContact, PROTOTYPE_CONTACTTYPING_OFF );
+ CallService( MS_PROTO_CONTACTISTYPING, ( WPARAM ) hContact, PROTOTYPE_CONTACTTYPING_OFF );
// no we will monitor last resource in all modes
if ( /*item->resourceMode==RSMODE_LASTSEEN &&*/ ( fromResource = _tcschr( from, '/' ))!=NULL ) {
@@ -1513,7 +1513,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
ccs.wParam = 0;
ccs.szProtoService = PSR_MESSAGE;
ccs.lParam = ( LPARAM )&recv;
- JCallService( MS_PROTO_CHAINRECV, 0, ( LPARAM )&ccs );
+ CallService( MS_PROTO_CHAINRECV, 0, ( LPARAM )&ccs );
mir_free(( void* )szMessage );
mir_free( buf );
@@ -1689,7 +1689,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
if ( _tcschr( from, '@' )==NULL ) {
UI_SAFE_NOTIFY(m_pDlgServiceDiscovery, WM_JABBER_TRANSPORT_REFRESH);
}
- Log( TCHAR_STR_PARAM " ( " TCHAR_STR_PARAM " ) online, set contact status to %s", nick, from, JCallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM)status,0 ));
+ Log( TCHAR_STR_PARAM " ( " TCHAR_STR_PARAM " ) online, set contact status to %s", nick, from, CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM)status,0 ));
mir_free( nick );
HXML xNode;
diff --git a/protocols/JabberG/jabber_treelist.cpp b/protocols/JabberG/jabber_treelist.cpp
index c6305209e7..8e1e28cb45 100644
--- a/protocols/JabberG/jabber_treelist.cpp
+++ b/protocols/JabberG/jabber_treelist.cpp
@@ -135,9 +135,9 @@ void TreeList_Create(HWND hwnd)
ListView_SetImageList (hwnd, hIml, LVSIL_SMALL);
hIml = ImageList_Create(16, 16, ILC_MASK + ( IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16 ), 2, 1);
- ImageList_AddIcon_Icolib(hIml, (HICON)JCallService( MS_SKIN_LOADICON, SKINICON_OTHER_GROUPOPEN, 0 ));
- ImageList_AddIcon_Icolib(hIml, (HICON)JCallService( MS_SKIN_LOADICON, SKINICON_OTHER_GROUPSHUT, 0 ));
- ImageList_AddIcon_Icolib(hIml, (HICON)JCallService( MS_SKIN_LOADICON, SKINICON_OTHER_DOWNARROW, 0 ));
+ ImageList_AddIcon_Icolib(hIml, (HICON)CallService( MS_SKIN_LOADICON, SKINICON_OTHER_GROUPOPEN, 0 ));
+ ImageList_AddIcon_Icolib(hIml, (HICON)CallService( MS_SKIN_LOADICON, SKINICON_OTHER_GROUPSHUT, 0 ));
+ ImageList_AddIcon_Icolib(hIml, (HICON)CallService( MS_SKIN_LOADICON, SKINICON_OTHER_DOWNARROW, 0 ));
ListView_SetImageList (hwnd, hIml, LVSIL_STATE);
}
diff --git a/protocols/JabberG/jabber_userinfo.cpp b/protocols/JabberG/jabber_userinfo.cpp
index 40d5190a5d..9d8b476851 100644
--- a/protocols/JabberG/jabber_userinfo.cpp
+++ b/protocols/JabberG/jabber_userinfo.cpp
@@ -662,7 +662,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc( HWND hwndDlg, UINT msg, WPARAM w
if ( item->photoFileName ) {
photoInfo->ppro->Log( "Showing picture from " TCHAR_STR_PARAM, item->photoFileName );
char* p = mir_t2a( item->photoFileName );
- photoInfo->hBitmap = ( HBITMAP ) JCallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )p );
+ photoInfo->hBitmap = ( HBITMAP ) CallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )p );
mir_free( p );
JabberBitmapPremultiplyChannels(photoInfo->hBitmap);
ShowWindow( GetDlgItem( hwndDlg, IDC_SAVE ), SW_SHOW );
@@ -843,7 +843,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc( HWND hwndDlg, UINT msg, WPARAM w
int CJabberProto::OnUserInfoInit( WPARAM wParam, LPARAM lParam )
{
- if ( !JCallService( MS_PROTO_ISPROTOCOLLOADED, 0, ( LPARAM )m_szModuleName ))
+ if ( !CallService( MS_PROTO_ISPROTOCOLLOADED, 0, ( LPARAM )m_szModuleName ))
return 0;
OPTIONSDIALOGPAGE odp = {0};
@@ -853,7 +853,7 @@ int CJabberProto::OnUserInfoInit( WPARAM wParam, LPARAM lParam )
HANDLE hContact = ( HANDLE )lParam;
if ( hContact ) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto != NULL && !strcmp( szProto, m_szModuleName )) {
odp.pfnDlgProc = JabberUserInfoDlgProc;
odp.position = -2000000000;
diff --git a/protocols/JabberG/jabber_util.cpp b/protocols/JabberG/jabber_util.cpp
index eaf277099f..a290b56ba2 100644
--- a/protocols/JabberG/jabber_util.cpp
+++ b/protocols/JabberG/jabber_util.cpp
@@ -62,7 +62,7 @@ void CJabberProto::Log( const char* fmt, ... )
mir_vsnprintf( str, 32000, fmt, vararg );
va_end( vararg );
- JCallService( MS_NETLIB_LOG, ( WPARAM )m_hNetlibUser, ( LPARAM )str );
+ CallService( MS_NETLIB_LOG, ( WPARAM )m_hNetlibUser, ( LPARAM )str );
}
///////////////////////////////////////////////////////////////////////////////
@@ -74,9 +74,9 @@ HANDLE CJabberProto::ChatRoomHContactFromJID( const TCHAR* jid )
return ( HANDLE )NULL;
HANDLE hContactMatched = NULL;
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto != NULL && !strcmp( m_szModuleName, szProto )) {
DBVARIANT dbv;
int result = JGetStringT( hContact, "ChatRoomID", &dbv );
@@ -92,7 +92,7 @@ HANDLE CJabberProto::ChatRoomHContactFromJID( const TCHAR* jid )
break;
} } }
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
return hContactMatched;
@@ -109,9 +109,9 @@ HANDLE CJabberProto::HContactFromJID( const TCHAR* jid , BOOL bStripResource )
JABBER_LIST_ITEM* item = ListGetItemPtr( LIST_CHATROOM, jid );
HANDLE hContactMatched = NULL;
- HANDLE hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM ) hContact, 0 );
if ( szProto != NULL && !strcmp( m_szModuleName, szProto )) {
DBVARIANT dbv;
int result;
@@ -145,7 +145,7 @@ HANDLE CJabberProto::HContactFromJID( const TCHAR* jid , BOOL bStripResource )
break;
} } }
- hContact = ( HANDLE ) JCallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
+ hContact = ( HANDLE ) CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM ) hContact, 0 );
}
return hContactMatched;
@@ -1692,7 +1692,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param)
nlhr.szUrl = avs[i].Url;
nlhr.nlc = hHttpCon;
- NETLIBHTTPREQUEST * res = (NETLIBHTTPREQUEST*)JCallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST * res = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&nlhr);
if (res)
{
hHttpCon = res->nlc;
@@ -1741,7 +1741,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param)
}
}
}
- JCallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)res);
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)res);
}
else
hHttpCon = NULL;
diff --git a/protocols/JabberG/jabber_vcard.cpp b/protocols/JabberG/jabber_vcard.cpp
index 3d43c0f650..691f3516ed 100644
--- a/protocols/JabberG/jabber_vcard.cpp
+++ b/protocols/JabberG/jabber_vcard.cpp
@@ -300,7 +300,7 @@ static INT_PTR CALLBACK PhotoDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPA
dat->ppro->Log( "Temp file = " TCHAR_STR_PARAM, szTempFileName );
if ( CopyFile( szAvatarFileName, szTempFileName, FALSE ) == TRUE ) {
char* p = mir_t2a( szTempFileName );
- if (( dat->hBitmap=( HBITMAP ) JCallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )p )) != NULL ) {
+ if (( dat->hBitmap=( HBITMAP ) CallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )p )) != NULL ) {
JabberBitmapPremultiplyChannels( dat->hBitmap );
_tcscpy( dat->ppro->m_szPhotoFileName, szTempFileName );
EnableWindow( GetDlgItem( hwndDlg, IDC_DELETE ), TRUE );
@@ -327,7 +327,7 @@ static INT_PTR CALLBACK PhotoDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPA
TCHAR szFilter[512];
TCHAR szFileName[MAX_PATH];
- JCallService( MS_UTILS_GETBITMAPFILTERSTRINGST, SIZEOF( szFilter ), ( LPARAM )szFilter );
+ CallService( MS_UTILS_GETBITMAPFILTERSTRINGST, SIZEOF( szFilter ), ( LPARAM )szFilter );
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
@@ -353,7 +353,7 @@ static INT_PTR CALLBACK PhotoDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPA
dat->ppro->Log( "Temp file = " TCHAR_STR_PARAM, szTempFileName );
if ( CopyFile( szFileName, szTempFileName, FALSE ) == TRUE ) {
char* pszTemp = mir_t2a( szTempFileName );
- if (( hNewBitmap=( HBITMAP ) JCallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )pszTemp )) != NULL ) {
+ if (( hNewBitmap=( HBITMAP ) CallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )pszTemp )) != NULL ) {
if ( dat->hBitmap ) {
DeleteObject( dat->hBitmap );
DeleteFile( dat->ppro->m_szPhotoFileName );
diff --git a/protocols/JabberG/jabber_ws.cpp b/protocols/JabberG/jabber_ws.cpp
index fcb6753f85..494dcf3454 100644
--- a/protocols/JabberG/jabber_ws.cpp
+++ b/protocols/JabberG/jabber_ws.cpp
@@ -40,7 +40,7 @@ BOOL CJabberProto::WsInit( void )
//nlu.pfnHttpGatewayBegin = JabberHttpGatewayBegin;
//nlu.pfnHttpGatewayWrapSend = JabberHttpGatewayWrapSend;
//nlu.pfnHttpGatewayUnwrapRecv = JabberHttpGatewayUnwrapRecv;
- m_hNetlibUser = ( HANDLE ) JCallService( MS_NETLIB_REGISTERUSER, 0, ( LPARAM )&nlu );
+ m_hNetlibUser = ( HANDLE ) CallService( MS_NETLIB_REGISTERUSER, 0, ( LPARAM )&nlu );
return m_hNetlibUser != NULL;
}
@@ -58,7 +58,7 @@ JABBER_SOCKET CJabberProto::WsConnect( char* host, WORD port )
nloc.szHost = host;
nloc.wPort = port;
nloc.timeout = 6;
- return ( HANDLE )JCallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
+ return ( HANDLE )CallService( MS_NETLIB_OPENCONNECTION, ( WPARAM ) m_hNetlibUser, ( LPARAM )&nloc );
}
int CJabberProto::WsSend( JABBER_SOCKET hConn, char* data, int datalen, int flags )
diff --git a/protocols/JabberG/jabber_xstatus.cpp b/protocols/JabberG/jabber_xstatus.cpp
index 07ee610a80..d15cae2bcd 100644
--- a/protocols/JabberG/jabber_xstatus.cpp
+++ b/protocols/JabberG/jabber_xstatus.cpp
@@ -1249,7 +1249,7 @@ int CJabberProto::CListMW_ExtraIconsApply( WPARAM wParam, LPARAM )
{
if (m_bJabberOnline && m_bPepSupported && ServiceExists(MS_CLIST_EXTRA_SET_ICON))
{
- char* szProto = ( char* )JCallService( MS_PROTO_GETCONTACTBASEPROTO, wParam, 0 );
+ char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, wParam, 0 );
if ( szProto==NULL || strcmp( szProto, m_szModuleName ))
return 0; // only apply icons to our contacts, do not mess others