diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-25 22:07:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-25 22:07:28 +0000 |
commit | 97ba0b94c5da04f0d03945baa21c338c77c9dc20 (patch) | |
tree | 55d1b4c131a616b8c660128c70418df95de99b90 /protocols/WhatsApp/src/WhatsAPI++/WAConnection.h | |
parent | 4b9da6b7ea643ac4917440880583d507b697cf9a (diff) |
- correct writing of tokens, especially extended
- further code optimizations
git-svn-id: http://svn.miranda-ng.org/main/trunk@11911 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.h')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h index 983cb4e4bc..697542e32c 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h @@ -24,6 +24,7 @@ #pragma warning(disable : 4290)
class WALogin;
+class WASocketConnection;
class KeyStream;
class BinTreeNodeReader;
@@ -351,18 +352,18 @@ class WAConnection { }
};
+ friend class WALogin;
private:
- BinTreeNodeReader* in;
- BinTreeNodeWriter* out;
- WAListener* event_handler;
- WAGroupListener* group_event_handler;
+ BinTreeNodeReader *in;
+ BinTreeNodeWriter *out;
+ WAListener *event_handler;
+ WAGroupListener *group_event_handler;
bool verbose;
int iqid;
std::map<string, IqResultHandler*> pending_server_requests;
- IMutex* mutex;
+ IMutex *mutex;
- void init(WAListener* event_handler, WAGroupListener* group_event_handler, IMutex* mutex);
void sendMessageWithMedia(FMessage* message) throw(WAException);
void sendMessageWithBody(FMessage* message) throw(WAException);
std::map<string, string>* parseCategories(ProtocolTreeNode* node) throw(WAException);
@@ -379,8 +380,9 @@ private: std::vector<ProtocolTreeNode*>* processGroupSettings(const std::vector<GroupSetting>& gruops);
public:
- WAConnection(IMutex* mutex, WAListener* event_handler = NULL, WAGroupListener* group_event_handler = NULL);
+ WAConnection(const std::string& user, const std::string& resource, IMutex* mutex, WAListener* event_handler, WAGroupListener* group_event_handler);
virtual ~WAConnection();
+ void init(IMutex* mutex, WASocketConnection*);
std::string user;
std::string domain;
@@ -395,11 +397,8 @@ public: int account_kind;
time_t lastTreeRead;
- static const int DICTIONARY_LEN;
- static const char* dictionary[];
-
- static const int EXTDICTIONARY_LEN;
- static const char* extended_dict[];
+ static void globalInit(void);
+ static int tokenLookup(const std::string&);
static MessageStore* message_store;
KeyStream inputKey, outputKey;
|