diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 14:42:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 14:42:51 +0000 |
commit | 33953cc6a0fab6a91af293c6838f8a46dd7922da (patch) | |
tree | 2dbbe718ad42545bde6c9f7672387827c530550a /protocols/FacebookRM | |
parent | e190a7fde521bd6af9ea485cc730f854aaf38e11 (diff) |
HCONTACT, part 3
git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 16 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 6 |
3 files changed, 11 insertions, 13 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index a06efacc46..0efbe5ea1c 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -35,8 +35,6 @@ void FacebookProto::SendMsgWorker(void *p) if(p == NULL)
return;
-// ScopedLock s(facy.send_message_lock_, 500);
-
send_direct *data = static_cast<send_direct*>(p);
DBVARIANT dbv;
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 2bb3659f87..ea869c4830 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -287,7 +287,7 @@ int FacebookProto::Authorize(HANDLE hDbEvent) return 1;
HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
return 1;
return ApproveFriendship((WPARAM)hContact, NULL);
@@ -299,7 +299,7 @@ int FacebookProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) return 1;
HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
return 1;
// TODO: hide from facebook requests list
@@ -450,7 +450,7 @@ INT_PTR FacebookProto::OnMind(WPARAM wParam, LPARAM lParam) if (!isOnline())
return 1;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
wall_data *wall = new wall_data();
wall->user_id = ptrA(getStringA(hContact, FACEBOOK_KEY_ID));
@@ -504,7 +504,7 @@ INT_PTR FacebookProto::RefreshBuddyList(WPARAM, LPARAM) INT_PTR FacebookProto::VisitProfile(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
std::string url = FACEBOOK_URL_PROFILE;
@@ -527,7 +527,7 @@ INT_PTR FacebookProto::VisitProfile(WPARAM wParam,LPARAM lParam) INT_PTR FacebookProto::VisitFriendship(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
if (wParam == 0 || !IsMyContact(hContact))
return 1;
@@ -547,7 +547,7 @@ INT_PTR FacebookProto::Poke(WPARAM wParam,LPARAM lParam) if (wParam == NULL || isOffline())
return 1;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
ptrA id(getStringA(hContact, FACEBOOK_KEY_ID));
if (id == NULL)
@@ -564,7 +564,7 @@ INT_PTR FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam) bool deleting = (lParam == 1);
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
// Ignore groupchats and, if deleting, also not-friends
if (isChatRoom(hContact) || (deleting && getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND))
@@ -601,7 +601,7 @@ INT_PTR FacebookProto::RequestFriendship(WPARAM wParam,LPARAM lParam) if (wParam == NULL || isOffline())
return 1;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
ptrA id(getStringA(hContact, FACEBOOK_KEY_ID));
if (id == NULL)
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index e0b7fd134e..61025d53d3 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -69,7 +69,7 @@ static FacebookProto * GetInstanceByHContact(HCONTACT hContact) template<INT_PTR (__cdecl FacebookProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- FacebookProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ FacebookProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
@@ -78,7 +78,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam) for (size_t i=0; i<SIZEOF(g_hContactMenuItems); i++)
Menu_ShowItem(g_hContactMenuItems[i], false);
- FacebookProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ FacebookProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
@@ -152,7 +152,7 @@ void UninitContactMenus() int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
bool bIsChatroom = isChatRoom(hContact);
Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_PROFILE], true);
|