diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-13 14:32:53 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-13 14:32:53 +0000 |
commit | cf0be00671d56bb18118e1491e7c1f0e131e7b3d (patch) | |
tree | 407d1760615f4cf22a4e664f242ae045a4cf8408 /protocols/WhatsApp/src/WhatsAPI++/WAConnection.h | |
parent | 6f20ee4beb6b840ed81489358bca01ed41a0ea56 (diff) |
Patch by Cassio:
Another patch, which fixes last seen timestamps/presence due to a change in WA protocol:
There is no longer a last seen request/response as this info is now received within the presence response.
git-svn-id: http://svn.miranda-ng.org/main/trunk@15345 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.h')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h index a1a366c13e..5b6970df60 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h @@ -36,9 +36,8 @@ public: virtual void onMessageError(const FMessage &message, int paramInt) = 0;
virtual void onPing(const std::string ¶mString) throw (WAException) = 0;
virtual void onPingResponseReceived() = 0;
- virtual void onAvailable(const std::string ¶mString, bool paramBoolean) = 0;
+ virtual void onAvailable(const std::string ¶mString, bool paramBoolean, int lastSeenTime = -1) = 0;
virtual void onClientConfigReceived(const std::string ¶mString) = 0;
- virtual void onLastSeen(const std::string ¶mString1, int paramInt, const string ¶mString2) = 0;
virtual void onIsTyping(const std::string ¶mString, bool paramBoolean) = 0;
virtual void onAccountChange(int paramInt, time_t paramLong) = 0;
virtual void onPrivacyBlockListAdd(const std::string ¶mString) = 0;
@@ -219,20 +218,6 @@ class WAConnection }
};
- class IqResultQueryLastOnlineHandler: public IqResultHandler {
- public:
- IqResultQueryLastOnlineHandler(WAConnection* con):IqResultHandler(con) {}
- virtual void parse(ProtocolTreeNode* node, const std::string &from) throw (WAException) {
- ProtocolTreeNode* firstChild = node->getChild(0);
- ProtocolTreeNode::require(firstChild, "query");
- const string &seconds = firstChild->getAttributeValue("seconds");
- const string &status = firstChild->getDataAsString();
- if (!seconds.empty() && !from.empty())
- if (this->con->m_pEventHandler != NULL)
- this->con->m_pEventHandler->onLastSeen(from, atoi(seconds.c_str()), status);
- }
- };
-
class IqResultGetPhotoHandler: public IqResultHandler {
private:
std::string jid;
@@ -399,7 +384,6 @@ public: void sendAck(ProtocolTreeNode * node, const char *classType);
void sendPing() throw(WAException);
- void sendQueryLastOnline(const std::string &jid) throw (WAException);
void sendPong(const std::string &id) throw(WAException);
void sendComposing(const std::string &to) throw(WAException);
void sendActive() throw(WAException);
|