diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-24 14:56:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-24 14:56:33 +0000 |
commit | 2f28d4cb509676a01cca5c18823309293faefef3 (patch) | |
tree | e7d636d2e387334a42eca7437b5b7acdc5611837 /protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | |
parent | 0bcb3eb5504e5614c0a499269f0c8ea7e5b58127 (diff) |
ok, wassup lib is not dependent on Miranda again
git-svn-id: http://svn.miranda-ng.org/main/trunk@5121 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp index d1b4bf6a80..d5440d16f8 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -5,13 +5,14 @@ * Author: Antonio
*/
-#include "../common.h"
#include "WAConnection.h"
#include "ProtocolTreeNode.h"
#include <map>
#include <vector>
#include "utilities.h"
+std::string base64_encode(void*, size_t);
+
const char* WAConnection::dictionary[] = {
"",
"",
@@ -1156,7 +1157,7 @@ void WAConnection::parseMessageInitialTagAlreadyChecked(ProtocolTreeNode* messag data = childNode->getDataAsString();
} else {
_LOGDATA("Media data encoding type '%s'", (encoding == NULL? "text":encoding->c_str()));
- data = (childNode->data == NULL? NULL : new std::string(mir_base64_encode((BYTE*)childNode->data->data(), (unsigned)childNode->data->size())));
+ data = (childNode->data == NULL? NULL : new std::string(base64_encode(childNode->data->data(), childNode->data->size())));
}
fmessage->data = (data == NULL? "": *data);
if (data != NULL)
@@ -1591,7 +1592,7 @@ std::string WAConnection::removeResourceFromJid(const std::string& jid) { }
void WAConnection::sendStatusUpdate(std::string& status) throw (WAException) {
- std::string id = this->makeId(Utilities::intToStr(time(NULL)));
+ std::string id = this->makeId(Utilities::intToStr((int)time(NULL)));
FMessage* message = new FMessage(new Key("s.us", true, id));
ProtocolTreeNode* body = new ProtocolTreeNode("body", NULL, new std::vector<unsigned char>(status.begin(), status.end()), NULL);
ProtocolTreeNode* messageNode = getMessageNode(message, body);
|