From 2f28d4cb509676a01cca5c18823309293faefef3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Jun 2013 14:56:33 +0000 Subject: 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 --- protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp') 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 #include #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(status.begin(), status.end()), NULL); ProtocolTreeNode* messageNode = getMessageNode(message, body); -- cgit v1.2.3