diff options
Diffstat (limited to 'protocols')
75 files changed, 488 insertions, 619 deletions
diff --git a/protocols/AimOscar/proto.cpp b/protocols/AimOscar/proto.cpp index fa8d40c564..09f7ba4ab1 100644 --- a/protocols/AimOscar/proto.cpp +++ b/protocols/AimOscar/proto.cpp @@ -468,8 +468,7 @@ int __cdecl CAimProto::RecvContacts(HANDLE hContact, PROTORECVEVENT*) int __cdecl CAimProto::RecvFile(HANDLE hContact, PROTOFILEEVENT* evt)
{
- CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)evt };
- return CallService(MS_PROTO_RECVFILET, 0, (LPARAM)&ccs);
+ return Proto_RecvFile(hContact, evt);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -477,8 +476,6 @@ int __cdecl CAimProto::RecvFile(HANDLE hContact, PROTOFILEEVENT* evt) int __cdecl CAimProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre)
{
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)pre };
-
char *omsg = pre->szMessage;
char *bbuf = NULL;
if (getByte(AIM_KEY_FI, 1))
@@ -489,10 +486,9 @@ int __cdecl CAimProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre) LOG("Stripping html.");
html_decode(pre->szMessage);
- HANDLE res = (HANDLE)CallService(MS_PROTO_RECVMSG, 0, (LPARAM)&ccs);
- mir_free(bbuf);
+ INT_PTR res = Proto_RecvMessage(hContact, pre);
+ mir_free(bbuf);
pre->szMessage = omsg;
-
return ( int )res;
}
diff --git a/protocols/FacebookRM/messages.cpp b/protocols/FacebookRM/messages.cpp index 1f6d80a6d5..8b27b4721f 100644 --- a/protocols/FacebookRM/messages.cpp +++ b/protocols/FacebookRM/messages.cpp @@ -34,8 +34,7 @@ int FacebookProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre) CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
- CCSDATA ccs = { hContact,PSR_MESSAGE,0,reinterpret_cast<LPARAM>(pre) };
- return CallService(MS_PROTO_RECVMSG,0,reinterpret_cast<LPARAM>(&ccs));
+ return Proto_RecvMessage(hContact, pre);
}
void FacebookProto::SendMsgWorker(void *p)
diff --git a/protocols/FacebookRM/process.cpp b/protocols/FacebookRM/process.cpp index f1481ba8ad..1691fcda08 100644 --- a/protocols/FacebookRM/process.cpp +++ b/protocols/FacebookRM/process.cpp @@ -597,16 +597,16 @@ void FacebookProto::ProcessFriendRequests( void* ) dbei.timestamp = ::time( NULL );
dbei.flags = DBEF_UTF;
dbei.eventType = EVENTTYPE_AUTHREQUEST;
- dbei.cbBlob = (DWORD)(sizeof( DWORD )+ sizeof( HANDLE ) + fbu->real_name.length() + 5);
+ dbei.cbBlob = (DWORD)(sizeof( DWORD )*2 + fbu->real_name.length() + 5);
PBYTE pCurBlob = dbei.pBlob = ( PBYTE ) mir_alloc( dbei.cbBlob );
- *(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
- *(PHANDLE)pCurBlob = hContact; pCurBlob += sizeof(HANDLE); // Contact Handle
+ *(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
+ *(PDWORD)pCurBlob = (DWORD)hContact; pCurBlob += sizeof(DWORD); // Contact Handle
strcpy((char*)pCurBlob, fbu->real_name.data()); pCurBlob += fbu->real_name.length()+1; // Nickname
- *pCurBlob = '\0'; pCurBlob++; // First Name
- *pCurBlob = '\0'; pCurBlob++; // Last Name
- *pCurBlob = '\0'; pCurBlob++; // E-mail
- *pCurBlob = '\0'; // Reason
+ *pCurBlob = '\0'; pCurBlob++; // First Name
+ *pCurBlob = '\0'; pCurBlob++; // Last Name
+ *pCurBlob = '\0'; pCurBlob++; // E-mail
+ *pCurBlob = '\0'; // Reason
CallService(MS_DB_EVENT_ADD, (WPARAM)NULL, (LPARAM)&dbei);
diff --git a/protocols/FacebookRM/proto.cpp b/protocols/FacebookRM/proto.cpp index cc5f446662..c2d7a39151 100644 --- a/protocols/FacebookRM/proto.cpp +++ b/protocols/FacebookRM/proto.cpp @@ -566,12 +566,9 @@ int FacebookProto::OnCancelFriendshipRequest(WPARAM wParam,LPARAM lParam) HANDLE FacebookProto::HContactFromAuthEvent(HANDLE hEvent)
{
- DBEVENTINFO dbei;
- DWORD body[3];
-
- ZeroMemory(&dbei, sizeof(dbei));
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = sizeof(DWORD) + sizeof(HANDLE);
+ DWORD body[2];
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ dbei.cbBlob = sizeof(DWORD)*2;
dbei.pBlob = (PBYTE)&body;
if (CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbei))
@@ -583,5 +580,5 @@ HANDLE FacebookProto::HContactFromAuthEvent(HANDLE hEvent) if (strcmp(dbei.szModule, m_szModuleName))
return INVALID_HANDLE_VALUE;
- return *(HANDLE*)&body[1]; // this is bad - needs new auth system
+ return DbGetAuthEventContact(&dbei);
}
diff --git a/protocols/FacebookRM/stubs.cpp b/protocols/FacebookRM/stubs.cpp index 6237a39129..25d3f45252 100644 --- a/protocols/FacebookRM/stubs.cpp +++ b/protocols/FacebookRM/stubs.cpp @@ -24,38 +24,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HANDLE FacebookProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
- return 0;
+ return NULL;
}
int FacebookProto::AuthRecv(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
HANDLE FacebookProto::ChangeInfo(int type,void *info_data)
{
MessageBoxA(0,"ChangeInfo","",0);
- return 0;
+ return NULL;
}
HANDLE FacebookProto::FileAllow(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
- return 0;
+ return NULL;
}
int FacebookProto::FileCancel(HANDLE hContact,HANDLE hTransfer)
{
- return 0;
+ return 1;
}
int FacebookProto::FileDeny(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
- return 0;
+ return 1;
}
int FacebookProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filename)
{
- return 0;
+ return 1;
}
int FacebookProto::GetInfo( HANDLE hContact, int infoType )
@@ -66,55 +66,55 @@ int FacebookProto::GetInfo( HANDLE hContact, int infoType ) HWND FacebookProto::SearchAdvanced(HWND owner)
{
- return 0;
+ return NULL;
}
HWND FacebookProto::CreateExtendedSearchUI(HWND owner)
{
- return 0;
+ return NULL;
}
int FacebookProto::RecvContacts(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int FacebookProto::RecvFile(HANDLE hContact,PROTORECVFILET *)
{
- return 0;
+ return 1;
}
int FacebookProto::RecvUrl(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int FacebookProto::SendContacts(HANDLE hContact,int flags,int nContacts,HANDLE *hContactsList)
{
- return 0;
+ return 1;
}
HANDLE FacebookProto::SendFile(HANDLE hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
- return 0;
+ return NULL;
}
int FacebookProto::SendUrl(HANDLE hContact,int flags,const char *url)
{
- return 0;
+ return 1;
}
int FacebookProto::SetApparentMode(HANDLE hContact,int mode)
{
- return 0;
+ return 1;
}
int FacebookProto::RecvAwayMsg(HANDLE hContact,int mode,PROTORECVEVENT *evt)
{
- return 0;
+ return 1;
}
int FacebookProto::SendAwayMsg(HANDLE hContact,HANDLE hProcess,const char *msg)
{
- return 0;
+ return 1;
}
diff --git a/protocols/Gadu-Gadu/filetransfer.cpp b/protocols/Gadu-Gadu/filetransfer.cpp index d7c7aa52d5..0637273ddb 100644 --- a/protocols/Gadu-Gadu/filetransfer.cpp +++ b/protocols/Gadu-Gadu/filetransfer.cpp @@ -870,8 +870,7 @@ int GGPROTO::FileDeny(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReas int GGPROTO::RecvFile(HANDLE hContact, PROTOFILEEVENT* pre)
{
- CCSDATA ccs = { hContact, PSR_FILE, 0, ( LPARAM )pre };
- return CallService( MS_PROTO_RECVFILE, 0, ( LPARAM )&ccs );
+ return Proto_RecvFile(hContact, pre);
}
////////////////////////////////////////////////////////////
diff --git a/protocols/Gadu-Gadu/gg_proto.cpp b/protocols/Gadu-Gadu/gg_proto.cpp index 5342193547..0a0db3a173 100644 --- a/protocols/Gadu-Gadu/gg_proto.cpp +++ b/protocols/Gadu-Gadu/gg_proto.cpp @@ -125,19 +125,19 @@ GGPROTO::~GGPROTO() // Dummies for function that have to be implemented
HANDLE GGPROTO::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
-int GGPROTO::Authorize(HANDLE hDbEvent) { return 0; }
-int GGPROTO::AuthDeny(HANDLE hDbEvent, const TCHAR *szReason) { return 0; }
-int GGPROTO::AuthRecv(HANDLE hContact, PROTORECVEVENT *pre) { return 0; }
-int GGPROTO::AuthRequest(HANDLE hContact, const TCHAR *szMessage) { return 0; }
+int GGPROTO::Authorize(HANDLE hDbEvent) { return 1; }
+int GGPROTO::AuthDeny(HANDLE hDbEvent, const TCHAR *szReason) { return 1; }
+int GGPROTO::AuthRecv(HANDLE hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::AuthRequest(HANDLE hContact, const TCHAR *szMessage) { return 1; }
HANDLE GGPROTO::ChangeInfo(int iInfoType, void *pInfoData) { return NULL; }
-int GGPROTO::FileResume(HANDLE hTransfer, int *action, const PROTOCHAR** szFilename) { return 0; }
+int GGPROTO::FileResume(HANDLE hTransfer, int *action, const PROTOCHAR** szFilename) { return 1; }
HANDLE GGPROTO::SearchByEmail(const PROTOCHAR *email) { return NULL; }
-int GGPROTO::RecvContacts(HANDLE hContact, PROTORECVEVENT *pre) { return 0; }
-int GGPROTO::RecvUrl(HANDLE hContact, PROTORECVEVENT *pre) { return 0; }
-int GGPROTO::SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE *hContactsList) { return 0; }
-int GGPROTO::SendUrl(HANDLE hContact, int flags, const char *url) { return 0; }
-int GGPROTO::RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT *evt) { return 0; }
-int GGPROTO::SendAwayMsg(HANDLE hContact, HANDLE hProcess, const char *msg) { return 0; }
+int GGPROTO::RecvContacts(HANDLE hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::RecvUrl(HANDLE hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE *hContactsList) { return 1; }
+int GGPROTO::SendUrl(HANDLE hContact, int flags, const char *url) { return 1; }
+int GGPROTO::RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT *evt) { return 1; }
+int GGPROTO::SendAwayMsg(HANDLE hContact, HANDLE hProcess, const char *msg) { return 1; }
//////////////////////////////////////////////////////////
// when contact is added to list
@@ -558,8 +558,7 @@ HWND GGPROTO::CreateExtendedSearchUI(HWND owner) int GGPROTO::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
{
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, ( LPARAM )pre };
- return CallService(MS_PROTO_RECVMSG, 0, ( LPARAM )&ccs);
+ return Proto_RecvMessage(hContact, pre);
}
//////////////////////////////////////////////////////////
diff --git a/protocols/IRCG/ircproto.cpp b/protocols/IRCG/ircproto.cpp index b81880247e..9ff2a1c851 100644 --- a/protocols/IRCG/ircproto.cpp +++ b/protocols/IRCG/ircproto.cpp @@ -656,8 +656,7 @@ int __cdecl CIrcProto::RecvContacts( HANDLE, PROTORECVEVENT* ) int __cdecl CIrcProto::RecvFile( HANDLE hContact, PROTORECVFILET* evt )
{
- CCSDATA ccs = { hContact, PSR_FILE, 0, ( LPARAM )evt };
- return CallService( MS_PROTO_RECVFILET, 0, ( LPARAM )&ccs );
+ return Proto_RecvFile(hContact, evt);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -665,8 +664,7 @@ int __cdecl CIrcProto::RecvFile( HANDLE hContact, PROTORECVFILET* evt ) int __cdecl CIrcProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* evt )
{
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, ( LPARAM )evt };
- return CallService( MS_PROTO_RECVMSG, 0, ( LPARAM )&ccs );
+ return Proto_RecvMessage(hContact, evt);
}
////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/IcqOscarJ/icq_proto.cpp b/protocols/IcqOscarJ/icq_proto.cpp index 7df3c037d3..017bfe5482 100755 --- a/protocols/IcqOscarJ/icq_proto.cpp +++ b/protocols/IcqOscarJ/icq_proto.cpp @@ -439,38 +439,37 @@ HANDLE __cdecl CIcqProto::AddToListByEvent( int flags, int iContact, HANDLE hDbE if (strcmpnull(dbei.szModule, m_szModuleName))
return 0; // this event is not ours
- if (dbei.eventType == EVENTTYPE_CONTACTS)
- {
- int i;
- char *pbOffset, *pbEnd;
-
- for (i = 0, pbOffset = (char*)dbei.pBlob, pbEnd = pbOffset + dbei.cbBlob; i <= iContact; i++)
+ switch(dbei.eventType) {
+ case EVENTTYPE_CONTACTS:
{
- pbOffset += strlennull(pbOffset) + 1; // Nick
- if (pbOffset >= pbEnd) break;
- if (i == iContact)
- { // we found the contact, get uid
- if (IsStringUIN((char*)pbOffset))
- uin = atoi((char*)pbOffset);
- else
- {
- uin = 0;
- strcpy(uid, (char*)pbOffset);
+ char *pbOffset = (char*)dbei.pBlob;
+ char *pbEnd = pbOffset + dbei.cbBlob;
+ for (int i = 0; i <= iContact; i++) {
+ pbOffset += strlennull(pbOffset) + 1; // Nick
+ if (pbOffset >= pbEnd) break;
+ if (i == iContact)
+ { // we found the contact, get uid
+ if (IsStringUIN((char*)pbOffset))
+ uin = atoi((char*)pbOffset);
+ else
+ {
+ uin = 0;
+ strcpy(uid, (char*)pbOffset);
+ }
}
+ pbOffset += strlennull(pbOffset) + 1; // Uin
+ if (pbOffset >= pbEnd) break;
}
- pbOffset += strlennull(pbOffset) + 1; // Uin
- if (pbOffset >= pbEnd) break;
}
- }
- else if (dbei.eventType != EVENTTYPE_AUTHREQUEST && dbei.eventType != EVENTTYPE_ADDED)
- {
- return 0;
- }
- else // auth req or added event
- {
- HANDLE hContact = *(HANDLE*)(dbei.pBlob + sizeof(DWORD)); // this sucks - awaiting new auth system
- if (getContactUid(hContact, &uin, &uid))
+ break;
+
+ case EVENTTYPE_AUTHREQUEST:
+ case EVENTTYPE_ADDED:
+ if ( getContactUid( DbGetAuthEventContact(&dbei), &uin, &uid))
return 0;
+
+ default:
+ return 0;
}
if (uin != 0)
@@ -549,7 +548,6 @@ int __cdecl CIcqProto::AuthRecv( HANDLE hContact, PROTORECVEVENT* pre ) return 0;
}
-
////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
@@ -1111,8 +1109,7 @@ int __cdecl CIcqProto::RecvContacts( HANDLE hContact, PROTORECVEVENT* pre ) int __cdecl CIcqProto::RecvFile( HANDLE hContact, PROTORECVFILET* evt )
{
- CCSDATA ccs = { hContact, PSR_FILE, 0, ( LPARAM )evt };
- return CallService( MS_PROTO_RECVFILE, 0, ( LPARAM )&ccs );
+ return Proto_RecvFile(hContact, evt);
}
diff --git a/protocols/IcqOscarJ/utilities.cpp b/protocols/IcqOscarJ/utilities.cpp index 4f68ecb535..70f7547108 100644 --- a/protocols/IcqOscarJ/utilities.cpp +++ b/protocols/IcqOscarJ/utilities.cpp @@ -593,12 +593,10 @@ HANDLE CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added) HANDLE CIcqProto::HContactFromAuthEvent(HANDLE hEvent)
{
- DBEVENTINFO dbei;
+ DBEVENTINFO dbei = { sizeof(dbei) };
DWORD body[3];
- ZeroMemory(&dbei, sizeof(dbei));
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = sizeof(DWORD) + sizeof(HANDLE);
+ dbei.cbBlob = sizeof(DWORD)*2;
dbei.pBlob = (PBYTE)&body;
if (CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbei))
@@ -610,7 +608,7 @@ HANDLE CIcqProto::HContactFromAuthEvent(HANDLE hEvent) if (strcmpnull(dbei.szModule, m_szModuleName))
return INVALID_HANDLE_VALUE;
- return *(HANDLE*)&body[1]; // this is bad - needs new auth system
+ return DbGetAuthEventContact(&dbei);
}
char *NickFromHandle(HANDLE hContact)
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 )¶m );
+ CallService( MO_BUILDMENU, ( WPARAM )hMenu, ( LPARAM )¶m );
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
diff --git a/protocols/MRA/MraProto.cpp b/protocols/MRA/MraProto.cpp index 5ee6c3bbd1..7be880f92f 100644 --- a/protocols/MRA/MraProto.cpp +++ b/protocols/MRA/MraProto.cpp @@ -273,7 +273,7 @@ HANDLE CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) !strcmp(dbei.szModule, m_szModuleName) &&
(dbei.eventType == EVENTTYPE_AUTHREQUEST || dbei.eventType == EVENTTYPE_CONTACTS)) {
- char *nick = (char*)(dbei.pBlob + sizeof(DWORD)+ sizeof(HANDLE));
+ char *nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
char *firstName = nick + strlen(nick) + 1;
char *lastName = firstName + strlen(firstName) + 1;
char *email = lastName + strlen(lastName) + 1;
@@ -342,16 +342,7 @@ int CMraProto::AuthDeny(HANDLE hDBEvent, const TCHAR* szReason) int CMraProto::AuthRecv(HANDLE hContact, PROTORECVEVENT* pre)
{
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof(dbei);
- dbei.szModule = m_szModuleName;
- dbei.timestamp = pre->timestamp;
- dbei.flags = (pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0;
- dbei.eventType = EVENTTYPE_AUTHREQUEST;
- dbei.cbBlob = pre->lParam;
- dbei.pBlob = (PBYTE)pre->szMessage;
- CallService(MS_DB_EVENT_ADD, (WPARAM)NULL, (LPARAM)&dbei);
- return 0;
+ return Proto_AuthRecv(m_szModuleName, pre);
}
int CMraProto::AuthRequest(HANDLE hContact, const TCHAR *lptszMessage)
@@ -507,15 +498,12 @@ int CMraProto::RecvContacts(HANDLE hContact, PROTORECVEVENT* pre) int CMraProto::RecvFile(HANDLE hContact, PROTORECVFILET *pre)
{
- CallService(MS_PROTO_RECVFILET, 0, (LPARAM)pre);
- return 0;
+ return Proto_RecvFile(hContact, pre);
}
int CMraProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
{
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)pre };
- CallService(MS_PROTO_RECVMSG, 0, (LPARAM)&ccs);
- return 0;
+ return Proto_RecvMessage(hContact, pre);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/MSN/msn.cpp b/protocols/MSN/msn.cpp index 9399bf6e3a..de85a0c6bf 100644 --- a/protocols/MSN/msn.cpp +++ b/protocols/MSN/msn.cpp @@ -126,7 +126,7 @@ extern "C" int __declspec(dllexport) Load(void) pd.fnInit = (pfnInitProto)msnProtoInit;
pd.fnUninit = (pfnUninitProto)msnProtoUninit;
pd.type = PROTOTYPE_PROTOCOL;
- MSN_CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
+ CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
MsnInitIcons();
MSN_InitContactMenu();
diff --git a/protocols/MSN/msn_auth.cpp b/protocols/MSN/msn_auth.cpp index 065f4c0247..32bbe01e0d 100644 --- a/protocols/MSN/msn_auth.cpp +++ b/protocols/MSN/msn_auth.cpp @@ -133,7 +133,7 @@ int CMsnProto::MSN_GetPassportAuth(void) char szPassword[100];
getStaticString(NULL, "Password", szPassword, sizeof(szPassword));
- MSN_CallService(MS_DB_CRYPT_DECODESTRING, strlen(szPassword)+1, (LPARAM)szPassword);
+ CallService(MS_DB_CRYPT_DECODESTRING, strlen(szPassword)+1, (LPARAM)szPassword);
szPassword[16] = 0;
char* szEncPassword = HtmlEncode(szPassword);
@@ -254,7 +254,7 @@ int CMsnProto::MSN_GetPassportAuth(void) if (errurl)
{
MSN_DebugLog("Starting URL: '%s'", errurl);
- MSN_CallService(MS_UTILS_OPENURL, 1, (LPARAM)errurl);
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)errurl);
}
ezxml_t tokf = ezxml_get(xml, "S:Body", 0, "S:Fault", 0, "S:Detail", -1);
@@ -436,7 +436,7 @@ char* CMsnProto::GenerateLoginBlob(char* challenge) unsigned char* key1 = (unsigned char*)alloca(key1len);
NETLIBBASE64 nlb = { authSecretToken, (int)keylen, key1, (int)key1len };
- MSN_CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb));
key1len = nlb.cbDecoded;
mir_sha1_byte_t key2[MIR_SHA1_HASH_SIZE+4];
@@ -464,7 +464,7 @@ char* CMsnProto::GenerateLoginBlob(char* challenge) p += sizeof(MsgrUsrKeyHdr);
unsigned char iv[8];
- MSN_CallService(MS_UTILS_GETRANDOM, sizeof(iv), (LPARAM)iv);
+ CallService(MS_UTILS_GETRANDOM, sizeof(iv), (LPARAM)iv);
memcpy(p, iv, sizeof(iv));
p += sizeof(iv);
@@ -483,7 +483,7 @@ char* CMsnProto::GenerateLoginBlob(char* challenge) char* buf = (char*)mir_alloc(rlen);
NETLIBBASE64 nlb1 = { buf, (int)rlen, userKey, (int)pktsz };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb1));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb1));
return buf;
}
@@ -492,14 +492,14 @@ char* CMsnProto::GenerateLoginBlob(char* challenge) char* CMsnProto::HotmailLogin(const char* url)
{
unsigned char nonce[24];
- MSN_CallService(MS_UTILS_GETRANDOM, sizeof(nonce), (LPARAM)nonce);
+ CallService(MS_UTILS_GETRANDOM, sizeof(nonce), (LPARAM)nonce);
const size_t hotSecretlen = strlen(hotSecretToken);
size_t key1len = Netlib_GetBase64DecodedBufferSize(hotSecretlen);
unsigned char* key1 = (unsigned char*)alloca(key1len);
NETLIBBASE64 nlb = { hotSecretToken, (int)hotSecretlen, key1, (int)key1len };
- MSN_CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb));
key1len = nlb.cbDecoded;
static const unsigned char encdata[] = "WS-SecureConversation";
@@ -519,7 +519,7 @@ char* CMsnProto::HotmailLogin(const char* url) size_t noncenclen = Netlib_GetBase64EncodedBufferSize(sizeof(nonce));
char* noncenc = (char*)alloca(noncenclen);
NETLIBBASE64 nlb1 = { noncenc, (int)noncenclen, nonce, sizeof(nonce) };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb1));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb1));
noncenclen = nlb1.cchEncoded - 1;
const size_t fnpstlen = strlen(xmlenc) + strlen(url) + 3*noncenclen + 100;
@@ -534,7 +534,7 @@ char* CMsnProto::HotmailLogin(const char* url) hmac_sha1(hash, key2, sizeof(key2), (mir_sha1_byte_t*)fnpst, sz);
NETLIBBASE64 nlb2 = { noncenc, (int)noncenclen, hash, sizeof(hash) };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb2));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb2));
sz += mir_snprintf(fnpst + sz, fnpstlen - sz, "&hash=");
diff --git a/protocols/MSN/msn_chat.cpp b/protocols/MSN/msn_chat.cpp index 58bfcbf866..620477c6a3 100644 --- a/protocols/MSN/msn_chat.cpp +++ b/protocols/MSN/msn_chat.cpp @@ -382,7 +382,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) {
char *email = mir_t2a(gch->ptszUID);
HANDLE hContact = MSN_HContactFromEmail(email);
- MSN_CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
+ CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
mir_free(email);
break;
}
@@ -410,11 +410,11 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) switch(gch->dwData)
{
case 10:
- MSN_CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
break;
case 20:
- MSN_CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
+ CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
break;
case 110:
diff --git a/protocols/MSN/msn_commands.cpp b/protocols/MSN/msn_commands.cpp index 76dab93234..5a239dd986 100644 --- a/protocols/MSN/msn_commands.cpp +++ b/protocols/MSN/msn_commands.cpp @@ -161,7 +161,7 @@ void CMsnProto::sttInviteMessage(ThreadData* info, char* msgBody, char* email, c ccs.szProtoService = PSR_FILE;
ccs.wParam = 0;
ccs.lParam = (LPARAM)⪯
- MSN_CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
return;
}
@@ -310,7 +310,7 @@ void CMsnProto::sttCustomSmiley(const char* msgBody, char* email, char* nick, in char* buf = (char*)mir_alloc(rlen);
NETLIBBASE64 nlb = { buf, (int)rlen, (PBYTE)lastsml, (int)slen };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
char* smileyName = (char*)mir_alloc(rlen*3);
UrlEncode(buf, smileyName, rlen*3);
@@ -509,7 +509,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para {
if (!sentMsg)
{
- MSN_CallService(MS_PROTO_CONTACTISTYPING, WPARAM(ccs.hContact), 0);
+ CallService(MS_PROTO_CONTACTISTYPING, WPARAM(ccs.hContact), 0);
PROTORECVEVENT pre;
pre.szMessage = (char*)msgBody;
@@ -520,7 +520,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para ccs.szProtoService = PSR_MESSAGE;
ccs.wParam = 0;
ccs.lParam = (LPARAM)⪯
- MSN_CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
}
else
{
@@ -535,7 +535,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para dbei.timestamp = time(NULL);
dbei.cbBlob = (unsigned)strlen(msgBody) + 1;
dbei.pBlob = (PBYTE)msgBody;
- MSN_CallService(MS_DB_EVENT_ADD, (WPARAM)ccs.hContact, (LPARAM)&dbei);
+ CallService(MS_DB_EVENT_ADD, (WPARAM)ccs.hContact, (LPARAM)&dbei);
}
}
}
@@ -564,7 +564,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para if (tTypingUser != NULL && info->mChatID[0] == 0 && _stricmp(email, MyOptions.szEmail))
{
HANDLE hContact = MSN_HContactFromEmail(tTypingUser, tTypingUser);
- MSN_CallService(MS_PROTO_CONTACTISTYPING, (WPARAM) hContact, 7);
+ CallService(MS_PROTO_CONTACTISTYPING, (WPARAM) hContact, 7);
}
}
else if (!_strnicmp(tContentType, "text/x-msnmsgr-datacast", 23))
@@ -789,7 +789,7 @@ void CMsnProto::sttProcessRemove(char* buf, size_t len) {
if (msc->hContact && _stricmp(szEmail, MyOptions.szEmail))
{
- MSN_CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0);
msc->hContact = NULL;
}
}
@@ -984,7 +984,7 @@ void CMsnProto::sttProcessPage(char* buf, unsigned len) ccs.hContact = MSN_HContactFromEmail(szTel, szTel, true, true);
ccs.szProtoService = PSR_MESSAGE;
ccs.lParam = (LPARAM)⪯
- MSN_CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
}
ezxml_free(xmlnot);
diff --git a/protocols/MSN/msn_contact.cpp b/protocols/MSN/msn_contact.cpp index f87a6fafca..086bf6b3ed 100644 --- a/protocols/MSN/msn_contact.cpp +++ b/protocols/MSN/msn_contact.cpp @@ -33,8 +33,8 @@ HANDLE CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick, if (hContact == NULL && addIfNeeded)
{
- hContact = (HANDLE)MSN_CallService(MS_DB_CONTACT_ADD, 0, 0);
- MSN_CallService(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);
setString(hContact, "e-mail", szEmail);
setStringUtf(hContact, "Nick", msnNick ? msnNick : wlid);
if (temporary)
diff --git a/protocols/MSN/msn_ftold.cpp b/protocols/MSN/msn_ftold.cpp index fcf894c4e2..6ed5ce08af 100644 --- a/protocols/MSN/msn_ftold.cpp +++ b/protocols/MSN/msn_ftold.cpp @@ -342,7 +342,7 @@ void CMsnProto::msnftp_startFileSend(ThreadData* info, const char* Invcommand, c nlb.pfnNewConnectionV2 = MSN_ConnectionProc;
nlb.pExtra = this;
- sb = (HANDLE)MSN_CallService(MS_NETLIB_BINDPORT, (WPARAM)hNetlibUser, (LPARAM)&nlb);
+ sb = (HANDLE)CallService(MS_NETLIB_BINDPORT, (WPARAM)hNetlibUser, (LPARAM)&nlb);
if (sb == NULL)
MSN_DebugLog("Unable to bind the port for incoming transfers");
}
diff --git a/protocols/MSN/msn_global.h b/protocols/MSN/msn_global.h index 955c3123db..0e348901f7 100644 --- a/protocols/MSN/msn_global.h +++ b/protocols/MSN/msn_global.h @@ -179,12 +179,6 @@ bool MSN_MsgWndExist(HANDLE hContact); #define MSN_SendNickname(a) MSN_SendNicknameUtf(UTF8(a))
-#if defined(_DEBUG)
-#define MSN_CallService CallService
-#else
-INT_PTR MSN_CallService(const char* szSvcName, WPARAM wParam, LPARAM lParam);
-#endif
-
void MSN_FreeVariant(DBVARIANT* dbv);
char* MSN_Translate(const char* str);
unsigned MSN_GenRandom(void);
diff --git a/protocols/MSN/msn_http.cpp b/protocols/MSN/msn_http.cpp index 5f727ef30b..a53f9401fb 100644 --- a/protocols/MSN/msn_http.cpp +++ b/protocols/MSN/msn_http.cpp @@ -42,7 +42,7 @@ int msn_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION* nloc, NETLIBHTTPREQU nlhpi.szHttpPostUrl = "messenger.hotmail.com";
nlhpi.flags = NLHPIF_HTTP11;
nlhpi.combinePackets = MSN_PACKETS_COMBINE;
- return MSN_CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi);
+ return CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi);
}
//=======================================================================================
diff --git a/protocols/MSN/msn_links.cpp b/protocols/MSN/msn_links.cpp index 7da85b3202..1d54afd64c 100644 --- a/protocols/MSN/msn_links.cpp +++ b/protocols/MSN/msn_links.cpp @@ -111,7 +111,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) psr.flags = PSR_TCHAR;
psr.nick = email;
psr.email = email;
- MSN_CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
}
return 0;
}
diff --git a/protocols/MSN/msn_lists.cpp b/protocols/MSN/msn_lists.cpp index 5325e8190b..8e4b48a129 100644 --- a/protocols/MSN/msn_lists.cpp +++ b/protocols/MSN/msn_lists.cpp @@ -236,10 +236,10 @@ void CMsnProto::Lists_Remove(int list, const char* email) void CMsnProto::Lists_Populate(void)
{
- HANDLE hContact = (HANDLE)MSN_CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while (hContact != NULL)
{
- HANDLE hContactN = (HANDLE)MSN_CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ HANDLE hContactN = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
if (MSN_IsMyContact(hContact))
{
char szEmail[MSN_MAX_EMAIL_LEN] = "";;
@@ -255,7 +255,7 @@ void CMsnProto::Lists_Populate(void) Lists_Add(0, NETID_UNKNOWN, szEmail, hContact);
}
else
- MSN_CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
}
hContact = hContactN;
}
@@ -304,7 +304,7 @@ void CMsnProto::MSN_CleanupLists(void) if (!(p.list & (LIST_LL | LIST_FL)))
{
- MSN_CallService(MS_DB_CONTACT_DELETE, (WPARAM)p.hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)p.hContact, 0);
p.hContact = NULL;
}
@@ -322,7 +322,7 @@ void CMsnProto::MSN_CleanupLists(void) cont.type = 0;
cont.path = path;
- MSN_CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, (LPARAM)&cont);
+ CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, (LPARAM)&cont);
}
}
}
@@ -571,7 +571,7 @@ static void SaveSettings(HANDLE hItem, HWND hwndList, CMsnProto* proto) {
if (!IsHContactInfo(hItem))
{
- MSN_CallService(MS_DB_CONTACT_DELETE, (WPARAM)hItem, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hItem, 0);
MsnContact* msc = proto->Lists_Get(szEmail);
if (msc) msc->hContact = NULL;
}
diff --git a/protocols/MSN/msn_mail.cpp b/protocols/MSN/msn_mail.cpp index 57996b65ac..869642d1d4 100644 --- a/protocols/MSN/msn_mail.cpp +++ b/protocols/MSN/msn_mail.cpp @@ -126,7 +126,7 @@ void CMsnProto::getOIMs(ezxml_t xmli) ccs.hContact = MSN_HContactFromEmail(szEmail);
ccs.szProtoService = PSR_MESSAGE;
ccs.lParam = (LPARAM)⪯
- MSN_CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
mir_free(pre.szMessage);
ezxml_t delmid = ezxml_add_child(delmids, "messageId", 0);
diff --git a/protocols/MSN/msn_menu.cpp b/protocols/MSN/msn_menu.cpp index e90480fb32..1913483b36 100644 --- a/protocols/MSN/msn_menu.cpp +++ b/protocols/MSN/msn_menu.cpp @@ -155,17 +155,17 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_ICONFROMICOLIB;
if (noChat) mi.flags |= CMIF_HIDDEN;
mi.pszName = (char*)((listId & LIST_BL) ? "&Unblock" : "&Block");
- MSN_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hBlockMenuItem, (LPARAM)&mi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hBlockMenuItem, (LPARAM)&mi);
mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_ICONFROMICOLIB;
if (!emailEnabled) mi.flags |= CMIF_HIDDEN;
mi.pszName = isMe ? LPGEN("Open &Hotmail Inbox") : LPGEN("Send &Hotmail E-mail");
- MSN_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hOpenInboxMenuItem, (LPARAM)&mi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hOpenInboxMenuItem, (LPARAM)&mi);
mi.flags = CMIM_FLAGS | CMIF_ICONFROMICOLIB | CMIF_NOTOFFLINE;
if (noChat) mi.flags |= CMIF_HIDDEN;
- MSN_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hNetmeetingMenuItem, (LPARAM)&mi);
- MSN_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hChatInviteMenuItem, (LPARAM)&mi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hNetmeetingMenuItem, (LPARAM)&mi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hChatInviteMenuItem, (LPARAM)&mi);
}
return 0;
@@ -359,7 +359,7 @@ void CMsnProto::MsnInitMainMenu(void) void CMsnProto::MsnRemoveMainMenus(void)
{
if (mainMenuRoot)
- MSN_CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)mainMenuRoot, 0);
+ CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)mainMenuRoot, 0);
}
void CMsnProto::MSN_EnableMenuItems(bool bEnable)
@@ -373,14 +373,14 @@ void CMsnProto::MSN_EnableMenuItems(bool bEnable) for (unsigned i=0; i < SIZEOF(menuItemsMain); i++)
{
if (menuItemsMain[i] != NULL)
- MSN_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)menuItemsMain[i], (LPARAM)&mi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)menuItemsMain[i], (LPARAM)&mi);
}
if (bEnable)
{
mi.flags = CMIM_FLAGS;
if (!emailEnabled) mi.flags |= CMIF_HIDDEN;
- MSN_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)menuItemsMain[1], (LPARAM)&mi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)menuItemsMain[1], (LPARAM)&mi);
}
}
@@ -499,11 +499,11 @@ void MSN_RemoveContactMenus(void) {
UnhookEvent(hPrebuildMenuHook);
- MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hBlockMenuItem, 0);
- MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hLiveSpaceMenuItem, 0);
- MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hNetmeetingMenuItem, 0);
- MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hChatInviteMenuItem, 0);
- MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hOpenInboxMenuItem, 0);
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hBlockMenuItem, 0);
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hLiveSpaceMenuItem, 0);
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hNetmeetingMenuItem, 0);
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hChatInviteMenuItem, 0);
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hOpenInboxMenuItem, 0);
DestroyServiceFunction(hNetMeeting);
DestroyServiceFunction(hBlockCom);
diff --git a/protocols/MSN/msn_misc.cpp b/protocols/MSN/msn_misc.cpp index 12b07cd08e..c313fd4467 100644 --- a/protocols/MSN/msn_misc.cpp +++ b/protocols/MSN/msn_misc.cpp @@ -118,7 +118,7 @@ void CMsnProto::MSN_AddAuthRequest(const char *email, const char *nick, const c strcpy(pCurBlob, email); pCurBlob += emaillen + 1; // E-mail
strcpy(pCurBlob, reason); // Reason
- MSN_CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -133,7 +133,7 @@ void CMsnProto::MSN_DebugLog(const char *fmt, ...) if (_vsnprintf(str, sizeof(str), fmt, vararg) != 0)
{
str[sizeof(str)-1] = 0;
- MSN_CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)str);
+ CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)str);
}
va_end(vararg);
}
@@ -170,7 +170,7 @@ char* MSN_GetAvatarHash(char* szContext) const size_t len = strlen(szAvatarHash);
NETLIBBASE64 nlb = { (char*)szAvatarHash, (int)len, szActHash, sizeof(szActHash) };
- int decod = MSN_CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb));
+ int decod = CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb));
if (decod != 0 && nlb.cbDecoded > 0)
res = arrayToHex(szActHash, nlb.cbDecoded);
}
@@ -203,7 +203,7 @@ void CMsnProto::MSN_GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t c }
if (_taccess(pszDest, 0))
- MSN_CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
size_t tPathLen2 = tPathLen;
if (hContact != NULL)
@@ -323,7 +323,7 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen {
NETLIBBASE64 nlb = { szSha1d, sizeof(szSha1d), (PBYTE)sha1d, sizeof(sha1d) };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
}
mir_sha1_init(&sha1ctx);
@@ -359,7 +359,7 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen {
NETLIBBASE64 nlb = { szSha1c, sizeof(szSha1c), (PBYTE)sha1c, sizeof(sha1c) };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
}
// ezxml_set_attr(xmlp, "SHA1C", szSha1c);
@@ -457,7 +457,7 @@ void CMsnProto::MSN_GetCustomSmileyFileName(HANDLE hContact, TCHAR* pszDest, si }
if (!exist)
- MSN_CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
TCHAR *sztSmileyName = mir_a2t(SmileyName);
mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s.%s"), sztSmileyName,
@@ -580,7 +580,7 @@ int ThreadData::sendMessage(int msgType, const char* email, int netId, const cha void ThreadData::sendCaps(void)
{
char mversion[100], capMsg[1000];
- MSN_CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof(mversion), (LPARAM)mversion);
+ CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof(mversion), (LPARAM)mversion);
mir_snprintf(capMsg, sizeof(capMsg),
"Content-Type: text/x-clientcaps\r\n\r\n"
@@ -927,7 +927,7 @@ void CMsnProto::MsnInvokeMyURL(bool ismail, const char* url) }
MSN_DebugLog("Starting URL: '%s'", hippy);
- MSN_CallService(MS_UTILS_OPENURL, 1, (LPARAM)hippy);
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)hippy);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -938,7 +938,7 @@ void CMsnProto::MSN_ShowError(const char* msgtext, ...) TCHAR tBuffer[4096];
va_list tArgs;
- TCHAR *buf = (TCHAR*)MSN_CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)msgtext);
+ TCHAR *buf = (TCHAR*)CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)msgtext);
va_start(tArgs, msgtext);
mir_vsntprintf(tBuffer, SIZEOF(tBuffer), buf, tArgs);
@@ -971,7 +971,7 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara else
{
if (tData->url != NULL)
- MSN_CallService(MS_UTILS_OPENURL, 1, (LPARAM)tData->url);
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)tData->url);
}
}
PUDeletePopUp(hWnd);
@@ -1365,7 +1365,7 @@ char* MSN_Base64Decode(const char* str) }
NETLIBBASE64 nlb = { p, (int)len, (PBYTE)res, (int)reslen };
- if (!MSN_CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb))) nlb.cbDecoded = 0;
+ if (!CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM(&nlb))) nlb.cbDecoded = 0;
res[nlb.cbDecoded] = 0;
return res;
@@ -1373,7 +1373,7 @@ char* MSN_Base64Decode(const char* str) bool CMsnProto::MSN_IsMyContact(HANDLE hContact)
{
- const char* szProto = (char*)MSN_CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ const char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
return szProto != NULL && strcmp(m_szModuleName, szProto) == 0;
}
@@ -1396,14 +1396,14 @@ bool MSN_MsgWndExist(HANDLE hContact) MessageWindowData msgWinData = {0};
msgWinData.cbSize = sizeof(MessageWindowData);
- bool res = MSN_CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
+ bool res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
res = res || msgWinData.hwndWindow;
if (res)
{
- msgWinInData.hContact = (HANDLE)MSN_CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ msgWinInData.hContact = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
if (msgWinInData.hContact != NULL)
{
- res = MSN_CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
+ res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
res |= (msgWinData.hwndWindow == NULL);
}
}
diff --git a/protocols/MSN/msn_natdetect.cpp b/protocols/MSN/msn_natdetect.cpp index 827f51590d..0d17f4a530 100644 --- a/protocols/MSN/msn_natdetect.cpp +++ b/protocols/MSN/msn_natdetect.cpp @@ -194,7 +194,7 @@ void CMsnProto::MSNatDetect(void) nlb.pfnNewConnectionV2 = MSN_ConnectionProc;
nlb.pExtra = this;
- HANDLE sb = (HANDLE) MSN_CallService(MS_NETLIB_BINDPORT, (WPARAM)hNetlibUser, (LPARAM)&nlb);
+ HANDLE sb = (HANDLE) CallService(MS_NETLIB_BINDPORT, (WPARAM)hNetlibUser, (LPARAM)&nlb);
if ( sb != NULL )
{
MyConnection.upnpNAT = htonl(nlb.dwExternalIP) == MyConnection.extIP;
diff --git a/protocols/MSN/msn_opts.cpp b/protocols/MSN/msn_opts.cpp index b2fd4a9f8c..b92e21ee5b 100644 --- a/protocols/MSN/msn_opts.cpp +++ b/protocols/MSN/msn_opts.cpp @@ -80,7 +80,7 @@ HICON LoadIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "MSN_%s", name);
- return (HICON)MSN_CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
+ return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
}
HANDLE GetIconHandle(int iconId)
@@ -96,7 +96,7 @@ void ReleaseIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "MSN_%s", name);
- MSN_CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
}
INT_PTR CALLBACK DlgProcMsnServLists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -120,7 +120,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP char tBuffer[MAX_PATH];
if (!proto->getStaticString(NULL, "Password", tBuffer, sizeof(tBuffer)))
{
- MSN_CallService(MS_DB_CRYPT_DECODESTRING, strlen(tBuffer)+1, (LPARAM)tBuffer);
+ CallService(MS_DB_CRYPT_DECODESTRING, strlen(tBuffer)+1, (LPARAM)tBuffer);
tBuffer[16] = 0;
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, tBuffer);
}
@@ -161,7 +161,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_COMMAND:
if (LOWORD(wParam) == IDC_NEWMSNACCOUNTLINK)
{
- MSN_CallService(MS_UTILS_OPENURL, 1, (LPARAM)"https://signup.live.com");
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)"https://signup.live.com");
return TRUE;
}
@@ -278,7 +278,7 @@ LBL_Continue: }
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, sizeof(password));
- MSN_CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(password),(LPARAM)password);
+ CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(password),(LPARAM)password);
if (!proto->getString("Password", &dbv))
{
if (strcmp(password, dbv.pszVal))
@@ -601,7 +601,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L char tBuffer[MAX_PATH];
if (!proto->getStaticString(NULL, "Password", tBuffer, sizeof(tBuffer)))
{
- MSN_CallService(MS_DB_CRYPT_DECODESTRING, strlen(tBuffer)+1, (LPARAM)tBuffer);
+ CallService(MS_DB_CRYPT_DECODESTRING, strlen(tBuffer)+1, (LPARAM)tBuffer);
tBuffer[16] = 0;
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, tBuffer);
}
@@ -619,7 +619,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L case WM_COMMAND:
if (LOWORD(wParam) == IDC_NEWMSNACCOUNTLINK)
{
- MSN_CallService(MS_UTILS_OPENURL, 1, (LPARAM)"https://signup.live.com");
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)"https://signup.live.com");
return TRUE;
}
@@ -649,7 +649,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L }
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, sizeof(password));
- MSN_CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(password),(LPARAM)password);
+ CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(password),(LPARAM)password);
if (!proto->getString("Password", &dbv))
{
if (strcmp(password, dbv.pszVal))
diff --git a/protocols/MSN/msn_p2p.cpp b/protocols/MSN/msn_p2p.cpp index 84d1ee8d2c..599dee57fd 100644 --- a/protocols/MSN/msn_p2p.cpp +++ b/protocols/MSN/msn_p2p.cpp @@ -86,7 +86,7 @@ bool CMsnProto::p2p_createListener(filetransfer* ft, directconnection *dc, MimeH nlb.cbSize = sizeof(nlb);
nlb.pfnNewConnectionV2 = MSN_ConnectionProc;
nlb.pExtra = this;
- HANDLE sb = (HANDLE) MSN_CallService(MS_NETLIB_BINDPORT, (WPARAM) hNetlibUser, (LPARAM)&nlb);
+ HANDLE sb = (HANDLE) CallService(MS_NETLIB_BINDPORT, (WPARAM) hNetlibUser, (LPARAM)&nlb);
if (sb == NULL)
{
MSN_DebugLog("Unable to bind the port for incoming transfers");
@@ -278,7 +278,7 @@ void CMsnProto::p2p_savePicture2disk(filetransfer* ft) cont.path = pathcpy;
- MSN_CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, (LPARAM)&cont);
+ CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, (LPARAM)&cont);
mir_free(pathcpy);
}
break;
@@ -731,7 +731,7 @@ bool CMsnProto::p2p_connectTo(ThreadData* info, directconnection *dc) MSN_DebugLog("Connecting to %s:%d", tConn.szHost, tConn.wPort);
- info->s = (HANDLE)MSN_CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hNetlibUser, (LPARAM)&tConn);
+ info->s = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hNetlibUser, (LPARAM)&tConn);
if (info->s == NULL)
{
TWinErrorCode err;
@@ -1335,7 +1335,7 @@ void CMsnProto::p2p_InitFileTransfer( ccs.szProtoService = PSR_FILE;
ccs.wParam = 0;
ccs.lParam = (LPARAM)⪯
- MSN_CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
}
break;
@@ -2318,7 +2318,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid) int cbContextEnc = Netlib_GetBase64EncodedBufferSize((int)cbContext);
char* szContextEnc = (char*)alloca(cbContextEnc);
NETLIBBASE64 nlb = { szContextEnc, cbContextEnc, (PBYTE)pContext, (int)cbContext };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
MimeHeaders chdrs(10);
chdrs.addString("EUF-GUID", szAppID);
diff --git a/protocols/MSN/msn_proto.cpp b/protocols/MSN/msn_proto.cpp index db417d84d0..23abd2cfe6 100644 --- a/protocols/MSN/msn_proto.cpp +++ b/protocols/MSN/msn_proto.cpp @@ -50,19 +50,19 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : m_szProtoName[0] = (char)toupper(m_szProtoName[0]);
mir_snprintf(path, sizeof(path), "%s/Status", m_szModuleName);
- MSN_CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
mir_snprintf(path, sizeof(path), "%s/IdleTS", m_szModuleName);
- MSN_CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
mir_snprintf(path, sizeof(path), "%s/p2pMsgId", m_szModuleName);
- MSN_CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
mir_snprintf(path, sizeof(path), "%s/MobileEnabled", m_szModuleName);
- MSN_CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
mir_snprintf(path, sizeof(path), "%s/MobileAllowed", m_szModuleName);
- MSN_CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
// Protocol services and events...
hMSNNudge = CreateProtoEvent("/Nudge");
@@ -94,7 +94,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : LoadOptions();
- HANDLE hContact = (HANDLE)MSN_CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while (hContact != NULL)
{
if (MSN_IsMyContact(hContact))
@@ -104,7 +104,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : deleteSetting(hContact, "p2pMsgId");
deleteSetting(hContact, "AccList");
}
- hContact = (HANDLE)MSN_CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0);
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0);
}
deleteSetting(NULL, "MobileEnabled");
deleteSetting(NULL, "MobileAllowed");
@@ -149,7 +149,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : mir_snprintf(szDbsettings, sizeof(szDbsettings), "%s_HTTPS", m_szModuleName);
mir_sntprintf(szBuffer, SIZEOF(szBuffer), TranslateT("%s plugin HTTPS connections"), m_tszUserName);
- hNetlibUserHttps = (HANDLE)MSN_CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu1);
+ hNetlibUserHttps = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu1);
NETLIBUSER nlu = {0};
nlu.cbSize = sizeof(nlu);
@@ -163,7 +163,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : nlu.pfnHttpGatewayUnwrapRecv = msn_httpGatewayUnwrapRecv;
mir_sntprintf(szBuffer, SIZEOF(szBuffer), TranslateT("%s plugin connections"), m_tszUserName);
- hNetlibUser = (HANDLE)MSN_CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+ hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
}
CMsnProto::~CMsnProto()
@@ -290,15 +290,15 @@ HANDLE __cdecl CMsnProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEv {
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
- if ((dbei.cbBlob = MSN_CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == (DWORD)(-1))
+ if ((dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == (DWORD)(-1))
return NULL;
dbei.pBlob=(PBYTE) alloca(dbei.cbBlob);
- if (MSN_CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei)) return NULL;
+ if (CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei)) return NULL;
if (strcmp(dbei.szModule, m_szModuleName)) return NULL;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return NULL;
- char* nick = (char *) (dbei.pBlob + sizeof(DWORD) + sizeof(HANDLE));
+ char* nick = (char *) (dbei.pBlob + sizeof(DWORD)*2);
char* firstName = nick + strlen(nick) + 1;
char* lastName = firstName + strlen(firstName) + 1;
char* email = lastName + strlen(lastName) + 1;
@@ -308,21 +308,7 @@ HANDLE __cdecl CMsnProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEv int CMsnProto::AuthRecv(HANDLE hContact, PROTORECVEVENT* pre)
{
- DBEVENTINFO dbei = { 0 };
-
- dbei.cbSize = sizeof(dbei);
- dbei.szModule = m_szModuleName;
- dbei.timestamp = pre->timestamp;
- dbei.flags = (pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0;
- dbei.flags |= (pre->flags & PREF_UTF) ? DBEF_UTF : 0;
- dbei.eventType = EVENTTYPE_AUTHREQUEST;
-
- /* Just copy the Blob from PSR_AUTH event. */
- dbei.cbBlob = pre->lParam;
- dbei.pBlob = (PBYTE)pre->szMessage;
- MSN_CallService(MS_DB_EVENT_ADD, 0,(LPARAM)&dbei);
-
- return 0;
+ return Proto_AuthRecv(m_szModuleName, pre);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -375,11 +361,11 @@ int CMsnProto::Authorize(HANDLE hDbEvent) DBEVENTINFO dbei = { 0 };
dbei.cbSize = sizeof(dbei);
- if ((int)(dbei.cbBlob = MSN_CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == -1)
+ if ((int)(dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == -1)
return 1;
dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
- if (MSN_CallService(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)
@@ -388,7 +374,7 @@ int CMsnProto::Authorize(HANDLE hDbEvent) if (strcmp(dbei.szModule, m_szModuleName))
return 1;
- char* nick = (char*)(dbei.pBlob + sizeof(DWORD) + sizeof(HANDLE));
+ char* nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
char* firstName = nick + strlen(nick) + 1;
char* lastName = firstName + strlen(firstName) + 1;
char* email = lastName + strlen(lastName) + 1;
@@ -415,11 +401,11 @@ int CMsnProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) DBEVENTINFO dbei = { 0 };
dbei.cbSize = sizeof(dbei);
- if ((int)(dbei.cbBlob = MSN_CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == -1)
+ if ((int)(dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == -1)
return 1;
dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
- if (MSN_CallService(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)
@@ -428,7 +414,7 @@ int CMsnProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) if (strcmp(dbei.szModule, m_szModuleName))
return 1;
- char* nick = (char*)(dbei.pBlob + sizeof(DWORD) + sizeof(HANDLE));
+ char* nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
char* firstName = nick + strlen(nick) + 1;
char* lastName = firstName + strlen(firstName) + 1;
char* email = lastName + strlen(lastName) + 1;
@@ -442,10 +428,10 @@ int CMsnProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) if (!(msc->list & (LIST_FL | LIST_LL)))
{
- if (msc->hContact) MSN_CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0);
+ if (msc->hContact) CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0);
msc->hContact = NULL;
HANDLE hContact = MSN_HContactFromEmail(email);
- if (hContact) MSN_CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ if (hContact) CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
}
return 0;
@@ -808,8 +794,7 @@ int __cdecl CMsnProto::RecvContacts(HANDLE hContact, PROTORECVEVENT*) int __cdecl CMsnProto::RecvFile(HANDLE hContact, PROTOFILEEVENT* evt)
{
- CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)evt };
- return MSN_CallService(MS_PROTO_RECVFILET, 0, (LPARAM)&ccs);
+ return Proto_RecvFile(hContact, evt);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -823,9 +808,7 @@ int __cdecl CMsnProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre) if (Lists_IsInList(LIST_FL, tEmail))
DBDeleteContactSetting(hContact, "CList", "Hidden");
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)pre };
- MSN_CallService(MS_PROTO_RECVMSG, 0, (LPARAM)&ccs);
- return 0;
+ return Proto_RecvMessage(hContact, pre);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -1232,7 +1215,7 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l {
char szDbsettings[64];
mir_snprintf(szDbsettings, sizeof(szDbsettings), "%s_HTTPS", m_szModuleName);
- MSN_CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbsettings);
+ CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbsettings);
break;
}
@@ -1243,7 +1226,7 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l clmi.cbSize = sizeof(CLISTMENUITEM);
clmi.flags = CMIM_NAME | CMIF_TCHAR;
clmi.ptszName = m_tszUserName;
- MSN_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)mainMenuRoot, (LPARAM)&clmi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)mainMenuRoot, (LPARAM)&clmi);
}
break;
diff --git a/protocols/MSN/msn_soapab.cpp b/protocols/MSN/msn_soapab.cpp index df6f513dbf..b565305199 100644 --- a/protocols/MSN/msn_soapab.cpp +++ b/protocols/MSN/msn_soapab.cpp @@ -976,7 +976,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas char* szCircleTicketEnc = (char*)alloca(cbCircleTicketEnc);
NETLIBBASE64 nlb = { szCircleTicketEnc, cbCircleTicketEnc, (PBYTE)szCircleTicket, cbCircleTicket };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
if (szCircleTicketEnc[0])
msnNsThread->sendPacket("USR", "SHA A %s", szCircleTicketEnc);
diff --git a/protocols/MSN/msn_srv.cpp b/protocols/MSN/msn_srv.cpp index 5a4f611ad3..a01cd401da 100644 --- a/protocols/MSN/msn_srv.cpp +++ b/protocols/MSN/msn_srv.cpp @@ -346,7 +346,7 @@ void CMsnProto::msn_storeAvatarThread(void* arg) size_t szEncPngSize = Netlib_GetBase64EncodedBufferSize(dat->dataSize);
szEncBuf = (char*)mir_alloc(szEncPngSize);
NETLIBBASE64 nlb = { szEncBuf, (int)szEncPngSize, dat->data, (int)dat->dataSize };
- MSN_CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
+ CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb));
}
if (photoid[0] && dat)
diff --git a/protocols/MSN/msn_std.cpp b/protocols/MSN/msn_std.cpp index 082e0044ac..588df3c9e9 100644 --- a/protocols/MSN/msn_std.cpp +++ b/protocols/MSN/msn_std.cpp @@ -79,7 +79,7 @@ int CMsnProto::getStaticString(HANDLE hContact, const char* valueName, char* de sVal.pValue = &dbv;
sVal.szModule = m_szModuleName;
sVal.szSetting = valueName;
- if (MSN_CallService(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);
@@ -171,7 +171,7 @@ void CMsnProto::ForkThread(MsnThreadFunc pFunc, void* param) CloseHandle((HANDLE)mir_forkthreadowner((pThreadFuncOwner)*(void**)&pFunc, this, param, &threadID));
}
-int CMsnProto::SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+int CMsnProto::SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
ACKDATA ack = {0};
ack.cbSize = sizeof(ACKDATA);
@@ -181,21 +181,14 @@ int CMsnProto::SendBroadcast(HANDLE hContact, int type, int result, HANDLE hPro ack.result = result;
ack.hProcess = hProcess;
ack.lParam = lParam;
- return MSN_CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)&ack);
+ return CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)&ack);
}
-#if !defined(_DEBUG)
-INT_PTR MSN_CallService(const char* szSvcName, WPARAM wParam, LPARAM lParam)
-{
- return CallService(szSvcName, wParam, lParam);
-}
-#endif
-
-TCHAR* CMsnProto::GetContactNameT(HANDLE hContact)
+TCHAR* CMsnProto::GetContactNameT(HANDLE hContact)
{
if (hContact)
- return (TCHAR*)MSN_CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR);
+ return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR);
else
{
CONTACTINFO ci = {0};
@@ -214,7 +207,7 @@ void MSN_FreeVariant(DBVARIANT* dbv) DBFreeVariant(dbv);
}
-char* MSN_Translate(const char* str)
+char* MSN_Translate(const char* str)
{
return Translate(str);
}
@@ -222,6 +215,6 @@ char* MSN_Translate(const char* str) unsigned MSN_GenRandom(void)
{
unsigned rndnum;
- MSN_CallService(MS_UTILS_GETRANDOM, sizeof(rndnum), (LPARAM)&rndnum);
+ CallService(MS_UTILS_GETRANDOM, sizeof(rndnum), (LPARAM)&rndnum);
return rndnum & 0x7FFFFFFF;
}
diff --git a/protocols/MSN/msn_threads.cpp b/protocols/MSN/msn_threads.cpp index 3581f9afad..ca625b4fa1 100644 --- a/protocols/MSN/msn_threads.cpp +++ b/protocols/MSN/msn_threads.cpp @@ -133,7 +133,7 @@ void __cdecl CMsnProto::MSNServerThread(void* arg) MSN_DebugLog("Thread started: server='%s:%d', type=%d", tConn.szHost, tConn.wPort, info->mType);
- info->s = (HANDLE)MSN_CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hNetlibUser, (LPARAM)&tConn);
+ info->s = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hNetlibUser, (LPARAM)&tConn);
if (info->s == NULL)
{
MSN_DebugLog("Connection Failed (%d) server='%s:%d'", WSAGetLastError(), tConn.szHost, tConn.wPort);
@@ -152,7 +152,7 @@ void __cdecl CMsnProto::MSNServerThread(void* arg) }
if (usingGateway)
- MSN_CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(info->s), info->mGatewayTimeout);
+ CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(info->s), info->mGatewayTimeout);
MSN_DebugLog("Connected with handle=%08X", info->s);
@@ -321,14 +321,14 @@ void CMsnProto::MSN_CloseConnections(void) if (T->s != NULL && !T->sessionClosed && !T->termPending)
{
nls.hReadConns[0] = T->s;
- int res = MSN_CallService(MS_NETLIB_SELECTEX, 0, (LPARAM)&nls);
+ int res = CallService(MS_NETLIB_SELECTEX, 0, (LPARAM)&nls);
if (res >= 0 || nls.hReadStatus[0] == 0)
T->sendTerminate();
}
break;
case SERVER_P2P_DIRECT :
- MSN_CallService(MS_NETLIB_SHUTDOWN, (WPARAM)T->s, 0);
+ CallService(MS_NETLIB_SHUTDOWN, (WPARAM)T->s, 0);
break;
}
}
@@ -336,7 +336,7 @@ void CMsnProto::MSN_CloseConnections(void) LeaveCriticalSection(&sttLock);
if (hHttpsConnection)
- MSN_CallService(MS_NETLIB_SHUTDOWN, (WPARAM)hHttpsConnection, 0);
+ CallService(MS_NETLIB_SHUTDOWN, (WPARAM)hHttpsConnection, 0);
}
void CMsnProto::MSN_CloseThreads(void)
@@ -363,7 +363,7 @@ void CMsnProto::MSN_CloseThreads(void) ThreadData* T = &sttThreads[i];
if (T->s != NULL)
- MSN_CallService(MS_NETLIB_SHUTDOWN, (WPARAM)T->s, 0);
+ CallService(MS_NETLIB_SHUTDOWN, (WPARAM)T->s, 0);
}
LeaveCriticalSection(&sttLock);
@@ -729,7 +729,7 @@ void ThreadData::applyGatewayData(HANDLE hConn, bool isPoll) nlhpi.szHttpGetUrl = NULL;
nlhpi.szHttpPostUrl = szHttpPostUrl;
nlhpi.combinePackets = 5;
- MSN_CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi);
+ CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi);
}
void ThreadData::getGatewayUrl(char* dest, int destlen, bool isPoll)
diff --git a/protocols/MSN/msn_ws.cpp b/protocols/MSN/msn_ws.cpp index b1dff440c8..653343e7f8 100644 --- a/protocols/MSN/msn_ws.cpp +++ b/protocols/MSN/msn_ws.cpp @@ -33,10 +33,10 @@ int ThreadData::send(const char data[], size_t datalen) if (proto->usingGateway && !(mType == SERVER_FILETRANS || mType == SERVER_P2P_DIRECT))
{
mGatewayTimeout = 2;
- MSN_CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
+ CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
}
- int rlen = MSN_CallService(MS_NETLIB_SEND, (WPARAM)s, (LPARAM)&nlb);
+ int rlen = CallService(MS_NETLIB_SEND, (WPARAM)s, (LPARAM)&nlb);
if (rlen == SOCKET_ERROR)
{
// should really also check if sendlen is the same as datalen
@@ -127,7 +127,7 @@ int ThreadData::recv(char* data, size_t datalen) for (;;)
{
- int ret = MSN_CallService(MS_NETLIB_SELECT, 0, (LPARAM)&nls);
+ int ret = CallService(MS_NETLIB_SELECT, 0, (LPARAM)&nls);
if (ret < 0)
{
proto->MSN_DebugLog("Connection abortively closed, error %d", WSAGetLastError());
@@ -143,7 +143,7 @@ int ThreadData::recv(char* data, size_t datalen) }
LBL_RecvAgain:
- int ret = MSN_CallService(MS_NETLIB_RECV, (WPARAM)s, (LPARAM)&nlb);
+ int ret = CallService(MS_NETLIB_RECV, (WPARAM)s, (LPARAM)&nlb);
if (ret == 0)
{
proto->MSN_DebugLog("Connection closed gracefully");
@@ -163,14 +163,14 @@ LBL_RecvAgain: if (sessionClosed || isTimeout()) return 0;
if ((mGatewayTimeout += 2) > 20) mGatewayTimeout = 20;
- MSN_CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
+ CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
goto LBL_RecvAgain;
}
else
{
resetTimeout();
mGatewayTimeout = 1;
- MSN_CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
+ CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
}
}
diff --git a/protocols/Omegle/stubs.cpp b/protocols/Omegle/stubs.cpp index 825c60ac8c..b02fd71ef5 100644 --- a/protocols/Omegle/stubs.cpp +++ b/protocols/Omegle/stubs.cpp @@ -24,57 +24,57 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HANDLE OmegleProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
- return 0;
+ return NULL;
};
HANDLE OmegleProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
- return 0;
+ return NULL;
};
int OmegleProto::Authorize(HANDLE hDbEvent)
{
- return 0;
+ return 1;
}
int OmegleProto::AuthDeny(HANDLE hDbEvent,const PROTOCHAR *reason)
{
- return 0;
+ return 1;
}
int OmegleProto::AuthRecv(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int OmegleProto::AuthRequest(HANDLE hContact,const PROTOCHAR *message)
{
- return 0;
+ return 1;
}
HANDLE OmegleProto::ChangeInfo(int type,void *info_data)
{
- return 0;
+ return NULL;
}
HANDLE OmegleProto::FileAllow(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
- return 0;
+ return NULL;
}
int OmegleProto::FileCancel(HANDLE hContact,HANDLE hTransfer)
{
- return 0;
+ return 1;
}
int OmegleProto::FileDeny(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
- return 0;
+ return 1;
}
int OmegleProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filename)
{
- return 0;
+ return 1;
}
int OmegleProto::GetInfo( HANDLE hContact, int infoType )
@@ -84,90 +84,90 @@ int OmegleProto::GetInfo( HANDLE hContact, int infoType ) HANDLE OmegleProto::SearchBasic( const PROTOCHAR* id )
{
- return 0;
+ return NULL;
}
HANDLE OmegleProto::SearchByEmail( const PROTOCHAR* email )
{
- return 0;
+ return NULL;
}
HANDLE OmegleProto::SearchByName( const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName )
{
- return 0;
+ return NULL;
}
HWND OmegleProto::SearchAdvanced(HWND owner)
{
- return 0;
+ return NULL;
}
HWND OmegleProto::CreateExtendedSearchUI(HWND owner)
{
- return 0;
+ return NULL;
}
int OmegleProto::RecvContacts(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int OmegleProto::RecvFile(HANDLE hContact,PROTORECVFILET *)
{
- return 0;
+ return 1;
}
int OmegleProto::RecvUrl(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int OmegleProto::SendContacts(HANDLE hContact,int flags,int nContacts,HANDLE *hContactsList)
{
- return 0;
+ return 1;
}
HANDLE OmegleProto::SendFile(HANDLE hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
- return 0;
+ return NULL;
}
int OmegleProto::SendUrl(HANDLE hContact,int flags,const char *url)
{
- return 0;
+ return 1;
}
int OmegleProto::SetApparentMode(HANDLE hContact,int mode)
{
- return 0;
+ return 1;
}
int OmegleProto::RecvAwayMsg(HANDLE hContact,int mode,PROTORECVEVENT *evt)
{
- return 0;
+ return 1;
}
int OmegleProto::SendAwayMsg(HANDLE hContact,HANDLE hProcess,const char *msg)
{
- return 0;
+ return 1;
}
int OmegleProto::UserIsTyping(HANDLE hContact, int type)
{
- return 0;
+ return 1;
}
int OmegleProto::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
{
- return 0;
+ return 1;
}
HANDLE OmegleProto::GetAwayMsg( HANDLE hContact )
{
- return 0;
+ return NULL;
}
int OmegleProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
{
- return 0;
+ return 1;
}
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp index d81fe8163c..40f0e30ec4 100644 --- a/protocols/Twitter/proto.cpp +++ b/protocols/Twitter/proto.cpp @@ -147,8 +147,7 @@ HICON TwitterProto::GetIcon(int index) int TwitterProto::RecvMsg(HANDLE hContact,PROTORECVEVENT *pre)
{
- CCSDATA ccs = { hContact,PSR_MESSAGE,0,reinterpret_cast<LPARAM>(pre) };
- return (int)CallService(MS_PROTO_RECVMSG,0,reinterpret_cast<LPARAM>(&ccs));
+ return Proto_RecvMessage(hContact, pre);
}
// *************************
diff --git a/protocols/Twitter/stubs.cpp b/protocols/Twitter/stubs.cpp index 6dabe5ec76..472138abe3 100644 --- a/protocols/Twitter/stubs.cpp +++ b/protocols/Twitter/stubs.cpp @@ -19,121 +19,121 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HANDLE TwitterProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
- return 0;
+ return NULL;
}
int TwitterProto::Authorize(HANDLE hDbEvent)
{
- return 0;
+ return 1;
}
int TwitterProto::AuthDeny(HANDLE hDbEvent,const TCHAR *reason)
{
- return 0;
+ return 1;
}
int TwitterProto::AuthRecv(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int TwitterProto::AuthRequest(HANDLE hContact,const TCHAR *message)
{
- return 0;
+ return 1;
}
HANDLE TwitterProto::ChangeInfo(int type,void *info_data)
{
MessageBoxA(0,"ChangeInfo","",0);
- return 0;
+ return NULL;
}
HANDLE TwitterProto::FileAllow(HANDLE hContact,HANDLE hTransfer,const TCHAR *path)
{
- return 0;
+ return NULL;
}
int TwitterProto::FileCancel(HANDLE hContact,HANDLE hTransfer)
{
- return 0;
+ return 1;
}
int TwitterProto::FileDeny(HANDLE hContact,HANDLE hTransfer,const TCHAR *reason)
{
- return 0;
+ return 1;
}
int TwitterProto::FileResume(HANDLE hTransfer,int *action,const TCHAR **filename)
{
- return 0;
+ return 1;
}
HANDLE TwitterProto::SearchByName(const TCHAR *nick,const TCHAR *first_name, const TCHAR *last_name)
{
- return 0;
+ return NULL;
}
HWND TwitterProto::SearchAdvanced(HWND owner)
{
- return 0;
+ return NULL;
}
HWND TwitterProto::CreateExtendedSearchUI(HWND owner)
{
- return 0;
+ return NULL;
}
int TwitterProto::RecvContacts(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int TwitterProto::RecvFile(HANDLE hContact,PROTORECVFILET *)
{
- return 0;
+ return 1;
}
int TwitterProto::RecvUrl(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int TwitterProto::SendContacts(HANDLE hContact,int flags,int nContacts,HANDLE *hContactsList)
{
- return 0;
+ return 1;
}
HANDLE TwitterProto::SendFile(HANDLE hContact,const TCHAR *desc, TCHAR **files)
{
- return 0;
+ return NULL;
}
int TwitterProto::SendUrl(HANDLE hContact,int flags,const char *url)
{
- return 0;
+ return 1;
}
int TwitterProto::SetApparentMode(HANDLE hContact,int mode)
{
- return 0;
+ return 1;
}
int TwitterProto::RecvAwayMsg(HANDLE hContact,int mode,PROTORECVEVENT *evt)
{
- return 0;
+ return 1;
}
int TwitterProto::SendAwayMsg(HANDLE hContact,HANDLE hProcess,const char *msg)
{
- return 0;
+ return 1;
}
int TwitterProto::SetAwayMsg(int status,const TCHAR *msg)
{
- return 0;
+ return 1;
}
int TwitterProto::UserIsTyping(HANDLE hContact,int type)
{
- return 0;
+ return 1;
}
\ No newline at end of file diff --git a/protocols/Yahoo/avatar.cpp b/protocols/Yahoo/avatar.cpp index a838e24ea1..c35707203d 100644 --- a/protocols/Yahoo/avatar.cpp +++ b/protocols/Yahoo/avatar.cpp @@ -648,7 +648,7 @@ void CYahooProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, int cbLen, }
if ( _taccess(pszDest, 0))
- YAHOO_CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
if (hContact != NULL) {
int ck_sum = DBGetContactSettingDword(hContact, m_szModuleName,"PictCK", 0);
diff --git a/protocols/Yahoo/chat.cpp b/protocols/Yahoo/chat.cpp index 9275d90e86..4477e5a0d9 100644 --- a/protocols/Yahoo/chat.cpp +++ b/protocols/Yahoo/chat.cpp @@ -259,7 +259,7 @@ void CYahooProto::ChatEvent(const char* room, const char* who, int evt, const TC TCHAR* snt = mir_a2t(who);
HANDLE hContact = getbuddyH(who);
- TCHAR* nick = hContact ? (TCHAR*)YAHOO_CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR) : snt;
+ TCHAR* nick = hContact ? (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR) : snt;
GCDEST gcd = { m_szModuleName, { NULL }, evt };
gcd.ptszID = idt;
@@ -320,7 +320,7 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) break;
case GC_USER_PRIVMESS:
- YAHOO_CallService(MS_MSG_SENDMESSAGE, (WPARAM)getbuddyH(who), 0);
+ CallService(MS_MSG_SENDMESSAGE, (WPARAM)getbuddyH(who), 0);
break;
case GC_USER_LOGMENU:
@@ -341,11 +341,11 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) switch (gch->dwData)
{
case 10:
- YAHOO_CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)getbuddyH(who), 0);
+ CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)getbuddyH(who), 0);
break;
case 20:
- YAHOO_CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)getbuddyH(who), 0);
+ CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)getbuddyH(who), 0);
break;
case 110:
diff --git a/protocols/Yahoo/icolib.cpp b/protocols/Yahoo/icolib.cpp index edb364eece..09ad4853b0 100644 --- a/protocols/Yahoo/icolib.cpp +++ b/protocols/Yahoo/icolib.cpp @@ -82,5 +82,5 @@ void CYahooProto::ReleaseIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "YAHOO_%s", name);
- YAHOO_CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
}
diff --git a/protocols/Yahoo/im.cpp b/protocols/Yahoo/im.cpp index 7478b1090b..5e28ec9d5f 100644 --- a/protocols/Yahoo/im.cpp +++ b/protocols/Yahoo/im.cpp @@ -242,8 +242,7 @@ int __cdecl CYahooProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* pre ) return 0;
}
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, ( LPARAM )pre };
- return CallService( MS_PROTO_RECVMSG, 0, ( LPARAM )&ccs );
+ return Proto_RecvMessage(hContact, pre);
}
//=======================================================
diff --git a/protocols/Yahoo/main.cpp b/protocols/Yahoo/main.cpp index 6b5a440e3c..df432b5223 100644 --- a/protocols/Yahoo/main.cpp +++ b/protocols/Yahoo/main.cpp @@ -110,7 +110,7 @@ extern "C" int __declspec(dllexport)Load(void) nlu.flags = NUF_TCHAR | NUF_OUTGOING | NUF_HTTPCONNS;
nlu.szSettingsModule = "YAHOO/libyahoo2";
nlu.ptszDescriptiveName = TranslateT("YAHOO plugin HTTP connections");
- g_hNetlibUser = ( HANDLE )YAHOO_CallService( MS_NETLIB_REGISTERUSER, 0, ( LPARAM )&nlu );
+ g_hNetlibUser = ( HANDLE )CallService( MS_NETLIB_REGISTERUSER, 0, ( LPARAM )&nlu );
YmsgrLinksInit();
/**
diff --git a/protocols/Yahoo/options.cpp b/protocols/Yahoo/options.cpp index 30e821f892..17ff35bb66 100644 --- a/protocols/Yahoo/options.cpp +++ b/protocols/Yahoo/options.cpp @@ -50,7 +50,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, if ( !ppro->GetString( YAHOO_PASSWORD, &dbv )) {
//bit of a security hole here, since it's easy to extract a password from an edit box
- YAHOO_CallService( MS_DB_CRYPT_DECODESTRING, strlen( dbv.pszVal )+1, ( LPARAM )dbv.pszVal );
+ CallService( MS_DB_CRYPT_DECODESTRING, strlen( dbv.pszVal )+1, ( LPARAM )dbv.pszVal );
SetDlgItemTextA( hwndDlg, IDC_PASSWORD, dbv.pszVal );
DBFreeVariant( &dbv );
}
@@ -68,7 +68,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, switch ( LOWORD( wParam )) {
case IDC_NEWYAHOOACCOUNTLINK:
- YAHOO_CallService( MS_UTILS_OPENURL, 1,
+ CallService( MS_UTILS_OPENURL, 1,
ppro->GetByte( "YahooJapan", 0 ) ?
(LPARAM)"http://edit.yahoo.co.jp/config/eval_register" :
(LPARAM)"http://edit.yahoo.com/config/eval_register" );
@@ -112,7 +112,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, ppro->SetString( YAHOO_LOGINID, str );
GetDlgItemTextA( hwndDlg, IDC_PASSWORD, str, sizeof( str ));
- YAHOO_CallService( MS_DB_CRYPT_ENCODESTRING, sizeof( str ),( LPARAM )str );
+ CallService( MS_DB_CRYPT_ENCODESTRING, sizeof( str ),( LPARAM )str );
dbv.pszVal = NULL;
if ( ppro->GetString( YAHOO_PASSWORD, &dbv ) || lstrcmpA( str, dbv.pszVal ))
reconnectRequired = TRUE;
diff --git a/protocols/Yahoo/proto.cpp b/protocols/Yahoo/proto.cpp index a79d3cfbf7..e73af363c8 100644 --- a/protocols/Yahoo/proto.cpp +++ b/protocols/Yahoo/proto.cpp @@ -103,7 +103,7 @@ int CYahooProto::OnModulesLoadedEx( WPARAM, LPARAM ) nlu.pfnHttpGatewayUnwrapRecv = YAHOO_httpGatewayUnwrapRecv;
#endif
- m_hNetlibUser = ( HANDLE )YAHOO_CallService( MS_NETLIB_REGISTERUSER, 0, ( LPARAM )&nlu );
+ m_hNetlibUser = ( HANDLE )CallService( MS_NETLIB_REGISTERUSER, 0, ( LPARAM )&nlu );
MenuContactInit();
return 0;
@@ -150,23 +150,19 @@ HANDLE CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) HANDLE __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDLE hDbEvent )
{
- DBEVENTINFO dbei = {0};
- HANDLE hContact;
-
DebugLog("[YahooAddToListByEvent]");
if ( !m_bLoggedIn )
return 0;
- dbei.cbSize = sizeof( dbei );
-
- if (( dbei.cbBlob = YAHOO_CallService( MS_DB_EVENT_GETBLOBSIZE, ( LPARAM )hDbEvent, 0 )) == -1 ) {
+ DBEVENTINFO dbei = { sizeof( dbei ) };
+ if (( dbei.cbBlob = CallService( MS_DB_EVENT_GETBLOBSIZE, ( LPARAM )hDbEvent, 0 )) == -1 ) {
DebugLog("[YahooAddToListByEvent] ERROR: Can't get blob size.");
return 0;
}
DebugLog("[YahooAddToListByEvent] Got blob size: %lu", dbei.cbBlob);
dbei.pBlob = ( PBYTE )_alloca( dbei.cbBlob );
- if ( YAHOO_CallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei )) {
+ if ( CallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei )) {
DebugLog("[YahooAddToListByEvent] ERROR: Can't get event.");
return 0;
}
@@ -181,29 +177,10 @@ HANDLE __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDL return 0;
}
- //Adds a contact to the contact list given an auth, added or contacts event
-//wParam=MAKEWPARAM(flags,iContact)
-//lParam=(LPARAM)(HANDLE)hDbEvent
-//Returns a HANDLE to the new contact, or NULL on failure
-//hDbEvent must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
-//flags are the same as for PS_ADDTOLIST.
-//iContact is only used for contacts events. It is the 0-based index of the
-//contact in the event to add. There is no way to add two or more contacts at
-//once, you should just do lots of calls.
-
- /* TYPE ADDED
- blob is: uin(DWORD), hcontact(HANDLE), nick(ASCIIZ), first(ASCIIZ),
- last(ASCIIZ), email(ASCIIZ)
-
- TYPE AUTH REQ
- blob is: uin(DWORD), hcontact(HANDLE), nick(ASCIIZ), first(ASCIIZ),
- last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ)
- */
- memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE));
-
- if (hContact != NULL) {
+ HANDLE hContact = DbGetAuthEventContact(&dbei);
+ if (hContact != NULL)
DebugLog("Temp Buddy found at: %p ", hContact);
- } else
+ else
DebugLog("hContact NULL???");
return hContact;
@@ -220,27 +197,22 @@ int CYahooProto::Authorize( HANDLE hdbe ) return 1;
}
- DBEVENTINFO dbei;
- memset( &dbei, 0, sizeof( dbei ));
- dbei.cbSize = sizeof( dbei );
- if (( dbei.cbBlob = YAHOO_CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hdbe, 0 )) == -1 )
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ if (( dbei.cbBlob = CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hdbe, 0 )) == -1 )
return 1;
dbei.pBlob = ( PBYTE )_alloca( dbei.cbBlob );
- if ( YAHOO_CallService( MS_DB_EVENT_GET, ( WPARAM )hdbe, ( LPARAM )&dbei ))
+ if ( CallService( MS_DB_EVENT_GET, ( WPARAM )hdbe, ( LPARAM )&dbei ))
return 1;
- if ( dbei.eventType != EVENTTYPE_AUTHREQUEST )
+ if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if ( strcmp( dbei.szModule, m_szModuleName ))
+ if ( strcmp(dbei.szModule, m_szModuleName))
return 1;
- HANDLE hContact;
- memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE));
-
/* Need to remove the buddy from our Miranda Lists */
-
+ HANDLE hContact = DbGetAuthEventContact(&dbei);
if (hContact != NULL) {
char *who = DBGetString(hContact, m_szModuleName, YAHOO_LOGINID);
if (!who) return 0;
@@ -270,13 +242,13 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
- if (( dbei.cbBlob = YAHOO_CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hdbe, 0 )) == -1 ) {
+ if (( dbei.cbBlob = CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hdbe, 0 )) == -1 ) {
DebugLog("[YahooAuthDeny] ERROR: Can't get blob size");
return 1;
}
dbei.pBlob = ( PBYTE )alloca( dbei.cbBlob );
- if ( YAHOO_CallService( MS_DB_EVENT_GET, ( WPARAM )hdbe, ( LPARAM )&dbei )) {
+ if ( CallService( MS_DB_EVENT_GET, ( WPARAM )hdbe, ( LPARAM )&dbei )) {
DebugLog("YahooAuthDeny - Can't get db event!");
return 1;
}
@@ -291,12 +263,9 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) return 1;
}
- HANDLE hContact;
- memcpy(&hContact, dbei.pBlob + sizeof(DWORD), sizeof(HANDLE));
-
/* Need to remove the buddy from our Miranda Lists */
- if (hContact != NULL)
- {
+ HANDLE hContact = DbGetAuthEventContact(&dbei);
+ if (hContact != NULL) {
char *who = DBGetString(hContact, m_szModuleName, YAHOO_LOGINID);
if (!who) return 0;
@@ -305,7 +274,7 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) DebugLog("Rejecting buddy:%s msg: %s", who, u_reason);
reject(myid, who, GetWord(hContact, "yprotoid", 0), u_reason);
- YAHOO_CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
mir_free(u_reason);
mir_free(myid);
@@ -317,26 +286,11 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CYahooProto::AuthRecv( HANDLE hContact, PROTORECVEVENT* pre )
+int __cdecl CYahooProto::AuthRecv(HANDLE hContact, PROTORECVEVENT* pre)
{
DebugLog("[YahooRecvAuth] ");
DBDeleteContactSetting(hContact,"CList","Hidden");
-
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
- dbei.szModule = m_szModuleName;
- dbei.timestamp = pre->timestamp;
- dbei.flags = pre->flags & (PREF_CREATEREAD?DBEF_READ:0);
- dbei.flags |= (pre->flags & PREF_UTF) ? DBEF_UTF : 0;
- dbei.eventType = EVENTTYPE_AUTHREQUEST;
-
- /* Just copy the Blob from PSR_AUTH event. */
- dbei.cbBlob = pre->lParam;
- dbei.pBlob = (PBYTE)pre->szMessage;
-
- CallService(MS_DB_EVENT_ADD,(WPARAM)NULL,(LPARAM)&dbei);
-
- return 0;
+ return Proto_AuthRecv(m_szModuleName, pre);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -470,8 +424,7 @@ int __cdecl CYahooProto::RecvFile( HANDLE hContact, PROTORECVFILET* evt ) {
DBDeleteContactSetting(hContact, "CList", "Hidden");
- CCSDATA ccs = { hContact, PSR_FILE, 0, ( LPARAM )evt };
- return CallService( MS_PROTO_RECVFILE, 0, ( LPARAM )&ccs );
+ return Proto_RecvFile(hContact, evt);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -811,7 +764,7 @@ int __cdecl CYahooProto::OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARA clmi.cbSize = sizeof(CLISTMENUITEM);
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = m_tszUserName;
- YAHOO_CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )mainMenuRoot, ( LPARAM )&clmi );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )mainMenuRoot, ( LPARAM )&clmi );
}
break;
diff --git a/protocols/Yahoo/services.cpp b/protocols/Yahoo/services.cpp index e36a27163c..2ea817d279 100644 --- a/protocols/Yahoo/services.cpp +++ b/protocols/Yahoo/services.cpp @@ -31,7 +31,7 @@ void CYahooProto::logoff_buddies()
{
//set all contacts to 'offline'
- HANDLE hContact = ( HANDLE )YAHOO_CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL )
{
if (IsMyContact(hContact)) {
@@ -45,7 +45,7 @@ void CYahooProto::logoff_buddies() //DBDeleteContactSetting(hContact, m_szModuleName, "MirVer" );
}
- hContact = ( HANDLE )YAHOO_CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
+ hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
}
}
@@ -393,7 +393,7 @@ void CYahooProto::MenuMainInit( void ) }
else {
if ( mainMenuRoot )
- YAHOO_CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )mainMenuRoot, 0 );
+ CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )mainMenuRoot, 0 );
mainMenuRoot = NULL;
}
@@ -500,9 +500,9 @@ void CYahooProto::MenuContactInit( void ) void CYahooProto::MenuUninit( void )
{
if ( mainMenuRoot )
- YAHOO_CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )mainMenuRoot, 0 );
+ CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )mainMenuRoot, 0 );
- YAHOO_CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )hShowProfileMenuItem, 0 );
+ CallService( MS_CLIST_REMOVECONTACTMENUITEM, ( WPARAM )hShowProfileMenuItem, 0 );
}
int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
@@ -522,7 +522,7 @@ int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) if (GetWord( hContact, "yprotoid", 0) != 0)
mi.flags |= CMIF_HIDDEN;
- YAHOO_CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hShowProfileMenuItem, (LPARAM)&mi);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hShowProfileMenuItem, (LPARAM)&mi);
return 0;
}
diff --git a/protocols/Yahoo/util.cpp b/protocols/Yahoo/util.cpp index e607ec0a8c..977d0b43cc 100644 --- a/protocols/Yahoo/util.cpp +++ b/protocols/Yahoo/util.cpp @@ -49,11 +49,6 @@ void CYahooProto::YHookEvent( const char* szEvent, YEventFunc handler ) ::HookEventObj( szEvent, ( MIRANDAHOOKOBJ )*( void** )&handler, this );
}
-INT_PTR __stdcall YAHOO_CallService( const char* szSvcName, WPARAM wParam, LPARAM lParam )
-{
- return CallService( szSvcName, wParam, lParam );
-}
-
int CYahooProto::DebugLog( const char *fmt, ... )
{
char str[ 4096 ];
@@ -114,7 +109,7 @@ DWORD CYahooProto::GetDword( HANDLE hContact, const char* valueName, DWORD parDe DWORD CYahooProto::SetDword( const char* valueName, DWORD parValue )
{
- return DBWriteContactSettingDword( NULL, m_szModuleName, valueName, parValue);
+ return DBWriteContactSettingDword( NULL, m_szModuleName, valueName, parValue);
}
DWORD CYahooProto::GetDword( const char* valueName, DWORD parDefltValue )
@@ -124,7 +119,7 @@ DWORD CYahooProto::GetDword( const char* valueName, DWORD parDefltValue ) DWORD CYahooProto::SetDword( HANDLE hContact, const char* valueName, DWORD parValue )
{
- return DBWriteContactSettingDword( hContact, m_szModuleName, valueName, parValue);
+ return DBWriteContactSettingDword( hContact, m_szModuleName, valueName, parValue);
}
@@ -171,7 +166,7 @@ int CYahooProto::SendBroadcast( HANDLE hContact, int type, int result, HANDLE hP ack.result = result;
ack.hProcess = hProcess;
ack.lParam = lParam;
- return YAHOO_CallService( MS_PROTO_BROADCASTACK, 0, ( LPARAM )&ack );
+ return CallService( MS_PROTO_BROADCASTACK, 0, ( LPARAM )&ack );
}
int CYahooProto::GetString( const char* name, DBVARIANT* result )
@@ -267,7 +262,7 @@ int CYahooProto::ShowPopup( const char* nickname, const char* msg, const char *s DebugLog("[MS_POPUP_ADDPOPUPEX] Generating a popup for [%s] %s", nickname, msg);
- YAHOO_CallService( MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0 );
+ CallService( MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0 );
return 1;
}
@@ -332,7 +327,7 @@ bool CYahooProto::IsMyContact(HANDLE hContact) char* YAHOO_GetContactName( HANDLE hContact )
{
- return ( char* )YAHOO_CallService( MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, 0 );
+ return ( char* )CallService( MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, 0 );
}
extern PLUGININFOEX pluginInfo;
diff --git a/protocols/Yahoo/yahoo.cpp b/protocols/Yahoo/yahoo.cpp index dbec251ef1..591a651d10 100644 --- a/protocols/Yahoo/yahoo.cpp +++ b/protocols/Yahoo/yahoo.cpp @@ -286,9 +286,9 @@ HANDLE CYahooProto::getbuddyH(const char *yahoo_id) {
HANDLE hContact;
- for ( hContact = ( HANDLE )YAHOO_CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ for ( hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
hContact != NULL;
- hContact = ( HANDLE )YAHOO_CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM )hContact, 0 ))
+ hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM )hContact, 0 ))
{
if (IsMyContact(hContact))
{
@@ -334,8 +334,8 @@ HANDLE CYahooProto::add_buddy( const char *yahoo_id, const char *yahoo_name, int //not already there: add
LOG(("[add_buddy] Adding buddy id: %s (Nick: %s), flags: %lu", yid, yahoo_name, flags));
- hContact = ( HANDLE )YAHOO_CallService( MS_DB_CONTACT_ADD, 0, 0 );
- YAHOO_CallService( 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 );
SetString( hContact, YAHOO_LOGINID, yid );
Set_Protocol( hContact, protocol );
@@ -621,9 +621,9 @@ void CYahooProto::ext_got_stealth(char *stealthlist) if (stealthlist)
stealth = y_strsplit(stealthlist, ",", -1);
- for ( hContact = ( HANDLE )YAHOO_CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ for ( hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
hContact != NULL;
- hContact = ( HANDLE )YAHOO_CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM )hContact, 0 ))
+ hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT, ( WPARAM )hContact, 0 ))
{
if (IsMyContact(hContact)) {
DBVARIANT dbv;
@@ -751,7 +751,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg) * Make sure the contact is temporary so we could delete it w/o extra traffic
*/
DBWriteContactSettingByte( hContact, "CList", "NotOnList", 1 );
- YAHOO_CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
+ CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
}
else LOG(("[ext_rejected] Buddy not on our buddy list"));
@@ -780,7 +780,7 @@ void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status ShowPopup( "Invalid Contact", "The id you tried to add is invalid.", NULL);
/* Make it TEMP first, we don't want to send any extra packets for FALSE ids */
DBWriteContactSettingByte( hContact, "CList", "NotOnList", 1 );
- YAHOO_CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
+ CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
}
break;
@@ -790,7 +790,7 @@ void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status ShowPopup( "Invalid Contact", "Unknown Error??.", NULL);
/* Make it TEMP first, we don't want to send any extra packets for FALSE ids */
DBWriteContactSettingByte( hContact, "CList", "NotOnList", 1 );
- YAHOO_CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
+ CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
}
break;
@@ -1076,7 +1076,7 @@ void ext_yahoo_got_cookies(int id) //wsprintfA(z, "Cookie: %s; Y=%s", Bcookie, yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
wsprintfA(z, "Cookie: Y=%s; T=%s", yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
LOG(("Our Cookie: '%s'", z));
- YAHOO_CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hnuMain, (LPARAM)z);*/
+ CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hnuMain, (LPARAM)z);*/
#ifdef HTTP_GATEWAY
if (iHTTPGateway) {
@@ -1086,7 +1086,7 @@ void ext_yahoo_got_cookies(int id) mir_snprintf(z, sizeof(z), "Cookie: Y=%s; T=%s; C=%s", yahoo_get_cookie(id, "y"),
yahoo_get_cookie(id, "t"), yahoo_get_cookie(id, "c"));
LOG(("Our Cookie: '%s'", z));
- YAHOO_CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hNetlibUser, (LPARAM)z);
+ CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hNetlibUser, (LPARAM)z);
}
#endif
@@ -1398,7 +1398,7 @@ static void connect_complete(void *data, int source, yahoo_input_condition condi //tSelect.dwTimeout = T->mGatewayTimeout * 1000;
tSelect.dwTimeout = 1;
tSelect.hReadConns[ 0 ] = ( HANDLE )source;
- error = YAHOO_CallService( MS_NETLIB_SELECT, 0, ( LPARAM )&tSelect );
+ error = CallService( MS_NETLIB_SELECT, 0, ( LPARAM )&tSelect );
if(error) {
//close(source);
diff --git a/protocols/Yahoo/yahoo.h b/protocols/Yahoo/yahoo.h index ed90bf8756..29772a0817 100644 --- a/protocols/Yahoo/yahoo.h +++ b/protocols/Yahoo/yahoo.h @@ -116,8 +116,6 @@ extern HINSTANCE hInstance; extern int iHTTPGateway;
#endif
-INT_PTR __stdcall YAHOO_CallService( const char* szSvcName, WPARAM wParam, LPARAM lParam );
-
#define YAHOO_hasnotification() ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)
int YAHOO_util_dbsettingchanged(WPARAM wParam, LPARAM lParam);
|