From e94c705bb01c662d934c0096480bc9a732d0e1ec Mon Sep 17 00:00:00 2001 From: watcherhd Date: Thu, 19 Jan 2012 12:21:27 +0000 Subject: FacebookRM: Version bump Version 0.0.7.0 + Support for group chats (EXPERIMENTAL!) - enable it in options ! Fixed loading contact list ! Fixed potential freeze. Total downloads: (None or statistics not available yet) Version 0.0.6.1a Reuploaded. Total downloads: (None or statistics not available yet) Version 0.0.6.1 + Returned option to close chat windows (on website) + New option to map non-standard statuses to Invisible (insetad of Online) + New option to load contacts, which have "On the Phone" status ! Fixed changing chat visibility ! Very long messages are no longer received duplicitely ! Changes and fixes related to multiuser messages and messages from people, which are not in server-list Total downloads: (None or statistics not available yet) git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@261 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- FacebookRM/messages.cpp | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) (limited to 'FacebookRM/messages.cpp') diff --git a/FacebookRM/messages.cpp b/FacebookRM/messages.cpp index 7091e77..7578550 100644 --- a/FacebookRM/messages.cpp +++ b/FacebookRM/messages.cpp @@ -27,28 +27,6 @@ Last change on : $Date: 2011-02-07 18:19:39 +0100 (po, 07 2 2011) $ #include "common.h" -struct send_direct -{ - send_direct(HANDLE hContact,const std::string &msg, HANDLE msgid) : hContact(hContact), msg(msg), msgid(msgid) {} - HANDLE hContact; - std::string msg; - HANDLE msgid; -}; - -struct send_typing -{ - send_typing(HANDLE hContact,const int status) : hContact(hContact), status(status) {} - HANDLE hContact; - int status; -}; - -struct send_messaging -{ - send_messaging(const std::string &user_id, const int type) : user_id(user_id), type(type) {} - std::string user_id; - int type; -}; - int FacebookProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre) { DBVARIANT dbv; @@ -102,6 +80,19 @@ void FacebookProto::SendMsgWorker(void *p) delete data; } +void FacebookProto::SendChatMsgWorker(void *p) +{ + if(p == NULL) + return; + + send_chat *data = static_cast(p); + std::string err_message = ""; + + facy.send_message(data->chat_id, data->msg, &err_message, false ); + + delete data; +} + int FacebookProto::SendMsg(HANDLE hContact, int flags, const char *msg) { // TODO: msg comes as Unicode (retyped wchar_t*), why should we convert it as ANSI to UTF-8? o_O -- cgit v1.2.3