summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp1
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp1
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/ByteArray.cpp1
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp1
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.cpp1
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp7
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp1
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/utilities.cpp2
8 files changed, 4 insertions, 11 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp
index 0cb8dd512b..866a94e702 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp
@@ -5,7 +5,6 @@
* Author: Antonio
*/
-#include "../common.h"
#include "BinTreeNodeReader.h"
#include "WAException.h"
#include "ProtocolTreeNode.h"
diff --git a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp
index 63428f7821..2c244d53b7 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp
@@ -5,7 +5,6 @@
* Author: Antonio
*/
-#include "../common.h"
#include "BinTreeNodeWriter.h"
#include <cstring>
#include "utilities.h"
diff --git a/protocols/WhatsApp/src/WhatsAPI++/ByteArray.cpp b/protocols/WhatsApp/src/WhatsAPI++/ByteArray.cpp
index 5c7d16042e..c9117bcfee 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/ByteArray.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/ByteArray.cpp
@@ -5,7 +5,6 @@
* Author: Antonio
*/
-#include "../common.h"
#include "ByteArray.h"
#include "WAException.h"
#include <iostream>
diff --git a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp
index 03015e8e11..b8586eb538 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp
@@ -5,7 +5,6 @@
* Author: Antonio
*/
-#include "../common.h"
#include <ctime>
#include <stdlib.h>
#include <algorithm>
diff --git a/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.cpp b/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.cpp
index c3c75cbd3e..be6a658acb 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.cpp
@@ -5,7 +5,6 @@
* Author: Antonio
*/
-#include "../common.h"
#include "WAException.h"
#include "ProtocolTreeNode.h"
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);
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp b/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp
index 0a351300a9..37d5fe0378 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp
@@ -5,7 +5,6 @@
* Author: Antonio
*/
-#include "../common.h"
#include "WALogin.h"
#include "ByteArray.h"
//#include "ApplicationData.h"
diff --git a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
index ca87822a74..90d03dbdaa 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
@@ -1,5 +1,3 @@
-
-#include "../common.h"
#include "utilities.h"
//#include "ApplicationData.h"
#include <iostream>