summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/src/proto.cpp4
-rw-r--r--protocols/AimOscar/src/proto.h64
-rw-r--r--protocols/FacebookRM/src/json.cpp4
-rw-r--r--protocols/FacebookRM/src/messages.cpp4
-rw-r--r--protocols/FacebookRM/src/process.cpp2
-rw-r--r--protocols/FacebookRM/src/proto.cpp2
-rw-r--r--protocols/FacebookRM/src/proto.h4
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp28
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.h66
-rw-r--r--protocols/IRCG/src/irc.h64
-rw-r--r--protocols/IRCG/src/ircproto.cpp4
-rw-r--r--protocols/IcqOscarJ/src/fam_02location.cpp2
-rw-r--r--protocols/IcqOscarJ/src/fam_03buddy.cpp4
-rw-r--r--protocols/IcqOscarJ/src/fam_04message.cpp14
-rw-r--r--protocols/IcqOscarJ/src/fam_13servclist.cpp16
-rw-r--r--protocols/IcqOscarJ/src/fam_15icqserver.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.h8
-rw-r--r--protocols/IcqOscarJ/src/icq_direct.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp44
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.h70
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_xtraz.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp4
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp6
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
-rw-r--r--protocols/JabberG/src/jabber_proto.h64
-rw-r--r--protocols/MRA/src/MraChat.cpp2
-rw-r--r--protocols/MRA/src/MraProto.cpp6
-rw-r--r--protocols/MRA/src/MraProto.h66
-rw-r--r--protocols/MSN/src/msn_proto.cpp4
-rw-r--r--protocols/MSN/src/msn_proto.h4
-rw-r--r--protocols/Omegle/src/proto.h4
-rw-r--r--protocols/Omegle/src/stubs.cpp4
-rw-r--r--protocols/Skype/src/skype_proto.cpp4
-rw-r--r--protocols/Skype/src/skype_proto.h64
-rw-r--r--protocols/Tlen/src/tlen.h4
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp4
-rw-r--r--protocols/Twitter/src/contacts.cpp8
-rw-r--r--protocols/Twitter/src/proto.cpp8
-rw-r--r--protocols/Twitter/src/proto.h4
-rw-r--r--protocols/Twitter/src/stubs.cpp2
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp4
-rw-r--r--protocols/VKontakte/src/vk_proto.h64
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp2
-rw-r--r--protocols/Yahoo/src/proto.cpp10
-rw-r--r--protocols/Yahoo/src/proto.h66
46 files changed, 413 insertions, 411 deletions
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp
index 8789f548e2..d47a759b62 100644
--- a/protocols/AimOscar/src/proto.cpp
+++ b/protocols/AimOscar/src/proto.cpp
@@ -126,7 +126,7 @@ int CAimProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HANDLE CAimProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT CAimProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
if (state != 1) return 0;
TCHAR *id = psr->id ? psr->id : psr->nick;
@@ -136,7 +136,7 @@ HANDLE CAimProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
return hContact; //See authrequest for serverside addition
}
-HANDLE __cdecl CAimProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+HCONTACT __cdecl CAimProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
return NULL;
}
diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h
index bdd1dd42e7..fa1f999728 100644
--- a/protocols/AimOscar/src/proto.h
+++ b/protocols/AimOscar/src/proto.h
@@ -28,50 +28,50 @@ struct CAimProto : public PROTO<CAimProto>
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
- virtual int __cdecl Authorize( HANDLE hDbEvent );
- virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl Authorize( HANDLE hDbEvent );
+ virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
- virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
+ virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
+ virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
- virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
- virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
- virtual HANDLE __cdecl SearchByName( const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName );
- virtual HWND __cdecl SearchAdvanced( HWND owner );
- virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
+ virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
+ virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
+ virtual HANDLE __cdecl SearchByName( const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName );
+ virtual HWND __cdecl SearchAdvanced( HWND owner );
+ virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT* );
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT* );
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
- virtual int __cdecl SetStatus( int iNewStatus );
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
- virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
- virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
+ virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
//====| Services |====================================================================
INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 28e102b46e..7fdbcbe2a8 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -424,7 +424,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
participant = chatroom->second.participants.find(reader_id);
if (participant != chatroom->second.participants.end()) {
- HANDLE hChatContact = proto->ChatIDToHContact(tid);
+ HCONTACT hChatContact = proto->ChatIDToHContact(tid);
const char *participant_name = participant->second.c_str();
if (!chatroom->second.message_readers.empty())
@@ -560,7 +560,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
// TODO: support also system messages (rename chat, user quit, etc.)! (here? or it is somewhere else?)
proto->UpdateChat(thread_id.c_str(), id.c_str(), senderName.c_str(), message_text.c_str(), utils::time::fix_timestamp(json_as_float(timestamp)));
proto->setString(hChatContact, FACEBOOK_KEY_MESSAGE_ID, message_id.c_str());
- proto->ForkThread(&FacebookProto::ReadMessageWorker, hChatContact);
+ proto->ForkThread(&FacebookProto::ReadMessageWorker, (void*)hChatContact);
} else {
facebook_message* message = new facebook_message();
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 051cb9cd39..a06efacc46 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
int FacebookProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
{
- ForkThread(&FacebookProto::ReadMessageWorker, hContact);
+ ForkThread(&FacebookProto::ReadMessageWorker, (void*)hContact);
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
return Proto_RecvMessage(hContact, pre);
@@ -168,7 +168,7 @@ void FacebookProto::ReadMessageWorker(void *p)
if (p == NULL)
return;
- HCONTACT hContact = static_cast<HCONTACT>(p);
+ HCONTACT hContact = (HCONTACT)p;
if (getBool(FACEBOOK_KEY_KEEP_UNREAD, 0) || getBool(hContact, FACEBOOK_KEY_KEEP_UNREAD, 0))
return;
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index c06e9b562a..4e0531996a 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -378,7 +378,7 @@ void FacebookProto::ProcessUnreadMessage(void *p)
hChatContact = ChatIDToHContact(room->thread_id);
setTString(hChatContact, FACEBOOK_KEY_MESSAGE_ID, room->thread_id.c_str());
- ForkThread(&FacebookProto::ReadMessageWorker, hChatContact);
+ ForkThread(&FacebookProto::ReadMessageWorker, (void*)hChatContact);
delete it->second;
it = chatrooms.erase(it);
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 5e05071dec..2bb3659f87 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -238,7 +238,7 @@ HANDLE FacebookProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* first
return SearchByEmail(arg); // Facebook is using one search method for everything (except IDs)
}
-HANDLE FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
ptrA id( mir_t2a_cp(psr->id, CP_UTF8));
ptrA name( mir_t2a_cp(psr->firstName, CP_UTF8));
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h
index 9b5b550253..b271f62c8a 100644
--- a/protocols/FacebookRM/src/proto.h
+++ b/protocols/FacebookRM/src/proto.h
@@ -62,8 +62,8 @@ public:
//PROTO_INTERFACE
- virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason);
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index 24e8c40aa8..b3ad11201c 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -124,24 +124,24 @@ 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 1; }
-int GGPROTO::AuthDeny(HANDLE hDbEvent, const TCHAR *szReason) { return 1; }
-int GGPROTO::AuthRecv(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::AuthRequest(HCONTACT 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 1; }
-HANDLE GGPROTO::SearchByEmail(const PROTOCHAR *email) { return NULL; }
-int GGPROTO::RecvContacts(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::RecvUrl(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList) { return 1; }
-int GGPROTO::SendUrl(HCONTACT hContact, int flags, const char *url) { return 1; }
-int GGPROTO::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 1; }
+HCONTACT GGPROTO::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
+int GGPROTO::Authorize(HANDLE hDbEvent) { return 1; }
+int GGPROTO::AuthDeny(HANDLE hDbEvent, const TCHAR *szReason) { return 1; }
+int GGPROTO::AuthRecv(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::AuthRequest(HCONTACT 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 1; }
+HANDLE GGPROTO::SearchByEmail(const PROTOCHAR *email) { return NULL; }
+int GGPROTO::RecvContacts(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::RecvUrl(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList) { return 1; }
+int GGPROTO::SendUrl(HCONTACT hContact, int flags, const char *url) { return 1; }
+int GGPROTO::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 1; }
//////////////////////////////////////////////////////////
// when contact is added to list
-HANDLE GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr)
+HCONTACT GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
#ifdef DEBUGMODE
debugLogA("AddToList(): id=%s");
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h
index 4aa8a54ca4..a993447226 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.h
+++ b/protocols/Gadu-Gadu/src/gg_proto.h
@@ -31,50 +31,50 @@ struct GGPROTO : public PROTO<GGPROTO>
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+
+ virtual int __cdecl Authorize( HANDLE hDbEvent );
+ virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
- virtual int __cdecl Authorize( HANDLE hDbEvent );
- virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
-
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
+ virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
- virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
- virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
- virtual HANDLE __cdecl SearchByName( const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName );
- virtual HWND __cdecl SearchAdvanced( HWND owner );
- virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
+ virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
+ virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
+ virtual HANDLE __cdecl SearchByName( const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName );
+ virtual HWND __cdecl SearchAdvanced( HWND owner );
+ virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
- virtual int __cdecl SetStatus( int iNewStatus );
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
- virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
- virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
+ virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
//////////////////////////////////////////////////////////////////////////////////////
// Services
diff --git a/protocols/IRCG/src/irc.h b/protocols/IRCG/src/irc.h
index cf351b65a5..6a024ad099 100644
--- a/protocols/IRCG/src/irc.h
+++ b/protocols/IRCG/src/irc.h
@@ -214,50 +214,50 @@ struct CIrcProto : public PROTO<CIrcProto>
// Protocol interface
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
- virtual int __cdecl Authorize(HANDLE hDbEvent);
- virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl Authorize(HANDLE hDbEvent);
+ virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR* szReason);
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
- virtual HANDLE __cdecl ChangeInfo( int iInfoType, void *pInfoData);
+ virtual HANDLE __cdecl ChangeInfo( int iInfoType, void *pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
- virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const TCHAR **szFilename);
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const TCHAR **szFilename);
virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
- virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
- virtual HWND __cdecl SearchAdvanced(HWND owner);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+ virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
- virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
+ virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
// Services
INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM);
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index e1a26116f4..1a33ac9a73 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -318,7 +318,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM)
////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HANDLE __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr)
+HCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr)
{
if (m_iStatus == ID_STATUS_OFFLINE || m_iStatus == ID_STATUS_CONNECTING)
return 0;
@@ -359,7 +359,7 @@ HANDLE __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr)
////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HANDLE __cdecl CIrcProto::AddToListByEvent(int, int, HANDLE)
+HCONTACT __cdecl CIrcProto::AddToListByEvent(int, int, HANDLE)
{
return NULL;
}
diff --git a/protocols/IcqOscarJ/src/fam_02location.cpp b/protocols/IcqOscarJ/src/fam_02location.cpp
index d5d6ec590a..af5d7a0fb7 100644
--- a/protocols/IcqOscarJ/src/fam_02location.cpp
+++ b/protocols/IcqOscarJ/src/fam_02location.cpp
@@ -127,7 +127,7 @@ void CIcqProto::handleLocationUserInfoReply(BYTE* buf, WORD wLen, DWORD dwCookie
HCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
// Ignore away status if the user is not already on our list
- if (hContact == INVALID_HANDLE_VALUE) {
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
#ifdef _DEBUG
debugLogA("Ignoring away reply (%s)", strUID(dwUIN, szUID));
#endif
diff --git a/protocols/IcqOscarJ/src/fam_03buddy.cpp b/protocols/IcqOscarJ/src/fam_03buddy.cpp
index d443919e6c..9b1f01444c 100644
--- a/protocols/IcqOscarJ/src/fam_03buddy.cpp
+++ b/protocols/IcqOscarJ/src/fam_03buddy.cpp
@@ -197,7 +197,7 @@ void CIcqProto::handleUserOnline(BYTE *buf, WORD wLen, serverthread_info *info)
// Ignore status notification if the user is not already on our list
HCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
{
#ifdef _DEBUG
debugLogA("Ignoring user online (%s)", strUID(dwUIN, szUID));
@@ -621,7 +621,7 @@ void CIcqProto::handleUserOffline(BYTE *buf, WORD wLen)
HCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
// Skip contacts that are not already on our list or are already offline
- if (hContact != INVALID_HANDLE_VALUE)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
{
WORD wOldStatus = getContactStatus(hContact);
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp
index bd53d9c045..be7d453e55 100644
--- a/protocols/IcqOscarJ/src/fam_04message.cpp
+++ b/protocols/IcqOscarJ/src/fam_04message.cpp
@@ -504,7 +504,7 @@ void CIcqProto::handleRecvServMsgType2(BYTE *buf, WORD wLen, DWORD dwUin, char *
WORD wAckType = chain->getWord(0x0A, 1);
// Update the saved DC info (if contact already exists)
- if (hContact != INVALID_HANDLE_VALUE)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
{
DWORD dwIP, dwExternalIP;
WORD wPort;
@@ -576,7 +576,7 @@ void CIcqProto::handleRecvServMsgType2(BYTE *buf, WORD wLen, DWORD dwUin, char *
unpackLEDWord(&buf, &dwUin);
HCONTACT hContact = HContactFromUIN(dwUin, NULL);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
{
debugLogA("Error: %s from unknown contact %u", "Reverse Connect Request", dwUin);
}
@@ -677,7 +677,7 @@ void CIcqProto::parseServRelayData(BYTE *pDataBuf, WORD wLen, HCONTACT hContact,
unpackLEWord(&pDataBuf, &wVersion);
wLen -= 2;
- if (hContact != INVALID_HANDLE_VALUE)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
setWord(hContact, "Version", wVersion);
unpackDWord(&pDataBuf, &dwGuid1); // plugin type GUID
@@ -1621,7 +1621,7 @@ void packPluginTypeId(icq_packet *packet, int nTypeID)
void CIcqProto::handleStatusMsgReply(const char *szPrefix, HCONTACT hContact, DWORD dwUin, WORD wVersion, int bMsgType, WORD wCookie, const char *szMsg, int nMsgFlags)
{
- if (hContact == INVALID_HANDLE_VALUE) {
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
debugLogA("%sIgnoring status message from unknown contact %u", szPrefix, dwUin);
return;
}
@@ -2307,7 +2307,7 @@ void CIcqProto::handleRecvMsgResponse(BYTE *buf, WORD wLen, WORD wFlags, DWORD d
// An ack of some kind
int ackType;
- if (hContact == NULL || hContact == INVALID_HANDLE_VALUE) {
+ if (hContact == NULL || hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
debugLogA("SNAC(4.B) Message from unknown contact (%u)", dwUin);
ReleaseCookie(dwCookie); // This could be a bad idea, but I think it is safe
return;
@@ -2698,7 +2698,7 @@ void CIcqProto::handleServerAck(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwSeque
// server ack should be ignored here.
if (pCookieData && (pCookieData->nAckType == ACKTYPE_SERVER))
{
- if ((hContact != NULL) && (hContact != INVALID_HANDLE_VALUE))
+ if ((hContact != NULL) && (hContact != (HCONTACT)INVALID_HANDLE_VALUE))
{
int ackType;
int ackRes = ACKRESULT_SUCCESS;
@@ -2891,7 +2891,7 @@ void CIcqProto::handleTypingNotification(BYTE *buf, WORD wLen, WORD wFlags, DWOR
HCONTACT hContact = HContactFromUID(dwUin, szUid, NULL);
- if (hContact == INVALID_HANDLE_VALUE) return;
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) return;
// Typing notification code
unpackWord(&buf, &wNotification);
diff --git a/protocols/IcqOscarJ/src/fam_13servclist.cpp b/protocols/IcqOscarJ/src/fam_13servclist.cpp
index fa83b408cd..fe15da519c 100644
--- a/protocols/IcqOscarJ/src/fam_13servclist.cpp
+++ b/protocols/IcqOscarJ/src/fam_13servclist.cpp
@@ -909,7 +909,7 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != INVALID_HANDLE_VALUE)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
{
int bRegroup = 0;
int bNicked = 0;
@@ -1177,7 +1177,7 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != INVALID_HANDLE_VALUE)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
{
if (bAdded)
{
@@ -1216,7 +1216,7 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != INVALID_HANDLE_VALUE)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
{
if (bAdded)
{
@@ -1274,7 +1274,7 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != INVALID_HANDLE_VALUE)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
{
if (bAdded)
{
@@ -1473,7 +1473,7 @@ void CIcqProto::handleServerCListItemUpdate(const char *szRecordName, WORD wGrou
{
HCONTACT hContact = (wItemType == SSI_ITEM_BUDDY || wItemType == SSI_ITEM_DENY || wItemType == SSI_ITEM_PERMIT || wItemType == SSI_ITEM_IGNORE) ? HContactFromRecordName(szRecordName, NULL) : NULL;
- if (hContact != INVALID_HANDLE_VALUE && wItemType == SSI_ITEM_BUDDY)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && wItemType == SSI_ITEM_BUDDY)
{ // a contact was updated on server
if (pItemData)
{
@@ -1588,7 +1588,7 @@ void CIcqProto::handleServerCListItemDelete(const char *szRecordName, WORD wGrou
{
HCONTACT hContact = (wItemType == SSI_ITEM_BUDDY || wItemType == SSI_ITEM_DENY || wItemType == SSI_ITEM_PERMIT || wItemType == SSI_ITEM_IGNORE) ? HContactFromRecordName(szRecordName, NULL) : NULL;
- if (hContact != INVALID_HANDLE_VALUE && wItemType == SSI_ITEM_BUDDY)
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && wItemType == SSI_ITEM_BUDDY)
{ // a contact was removed from our list
if (getWord(hContact, DBSETTING_SERVLIST_ID, 0) == wItemId)
{
@@ -1783,8 +1783,8 @@ void CIcqProto::handleRecvAuthResponse(unsigned char *buf, WORD wLen)
}
HCONTACT hContact = HContactFromUID(dwUin, szUid, &bAdded);
-
- if (hContact != INVALID_HANDLE_VALUE) szNick = NickFromHandle(hContact);
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ szNick = NickFromHandle(hContact);
if (wLen > 0)
{
diff --git a/protocols/IcqOscarJ/src/fam_15icqserver.cpp b/protocols/IcqOscarJ/src/fam_15icqserver.cpp
index 78759c03d8..bedd63885b 100644
--- a/protocols/IcqOscarJ/src/fam_15icqserver.cpp
+++ b/protocols/IcqOscarJ/src/fam_15icqserver.cpp
@@ -862,7 +862,7 @@ void CIcqProto::parseDirectoryUserDetailsData(HCONTACT hContact, oscar_tlv_chain
dwUin = atoi(szUid);
hContact = HContactFromUID(dwUin, szUid, NULL);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
{
debugLogA("Error: Received details for unknown contact \"%s\"", szUid);
SAFE_FREE(&szUid);
diff --git a/protocols/IcqOscarJ/src/icq_avatar.h b/protocols/IcqOscarJ/src/icq_avatar.h
index e989640d93..4323ffda8b 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.h
+++ b/protocols/IcqOscarJ/src/icq_avatar.h
@@ -69,10 +69,10 @@ protected:
rates *m_rates;
icq_critical_section *m_ratesMutex;
- HANDLE runContact[4];
- DWORD runTime[4];
- int runCount;
- void checkRequestQueue();
+ HCONTACT runContact[4];
+ DWORD runTime[4];
+ int runCount;
+ void checkRequestQueue();
public:
avatars_server_connection(CIcqProto *ppro, HANDLE hConnection, char *pCookie, WORD wCookieLen);
diff --git a/protocols/IcqOscarJ/src/icq_direct.cpp b/protocols/IcqOscarJ/src/icq_direct.cpp
index 4229777b5a..095ad7734e 100644
--- a/protocols/IcqOscarJ/src/icq_direct.cpp
+++ b/protocols/IcqOscarJ/src/icq_direct.cpp
@@ -639,7 +639,7 @@ void CIcqProto::handleDirectPacket(directconnect* dc, PBYTE buf, WORD wLen)
if (dc->dwRemoteUin || !dc->dwReqId)
{ // OMG! Licq sends on reverse connection empty uin
hContact = HContactFromUIN(dc->dwRemoteUin, NULL);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
{
NetLog_Direct("Error: Received PEER_INIT from %u not on my list", dwUin);
CloseDirectConnection(dc);
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index d347223323..6754e296c8 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -316,7 +316,7 @@ int CIcqProto::OnPreShutdown(WPARAM wParam, LPARAM lParam)
////////////////////////////////////////////////////////////////////////////////////////
// PS_AddToList - adds a contact to the contact list
-HANDLE CIcqProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT CIcqProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
if (psr) {
if (psr->cbSize == sizeof(ICQSEARCHRESULT)) {
@@ -354,7 +354,7 @@ HANDLE CIcqProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
return 0; // Failure
}
-HANDLE __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+HCONTACT __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DWORD uin = 0;
uid_str uid = { 0 };
@@ -374,24 +374,24 @@ HANDLE __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEv
switch (dbei.eventType) {
case EVENTTYPE_CONTACTS:
- {
- 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;
- }
- }
+ {
+ 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;
+ }
+ }
break;
case EVENTTYPE_AUTHREQUEST:
@@ -421,7 +421,7 @@ int CIcqProto::Authorize(HANDLE hDbEvent)
{
if (icqOnline() && hDbEvent) {
HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
return 1;
DWORD uin;
@@ -447,7 +447,7 @@ int CIcqProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
{
if (icqOnline() && hDbEvent) {
HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
return 1;
DWORD uin;
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h
index 9b9986d06d..44e23e627f 100644
--- a/protocols/IcqOscarJ/src/icq_proto.h
+++ b/protocols/IcqOscarJ/src/icq_proto.h
@@ -54,50 +54,50 @@ struct CIcqProto : public PROTO<CIcqProto>
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT *psr);
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent);
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT *psr);
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent);
- virtual int __cdecl Authorize(HANDLE hDbEvent);
- virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl Authorize(HANDLE hDbEvent);
+ virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
- virtual HANDLE __cdecl ChangeInfo( int iInfoType, void *pInfoData);
+ virtual HANDLE __cdecl ChangeInfo( int iInfoType, void *pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
- virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const TCHAR **szFilename);
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const TCHAR **szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR *id);
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR *email);
- virtual HANDLE __cdecl SearchByName(const PROTOCHAR *nick, const PROTOCHAR *firstName, const PROTOCHAR *lastName);
- virtual HWND __cdecl SearchAdvanced(HWND owner);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+ virtual HANDLE __cdecl SearchBasic(const PROTOCHAR *id);
+ virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR *email);
+ virtual HANDLE __cdecl SearchByName(const PROTOCHAR *nick, const PROTOCHAR *firstName, const PROTOCHAR *lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url);
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg);
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
- virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
+ virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
//====| Services |====================================================================
INT_PTR __cdecl AddServerContact(WPARAM wParam, LPARAM lParam);
@@ -620,7 +620,7 @@ struct CIcqProto : public PROTO<CIcqProto>
// server-list support functions
int nJustAddedCount;
int nJustAddedSize;
- HANDLE* pdwJustAddedList;
+ HCONTACT* pdwJustAddedList;
void AddJustAddedContact(HCONTACT hContact);
BOOL IsContactJustAdded(HCONTACT hContact);
@@ -766,8 +766,8 @@ struct CIcqProto : public PROTO<CIcqProto>
void oft_sendFileRedirect(DWORD dwUin, char *szUid, oscar_filetransfer *ft, DWORD dwIP, WORD wPort, int bProxy);
//---- | icq_svcs.cpp |----------------------------------------------------------------
- HANDLE AddToListByUIN(DWORD dwUin, DWORD dwFlags);
- HANDLE AddToListByUID(const char *szUID, DWORD dwFlags);
+ HCONTACT AddToListByUIN(DWORD dwUin, DWORD dwFlags);
+ HCONTACT AddToListByUID(const char *szUID, DWORD dwFlags);
void ICQAddRecvEvent(HCONTACT hContact, WORD wType, PROTORECVEVENT* pre, DWORD cbBlob, PBYTE pBlob, DWORD flags);
INT_PTR __cdecl IcqAddCapability(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp
index fa866116bc..df7fdc753f 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -807,7 +807,7 @@ void CIcqProto::AddJustAddedContact(HCONTACT hContact)
if (nJustAddedCount >= nJustAddedSize)
{
nJustAddedSize += 10;
- pdwJustAddedList = (HANDLE*)SAFE_REALLOC(pdwJustAddedList, nJustAddedSize * sizeof(HANDLE));
+ pdwJustAddedList = (HCONTACT*)SAFE_REALLOC(pdwJustAddedList, nJustAddedSize * sizeof(HCONTACT));
}
pdwJustAddedList[nJustAddedCount] = hContact;
diff --git a/protocols/IcqOscarJ/src/icq_xtraz.cpp b/protocols/IcqOscarJ/src/icq_xtraz.cpp
index 45ff2829fe..68bf447e3f 100644
--- a/protocols/IcqOscarJ/src/icq_xtraz.cpp
+++ b/protocols/IcqOscarJ/src/icq_xtraz.cpp
@@ -411,7 +411,7 @@ void CIcqProto::SendXtrazNotifyResponse(DWORD dwUin, DWORD dwMID, DWORD dwMID2,
char *szBody = (char*)_alloca(nBodyLen);
HCONTACT hContact = HContactFromUIN(dwUin, NULL);
- if (hContact != INVALID_HANDLE_VALUE && !CheckContactCapabilities(hContact, CAPF_XTRAZ)) {
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && !CheckContactCapabilities(hContact, CAPF_XTRAZ)) {
SAFE_FREE(&szResBody);
return; // Contact does not support xtraz, do not send anything
}
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index c0077c9c89..d8b59e2ff4 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -633,7 +633,7 @@ INT_PTR CIcqProto::SetPassword(WPARAM wParam, LPARAM lParam)
// TODO: Adding needs some more work in general
-HANDLE CIcqProto::AddToListByUIN(DWORD dwUin, DWORD dwFlags)
+HCONTACT CIcqProto::AddToListByUIN(DWORD dwUin, DWORD dwFlags)
{
int bAdded;
HCONTACT hContact = HContactFromUIN(dwUin, &bAdded);
@@ -652,7 +652,7 @@ HANDLE CIcqProto::AddToListByUIN(DWORD dwUin, DWORD dwFlags)
}
-HANDLE CIcqProto::AddToListByUID(const char *szUID, DWORD dwFlags)
+HCONTACT CIcqProto::AddToListByUID(const char *szUID, DWORD dwFlags)
{
int bAdded;
HCONTACT hContact = HContactFromUID(0, szUID, &bAdded);
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index 57b3f9ac4f..2c38bcd74a 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -1455,7 +1455,7 @@ bool CIcqProto::validateStatusMessageRequest(HCONTACT hContact, WORD byMessageTy
// Privacy control
if (getByte("StatusMsgReplyCList", 0)) {
// Don't send statusmessage to unknown contacts
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
return false;
// Don't send statusmessage to temporary contacts or hidden contacts
@@ -1472,7 +1472,7 @@ bool CIcqProto::validateStatusMessageRequest(HCONTACT hContact, WORD byMessageTy
}
// Dont send messages to people you are hiding from
- if (hContact != INVALID_HANDLE_VALUE &&
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE &&
getWord(hContact, "ApparentMode", 0) == ID_STATUS_OFFLINE) {
return false;
}
@@ -1487,7 +1487,7 @@ bool CIcqProto::validateStatusMessageRequest(HCONTACT hContact, WORD byMessageTy
return false;
}
- if (hContact != INVALID_HANDLE_VALUE && m_iStatus == ID_STATUS_INVISIBLE &&
+ if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && m_iStatus == ID_STATUS_INVISIBLE &&
getWord(hContact, "ApparentMode", 0) != ID_STATUS_ONLINE) {
if (!getByte(hContact, "TemporaryVisible", 0)) { // Allow request to temporary visible contacts
return false;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 2af1d877fe..fad43be645 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -358,7 +358,7 @@ HCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
return hContact;
}
-HANDLE CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
if (psr->cbSize != sizeof(JABBER_SEARCH_RESULT) && psr->id == NULL)
return NULL;
@@ -368,7 +368,7 @@ HANDLE CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
return AddToListByJID(jid, flags);
}
-HANDLE __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDLE hDbEvent)
+HCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDLE hDbEvent)
{
debugLogA("AddToListByEvent");
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index 6c90985d43..80b206ce71 100644
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -82,50 +82,50 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
- virtual int __cdecl Authorize(HANDLE hDbEvent);
- virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl Authorize(HANDLE hDbEvent);
+ virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
- virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
+ virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
- virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
- virtual HANDLE __cdecl SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName);
- virtual HWND __cdecl SearchAdvanced(HWND owner);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
+ virtual HANDLE __cdecl SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url);
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg);
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
- virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
//====| Services |====================================================================
INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp
index 7cf8571652..4c95f5ec38 100644
--- a/protocols/MRA/src/MraChat.cpp
+++ b/protocols/MRA/src/MraChat.cpp
@@ -111,7 +111,7 @@ INT_PTR CMraProto::MraChatSessionEventSendByHandle(HCONTACT hContactChatSession,
gce.ptszNick = wszNick;
}
else {
- HANDLE hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, NULL);
+ HCONTACT hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, NULL);
wszUID = lpszUID;
if (hContactSender)
gce.ptszNick = GetContactNameW(hContactSender);
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index a8686a95ee..f6ea74dbff 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -126,7 +126,7 @@ int CMraProto::OnPreShutdown(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-HANDLE CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags)
+HCONTACT CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags)
{
if (!plpsEMail)
return NULL;
@@ -153,7 +153,7 @@ HANDLE CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR
return hContact;
}
-HANDLE CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
+HCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
if (psr->cbSize != sizeof(PROTOSEARCHRESULT))
return 0;
@@ -161,7 +161,7 @@ HANDLE CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
return AddToListByEmail(psr->email, psr->nick, psr->firstName, psr->lastName, flags);
}
-HANDLE CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+HCONTACT CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
diff --git a/protocols/MRA/src/MraProto.h b/protocols/MRA/src/MraProto.h
index d0a73ab7af..3ac3f5cfc9 100644
--- a/protocols/MRA/src/MraProto.h
+++ b/protocols/MRA/src/MraProto.h
@@ -38,50 +38,50 @@ struct CMraProto : public PROTO<CMraProto>
// PROTO_INTERFACE
// ====================================================================================
- virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
- virtual int __cdecl Authorize(HANDLE hDBEvent);
- virtual int __cdecl AuthDeny(HANDLE hDBEvent, const TCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage);
+ virtual int __cdecl Authorize(HANDLE hDBEvent);
+ virtual int __cdecl AuthDeny(HANDLE hDBEvent, const TCHAR* szReason);
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage);
- virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
+ virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
- virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
- virtual HANDLE __cdecl SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName);
- virtual HWND __cdecl SearchAdvanced(HWND owner);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
- virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR* msg);
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR* msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
void ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode);
void MraPopupShowW(HCONTACT hContact, DWORD dwType, DWORD dwFlags, LPWSTR lpszTitle, LPCWSTR lpszMessage);
@@ -196,7 +196,7 @@ struct CMraProto : public PROTO<CMraProto>
CRITICAL_SECTION csCriticalSectionSend;
- HANDLE AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags);
+ HCONTACT AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags);
DWORD MraMessage(BOOL bAddToQueue, HCONTACT hContact, DWORD dwAckType, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &wszMessage, LPBYTE lpbMultiChatData, size_t dwMultiChatDataSize);
DWORD MraMessageAsk(DWORD dwMsgID, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &wszMessage, const CMStringW &wszMessageRTF);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 950d8575ef..8ce3a13620 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -249,7 +249,7 @@ HCONTACT CMsnProto::AddToListByEmail(const char *email, const char *nick, DWORD
return hContact;
}
-HANDLE __cdecl CMsnProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT __cdecl CMsnProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
TCHAR *id = psr->id ? psr->id : psr->email;
return AddToListByEmail(
@@ -258,7 +258,7 @@ HANDLE __cdecl CMsnProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
flags);
}
-HANDLE __cdecl CMsnProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+HCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = { sizeof(dbei) };
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index 1e351b900b..cf40b2b89e 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -32,8 +32,8 @@ struct CMsnProto : public PROTO<CMsnProto>
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR* szReason);
diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h
index 507faea578..0827d7616c 100644
--- a/protocols/Omegle/src/proto.h
+++ b/protocols/Omegle/src/proto.h
@@ -44,8 +44,8 @@ public:
}
// PROTO_INTERFACE
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const PROTOCHAR* szReason );
diff --git a/protocols/Omegle/src/stubs.cpp b/protocols/Omegle/src/stubs.cpp
index 817c2c02a9..1f8c085547 100644
--- a/protocols/Omegle/src/stubs.cpp
+++ b/protocols/Omegle/src/stubs.cpp
@@ -22,12 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "common.h"
-HANDLE OmegleProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT OmegleProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
return NULL;
};
-HANDLE OmegleProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+HCONTACT OmegleProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
};
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index 27aed96317..01f3f43e23 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -46,14 +46,14 @@ CSkypeProto::~CSkypeProto()
}
}
-HANDLE __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
CContact::Ref contact;
this->GetContact((char *)mir_ptr<char>(::mir_utf8encodeW(psr->id)), contact);
return this->AddContact(contact);
}
-HANDLE __cdecl CSkypeProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+HCONTACT __cdecl CSkypeProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h
index 761607c9c4..972d450e0f 100644
--- a/protocols/Skype/src/skype_proto.h
+++ b/protocols/Skype/src/skype_proto.h
@@ -179,50 +179,50 @@ public:
~CSkypeProto();
// PROTO_INTERFACE
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
- virtual int __cdecl Authorize( HANDLE hDbEvent );
- virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl Authorize( HANDLE hDbEvent );
+ virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
- virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
+ virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
+ virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
- virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
- virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
- virtual HANDLE __cdecl SearchByName( const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName );
- virtual HWND __cdecl SearchAdvanced( HWND owner );
- virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
+ virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
+ virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
+ virtual HANDLE __cdecl SearchByName( const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName );
+ virtual HWND __cdecl SearchAdvanced( HWND owner );
+ virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
- virtual int __cdecl SetStatus( int iNewStatus );
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
- virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
- virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
+ virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
// instances
static CSkypeProto* InitSkypeProto(const char* protoName, const wchar_t* userName);
diff --git a/protocols/Tlen/src/tlen.h b/protocols/Tlen/src/tlen.h
index e9ad52b64a..1096210110 100644
--- a/protocols/Tlen/src/tlen.h
+++ b/protocols/Tlen/src/tlen.h
@@ -218,8 +218,8 @@ struct TlenProtocol : public PROTO<TlenProtocol>
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason);
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 3eff4c7b86..034bfd0ea8 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -214,7 +214,7 @@ static HCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD fl
return hContact;
}
-HANDLE TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
+HCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
HCONTACT hContact;
TLEN_SEARCH_RESULT *jsr = (TLEN_SEARCH_RESULT*)psr;
@@ -224,7 +224,7 @@ HANDLE TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
return hContact;
}
-HANDLE TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEvent )
+HCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEvent )
{
DBEVENTINFO dbei = { sizeof(dbei) };
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index 9a37a50284..3cb24db577 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -43,7 +43,7 @@ void TwitterProto::AddToListWorker(void *p)
mir_free(name);
}
-HANDLE TwitterProto::AddToList(int flags,PROTOSEARCHRESULT *result)
+HCONTACT TwitterProto::AddToList(int flags,PROTOSEARCHRESULT *result)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
@@ -87,7 +87,7 @@ int TwitterProto::GetInfo(HCONTACT hContact,int info_type)
if(info_type == 0) // From clicking "Update" in the Userinfo dialog
{
- ForkThread(&TwitterProto::UpdateInfoWorker, hContact);
+ ForkThread(&TwitterProto::UpdateInfoWorker, (void*)hContact);
return 0;
}
@@ -179,7 +179,7 @@ void TwitterProto::GetAwayMsgWorker(void *hContact)
HANDLE TwitterProto::GetAwayMsg(HCONTACT hContact)
{
- ForkThread(&TwitterProto::GetAwayMsgWorker, hContact);
+ ForkThread(&TwitterProto::GetAwayMsgWorker, (void*)hContact);
return (HANDLE)1;
}
@@ -188,7 +188,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
- const HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ const HCONTACT hContact = (HCONTACT)wParam;
if(!IsMyContact(hContact))
return 0;
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 33b7a019ea..6ec565871f 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -246,7 +246,7 @@ INT_PTR TwitterProto::GetStatus(WPARAM,LPARAM)
INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
{
// TODO: support replying to tweets instead of just users
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = (HCONTACT)wParam;
HWND hDlg = CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWEET),0,tweet_proc,reinterpret_cast<LPARAM>(this));
@@ -264,7 +264,7 @@ INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
INT_PTR TwitterProto::VisitHomepage(WPARAM wParam,LPARAM)
{
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = (HCONTACT)wParam;
DBVARIANT dbv;
// TODO: remove this
@@ -398,7 +398,7 @@ int TwitterProto::OnPreShutdown(WPARAM,LPARAM)
int TwitterProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM)
{
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = (HCONTACT)wParam;
if(IsMyContact(hContact))
ShowContactMenus(true);
@@ -498,7 +498,7 @@ void TwitterProto::UpdateSettings()
for(HCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
HCONTACT hNext = db_find_next(hContact, m_szModuleName);
if(isChatRoom(hContact))
- CallService(MS_DB_CONTACT_DELETE,reinterpret_cast<WPARAM>(hContact),0);
+ CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
hContact = hNext;
}
}
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h
index 16739bbfc9..68a7cb3b27 100644
--- a/protocols/Twitter/src/proto.h
+++ b/protocols/Twitter/src/proto.h
@@ -36,8 +36,8 @@ public:
//PROTO_INTERFACE
- virtual HANDLE __cdecl AddToList(int,PROTOSEARCHRESULT *);
- virtual HANDLE __cdecl AddToListByEvent(int,int,HANDLE);
+ virtual HCONTACT __cdecl AddToList(int,PROTOSEARCHRESULT *);
+ virtual HCONTACT __cdecl AddToListByEvent(int,int,HANDLE);
virtual int __cdecl Authorize(HANDLE);
virtual int __cdecl AuthDeny(HANDLE,const TCHAR *);
diff --git a/protocols/Twitter/src/stubs.cpp b/protocols/Twitter/src/stubs.cpp
index c62ae86147..9b8fc7deea 100644
--- a/protocols/Twitter/src/stubs.cpp
+++ b/protocols/Twitter/src/stubs.cpp
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "proto.h"
-HANDLE TwitterProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+HCONTACT TwitterProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
}
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 2a0bfb0a90..3e52d04e5f 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -273,7 +273,7 @@ HANDLE CVkProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName,
return 0;
}
-HANDLE CVkProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+HCONTACT CVkProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
return NULL;
}
@@ -300,7 +300,7 @@ int CVkProto::UserIsTyping(HCONTACT hContact, int type)
return 0;
}
-HANDLE CVkProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+HCONTACT CVkProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
}
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index 7d247b2776..6d5eec5f1a 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -116,50 +116,50 @@ struct CVkProto : public PROTO<CVkProto>
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
- virtual int __cdecl Authorize(HANDLE hDbEvent);
- virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl Authorize(HANDLE hDbEvent);
+ virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
- virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
+ virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
- virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
- virtual HANDLE __cdecl SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName);
- virtual HWND __cdecl SearchAdvanced(HWND owner);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
+ virtual HANDLE __cdecl SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
- virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
//==== Events ========================================================================
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index cac5aee537..c8d729f540 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -313,7 +313,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
if (bCleanContacts)
for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
if (!isChatRoom(hContact))
- arContacts.insert(hContact);
+ arContacts.insert((HANDLE)hContact);
for (int i = 0; (pInfo = json_at(pResponse, i)) != NULL; i++) {
ptrT szValue(json_as_string(json_get(pInfo, "uid")));
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp
index afd2138d9c..b97c79b396 100644
--- a/protocols/Yahoo/src/proto.cpp
+++ b/protocols/Yahoo/src/proto.cpp
@@ -99,7 +99,7 @@ int CYahooProto::OnModulesLoadedEx(WPARAM, LPARAM)
////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HANDLE CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr )
+HCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr )
{
debugLogA("[YahooAddToList] Flags: %d", flags);
@@ -119,12 +119,14 @@ HANDLE CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr )
if (db_get_b(hContact, "CList", "NotOnList", 0)) {
debugLogA("[YahooAddToList] Temporary Buddy:%s already on our buddy list", id);
//return 0;
- } else {
+ }
+ else {
debugLogA("[YahooAddToList] Buddy:%s already on our buddy list", id);
mir_free(id);
return 0;
}
- } else if (flags & PALF_TEMPORARY) { /* not on our list */
+ }
+ else if (flags & PALF_TEMPORARY) { /* not on our list */
debugLogA("[YahooAddToList] Adding Temporary Buddy:%s ", id);
}
@@ -135,7 +137,7 @@ HANDLE CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr )
return hContact;
}
-HANDLE __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDLE hDbEvent )
+HCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDLE hDbEvent )
{
debugLogA("[YahooAddToListByEvent]");
if (!m_bLoggedIn)
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h
index c548585dab..667473292b 100644
--- a/protocols/Yahoo/src/proto.h
+++ b/protocols/Yahoo/src/proto.h
@@ -25,51 +25,51 @@ struct CYahooProto : public PROTO<CYahooProto>
// PROTO_INTERFACE
//====================================================================================
- virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
- virtual int __cdecl Authorize( HANDLE hDbEvent );
- virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl Authorize( HANDLE hDbEvent );
+ virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
- virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
+ virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
+ virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
- virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
- virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
- virtual HANDLE __cdecl SearchByName( const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName );
- virtual HWND __cdecl SearchAdvanced( HWND owner );
- virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
+ virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
+ virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
+ virtual HANDLE __cdecl SearchByName( const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName );
+ virtual HWND __cdecl SearchAdvanced( HWND owner );
+ virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
- virtual int __cdecl SetAwayMsg( int m_iStatus, const PROTOCHAR *msg);
- virtual INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
+ virtual int __cdecl SetAwayMsg( int m_iStatus, const PROTOCHAR *msg);
+ virtual INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
//====| Events |======================================================================
int __cdecl OnContactDeleted(WPARAM, LPARAM);