diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:42:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:42:33 +0000 |
commit | f9c9f7a27456f98ac84f27add1c2aea5bd99a35c (patch) | |
tree | dbe31bfa288511347da75aa03eff6d4b7af1206b /protocols/IcqOscarJ/src/icq_proto.cpp | |
parent | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (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/icq_proto.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
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;
|