diff options
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.h | 4 |
5 files changed, 8 insertions, 8 deletions
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);
|