summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-12-28 20:30:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-12-28 20:30:32 +0300
commit8ae09e329384682579d59fc92cd7ed5de37e1351 (patch)
treeb5b4db8ae2f9796d222fcf6324346e86d8cd2dba /protocols/FacebookRM/src/proto.h
parent6872a9a9b1f032ede5471a8a03abc76e7c7259d9 (diff)
Facebook:
- fixes problems with decoding attachments; - major rework of class structure; - version bump
Diffstat (limited to 'protocols/FacebookRM/src/proto.h')
-rw-r--r--protocols/FacebookRM/src/proto.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h
index dff762bfaa..f31981a500 100644
--- a/protocols/FacebookRM/src/proto.h
+++ b/protocols/FacebookRM/src/proto.h
@@ -26,6 +26,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
class FacebookProto : public PROTO<FacebookProto>
{
+ bool IgnoreDuplicates(const std::string &mid);
+ bool ProcessSpecialMessage(std::vector<facebook_message>* messages, const JSONNode &meta_, MessageType messageType, const std::string &messageData = "");
+
+ void ParseAttachments(std::string &message_text, const JSONNode &delta_, std::string other_user_fbid, bool legacy);
+ void ParseMessageType(facebook_message &message, const JSONNode &log_type_, const JSONNode &log_body_, const JSONNode &log_data_);
+ bool ParseMessageMetadata(facebook_message &message, const JSONNode &meta_);
+
+ int ParseChatInfo(std::string* data, facebook_chatroom* fbc);
+ int ParseChatParticipants(std::string *data, std::map<std::string, chatroom_participant>* participants);
+ int ParseFriends(std::string*, std::map< std::string, facebook_user* >*, bool);
+ int ParseHistory(std::string*, std::vector< facebook_message >*, std::string *);
+ int ParseMessages(std::string*, std::vector< facebook_message >*, std::map< std::string, facebook_notification* >*);
+ int ParseMessagesCount(std::string *data, int *messagesCount, int *unreadCount);
+ int ParseNotifications(std::string*, std::map< std::string, facebook_notification* >*);
+ int ParseThreadInfo(std::string* data, std::string* user_id);
+ int ParseThreadMessages(std::string*, std::vector< facebook_message >*, bool unreadOnly);
+ int ParseUnreadThreads(std::string*, std::vector< std::string >*);
+ int ParseUserInfo(std::string* data, facebook_user* fbu);
+
public:
FacebookProto(const char *proto_name, const wchar_t *username);
~FacebookProto();
@@ -48,7 +67,6 @@ public:
inline bool isInvisible()
{
return m_invisible;
- //return (m_iStatus == ID_STATUS_INVISIBLE);
}
inline int IdleSeconds()