diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Skype/src/skype_chat.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_chat.h | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/WhatsApp/src/contacts.cpp | 10 | ||||
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/WhatsApp/src/theme.cpp | 8 |
6 files changed, 14 insertions, 14 deletions
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index cfc6bb4aab..e0f76365c2 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -140,7 +140,7 @@ ChatRoom::~ChatRoom() this->members.destroy();
}
-HANDLE ChatRoom::GetContactHandle() const
+HCONTACT ChatRoom::GetContactHandle() const
{
return this->hContact;
}
diff --git a/protocols/Skype/src/skype_chat.h b/protocols/Skype/src/skype_chat.h index eb5e7d432e..e5e775f980 100644 --- a/protocols/Skype/src/skype_chat.h +++ b/protocols/Skype/src/skype_chat.h @@ -158,7 +158,7 @@ public: ChatRoom(const wchar_t *cid, const wchar_t *name, CSkypeProto *ppro);
~ChatRoom();
- HANDLE GetContactHandle() const;
+ HCONTACT GetContactHandle() const;
void SetTopic(const wchar_t *topic);
wchar_t *GetUri();
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 01f3f43e23..c1d745185e 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -80,7 +80,7 @@ int __cdecl CSkypeProto::Authorize(HANDLE hDbEvent) if (this->IsOnline() && hDbEvent)
{
HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
return 1;
return CSkypeProto::GrantAuth((WPARAM)hContact, NULL);
@@ -94,7 +94,7 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) if (this->IsOnline())
{
HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
return 1;
return CSkypeProto::RevokeAuth((WPARAM)hContact, NULL);
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index fb3a7bea5f..d3cf75690c 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -593,7 +593,7 @@ void WhatsAppProto::onParticipatingGroups(const std::vector<string>& paramVector void WhatsAppProto::HandleReceiveGroups(const std::vector<string>& groups, bool isOwned)
{
HCONTACT hContact;
- map<HANDLE, bool> isMember; // at the moment, only members of owning groups are stored
+ map<HCONTACT, bool> isMember; // at the moment, only members of owning groups are stored
// This could take long time if there are many new groups which aren't
// yet stored to the database. But that should be a rare case
@@ -682,7 +682,7 @@ void __cdecl WhatsAppProto::SendCreateGroupWorker(void* data) INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
input_box* ib = new input_box;
if (getTString(hContact, WHATSAPP_KEY_PUSH_NAME, &dbv))
@@ -698,8 +698,8 @@ INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam ib->thread = &WhatsAppProto::SendSetGroupNameWorker;
ib->proto = this;
- HANDLE* hContactPtr = new HANDLE(hContact);
- ib->userData = (void*) hContactPtr;
+ HCONTACT *hContactPtr = new HCONTACT(hContact);
+ ib->userData = (void*)hContactPtr;
HWND hDlg = CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_INPUTBOX), 0, WhatsAppInputBoxProc,
reinterpret_cast<LPARAM>(ib));
@@ -710,7 +710,7 @@ INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam INT_PTR __cdecl WhatsAppProto::OnLeaveGroup(WPARAM wParam, LPARAM)
{
DBVARIANT dbv;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
if (this->isOnline() && !getString(hContact, WHATSAPP_KEY_ID, &dbv))
{
setByte(hContact, "IsGroupMember", 0);
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index fc83768621..1430969639 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -314,7 +314,7 @@ int WhatsAppProto::RequestFriendship(WPARAM wParam, LPARAM lParam) if (wParam == NULL || isOffline())
return 0;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
DBVARIANT dbv;
if ( !getString(hContact, WHATSAPP_KEY_ID, &dbv))
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index 3e64694ade..f76129f12d 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -56,14 +56,14 @@ static WhatsAppProto* GetInstanceByHContact(HCONTACT hContact) template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM,LPARAM)>
INT_PTR GlobalServiceParam(WPARAM wParam,LPARAM lParam, LPARAM lParam2)
{
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam,lParam2) : 0;
}
@@ -72,7 +72,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam) for (size_t i=0; i<SIZEOF(g_hContactMenuItems); i++)
Menu_ShowItem(g_hContactMenuItems[i], false);
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
@@ -104,7 +104,7 @@ void WhatsAppProto::InitContactMenus() int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
if (hContact)
debugLogA(this->GetContactDisplayName(hContact).c_str());
else
|