diff options
author | George Hazan <george.hazan@gmail.com> | 2015-09-02 18:01:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-09-02 18:01:59 +0000 |
commit | b32bd0a340de47fda10fbca63c6cf664327533cf (patch) | |
tree | 1c3db0932c046d02232a58394ec420837adc51f1 /protocols/WhatsApp/src/WhatsAPI++/WAConnection.h | |
parent | dd0979e4c86c5e9ee51a6b659464aa9bfd28ec2a (diff) |
WhatsApp:
- added ability to send media files (patch by Cassio);
- fix for wrongly sent acks (patch by Cassio);
- project files cleaned up;
- version bump;
git-svn-id: http://svn.miranda-ng.org/main/trunk@15154 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.h')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h index 03637b8c3a..a1a366c13e 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h @@ -20,6 +20,7 @@ #include "utilities.h"
#include "BinTreeNodeReader.h"
#include "BinTreeNodeWriter.h"
+#include "MediaUploader.h"
#pragma warning(disable : 4290)
@@ -314,6 +315,19 @@ class WAConnection }
};
+ class MediaUploadResponseHandler : public IqResultHandler {
+ private:
+ FMessage message;
+ public:
+ MediaUploadResponseHandler(WAConnection* con, const FMessage &message) :IqResultHandler(con) { this->message = message; }
+ virtual void parse(ProtocolTreeNode* node, const std::string &from) throw (WAException) {
+ this->con->processUploadResponse(node, &message);
+ }
+ void error(ProtocolTreeNode* node) throw (WAException) {
+ con->logData("Error on Media Upload Request: %s", node->toString().c_str());
+ }
+ };
+
friend class WALogin;
private:
@@ -335,6 +349,8 @@ private: void parseReceipt(ProtocolTreeNode *node) throw (WAException);
std::map<string, string> parseCategories(ProtocolTreeNode* node) throw(WAException);
+ void processUploadResponse(ProtocolTreeNode *node, FMessage *message);
+
void sendMessageWithMedia(FMessage* message) throw(WAException);
void sendMessageWithBody(FMessage* message) throw(WAException);
ProtocolTreeNode* getReceiptAck(const std::string &to, const std::string &id, const std::string &receiptType) throw(WAException);
@@ -381,6 +397,7 @@ public: bool read() throw(WAException);
+ 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);
|