diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-16 20:46:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-16 20:46:48 +0000 |
commit | 8e87b243ac6adf4d6e179d6453d46c4211e6baa3 (patch) | |
tree | 64bea61e4ae673d9c536125cc91823908a16155a /protocols/Yahoo | |
parent | f2769285e5e68ae941fbe1010337039ae8222005 (diff) |
switch to the library ProtoBroadcastAck for Jabber, MSN & YAHOO
git-svn-id: http://svn.miranda-ng.org/main/trunk@4992 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo')
-rw-r--r-- | protocols/Yahoo/src/file_transfer.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.h | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/search.cpp | 16 | ||||
-rw-r--r-- | protocols/Yahoo/src/util.cpp | 12 | ||||
-rw-r--r-- | protocols/Yahoo/src/yahoo.cpp | 2 |
6 files changed, 11 insertions, 25 deletions
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index 999ef0c3a6..552eed7a96 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -319,7 +319,7 @@ static void dl_file(int id, int fd, int error, const char *filename, unsigned lo ResetEvent(sf->hWaitEvent);
- if ( sf->ppro->SendBroadcast( sf->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, sf, (LPARAM)&sf->pfts )) {
+ if ( sf->ppro->ProtoBroadcastAck( sf->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, sf, (LPARAM)&sf->pfts )) {
WaitForSingleObject( sf->hWaitEvent, INFINITE );
LOG(("[dl_file] Got action: %ld", sf->action));
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index fd6344131a..9971a8a0f6 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -583,7 +583,7 @@ void __cdecl CYahooProto::get_status_thread(HANDLE hContact) FREE(sm);
- SendBroadcast( hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, (LPARAM)( TCHAR* )_A2T(fm));
+ ProtoBroadcastAck( hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, (LPARAM)( TCHAR* )_A2T(fm));
}
HANDLE __cdecl CYahooProto::GetAwayMsg( HANDLE hContact )
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index 0f472c4483..4aa8ddc86f 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -265,8 +265,6 @@ struct CYahooProto : public PROTO_INTERFACE DWORD Set_Protocol( HANDLE hContact, int protocol );
- int SendBroadcast( HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam );
-
int ShowNotification(const TCHAR *title, const TCHAR *info, DWORD flags);
void ShowError(const TCHAR *title, const TCHAR *buff);
int ShowPopup( const TCHAR* nickname, const TCHAR* msg, const char *szURL );
diff --git a/protocols/Yahoo/src/search.cpp b/protocols/Yahoo/src/search.cpp index e36439bc2c..9d9b53b892 100644 --- a/protocols/Yahoo/src/search.cpp +++ b/protocols/Yahoo/src/search.cpp @@ -25,7 +25,7 @@ void __cdecl CYahooProto::search_simplethread(void *snsearch) TCHAR *id = (TCHAR *) snsearch;
if (lstrlen(id) < 4) {
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
MessageBoxA(NULL, "Please enter a valid ID to search for.", "Search", MB_OK);
return;
}
@@ -39,11 +39,11 @@ void __cdecl CYahooProto::search_simplethread(void *snsearch) psr.id = (TCHAR*)_tcslwr(id);
psr.reserved[0] = YAHOO_IM_YAHOO;
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
//yahoo_search(m_id, YAHOO_SEARCH_YID, m, YAHOO_GENDER_NONE, YAHOO_AGERANGE_NONE, 0, 1);
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
HANDLE __cdecl CYahooProto::SearchBasic( const TCHAR* nick )
@@ -107,7 +107,7 @@ void CYahooProto::ext_got_search_result(int found, int start, int total, YList * //void yahoo_search(int id, enum yahoo_search_type t, const char *text, enum yahoo_search_gender g, enum yahoo_search_agerange ar,
// int photo, int yahoo_only)
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
mir_free(psr.id);
mir_free(psr.firstName);
@@ -115,7 +115,7 @@ void CYahooProto::ext_got_search_result(int found, int start, int total, YList * }
en = y_list_next(en);
}
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
/*
@@ -158,7 +158,7 @@ void __cdecl CYahooProto::searchadv_thread(void *pHWND) GetDlgItemText(hwndDlg, IDC_SEARCH_ID, searchid, 128);
if (lstrlen(searchid) == 0) {
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
MessageBoxA(NULL, "Please enter a valid ID to search for.", "Search", MB_OK);
return;
}
@@ -181,12 +181,12 @@ void __cdecl CYahooProto::searchadv_thread(void *pHWND) /*
* Show this in results
*/
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
/*
* Done searching.
*/
- SendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
/*
diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index a022d3e598..e4e4511cd4 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -153,18 +153,6 @@ DWORD CYahooProto::Set_Protocol( HANDLE hContact, int protocol ) return 0;
}
-int CYahooProto::SendBroadcast( HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam )
-{
- ACKDATA ack = { sizeof( ACKDATA ) };
- ack.szModule = m_szModuleName;
- ack.hContact = hContact;
- ack.type = type;
- ack.result = result;
- ack.hProcess = hProcess;
- ack.lParam = lParam;
- return CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)&ack);
-}
-
int CYahooProto::GetString(const char* name, DBVARIANT* result)
{ return db_get_s(NULL, m_szModuleName, name, result);
}
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index e3d6f0405f..2f474c8c37 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -1002,7 +1002,7 @@ void CYahooProto::ext_mail_notify(const char *from, const char *subj, int cnt) }
m_unreadMessages = cnt;
- SendBroadcast( NULL, ACKTYPE_EMAIL, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck( NULL, ACKTYPE_EMAIL, ACKRESULT_STATUS, NULL, 0);
}
void CYahooProto::ext_system_message(const char *me, const char *who, const char *msg)
|