summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:42:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:42:33 +0000
commitf9c9f7a27456f98ac84f27add1c2aea5bd99a35c (patch)
treedbe31bfa288511347da75aa03eff6d4b7af1206b /protocols/IcqOscarJ/src
parentddba4ede6b451d0cfcd0d32b5180fbd0689966bf (diff)
more HCONTACT
git-svn-id: http://svn.miranda-ng.org/main/trunk@8079 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src')
-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
13 files changed, 88 insertions, 88 deletions
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;