diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-23 22:00:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-23 22:00:48 +0300 |
commit | 18374c1f27249cd2edd87fe6f4fb8af5d5dcdcc4 (patch) | |
tree | 95765f13ec2ea996a17c7fe6add533703c297ebb /protocols/Facebook/src/proto.h | |
parent | 7fdb247a350f7a966d6f81954a2ee40f1600d224 (diff) |
Facebook:
- added presence processing;
- added contacts processing;
- code cleaning and restructurizing
Diffstat (limited to 'protocols/Facebook/src/proto.h')
-rw-r--r-- | protocols/Facebook/src/proto.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/protocols/Facebook/src/proto.h b/protocols/Facebook/src/proto.h index ad46f4c454..7d5bedc911 100644 --- a/protocols/Facebook/src/proto.h +++ b/protocols/Facebook/src/proto.h @@ -337,6 +337,17 @@ public: __forceinline int error() const { return m_errorCode; } }; +struct FacebookUser +{ + FacebookUser(__int64 _p1, MCONTACT _p2) : + id(_p1), + hContact(_p2) + {} + + __int64 id; + MCONTACT hContact; +}; + class FacebookProto : public PROTO<FacebookProto> { uint8_t *doZip(size_t cbData, const void *pData, size_t &cbRes); @@ -347,8 +358,7 @@ class FacebookProto : public PROTO<FacebookProto> NETLIBHTTPREQUEST *ExecuteRequest(AsyncHttpRequest *pReq); // MQTT functions - bool MqttConnect(); - void MqttOpen(); + void MqttLogin(); void MqttPing(); void MqttPublish(const char *topic, const char *value); @@ -376,9 +386,18 @@ class FacebookProto : public PROTO<FacebookProto> CMStringA m_szAuthToken; // calculated + OBJLIST<FacebookUser> m_users; + FacebookUser *FindUser(__int64 id) + { + return m_users.find((FacebookUser *)&id); + } + void OnLoggedIn(); void OnLoggedOut(); + bool RefreshToken(); + bool RefreshContacts(); + void __cdecl ServerThread(void *); public: |