From 52c57ef89cc24bdb8c70908f544ae86fd87db129 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Jan 2015 16:30:05 +0000 Subject: - statusbar icon added to notify user that a message was read; - FMessage own numbering removed as atavism; - WAConnection::msg_id followed FMessage::id on its road to hell - WhatsAppProto::GetSerial() added as the only method that increments message numbers git-svn-id: http://svn.miranda-ng.org/main/trunk@11941 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/FMessage.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++/FMessage.h') diff --git a/protocols/WhatsApp/src/WhatsAPI++/FMessage.h b/protocols/WhatsApp/src/WhatsAPI++/FMessage.h index fb523d9c8e..e53b7d88dd 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/FMessage.h +++ b/protocols/WhatsApp/src/WhatsAPI++/FMessage.h @@ -15,8 +15,8 @@ #include #include "IMutex.h" -class Key { -public: +struct Key +{ std::string remote_jid; bool from_me; std::string id; @@ -26,16 +26,9 @@ public: }; -class FMessage { -private: - static int generating_id; - static std::string generating_header; - - -public: - static IMutex* generating_lock; // #WORKAROUND - - Key* key; +struct FMessage +{ + Key key; unsigned char media_wa_type; std::string data; long long timestamp; @@ -79,12 +72,10 @@ public: }; static std::string getMessage_WA_Type_StrValue(unsigned char type); - static std::string nextKeyIdNumber(); - static unsigned char getMessage_WA_Type(const std::string& typeString); + static unsigned char getMessage_WA_Type(const std::string &typeString); FMessage(); - FMessage(const std::string& remote_jid, bool from_me = true, const std::string& data = ""); - FMessage(Key* key); + FMessage(const std::string &remote_jid, bool from_me, const std::string &id); virtual ~FMessage(); }; -- cgit v1.2.3