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 | |
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')
-rw-r--r-- | protocols/WhatsApp/WhatsApp_10.vcxproj | 24 | ||||
-rw-r--r-- | protocols/WhatsApp/WhatsApp_11.vcxproj | 24 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/ByteArray.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/ProtocolTreeNode.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 7 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WALogin.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/utilities.cpp | 2 | ||||
-rw-r--r-- | protocols/WhatsApp/src/connection.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 5 |
12 files changed, 25 insertions, 44 deletions
diff --git a/protocols/WhatsApp/WhatsApp_10.vcxproj b/protocols/WhatsApp/WhatsApp_10.vcxproj index 5d13b43b65..23e97e67b3 100644 --- a/protocols/WhatsApp/WhatsApp_10.vcxproj +++ b/protocols/WhatsApp/WhatsApp_10.vcxproj @@ -213,36 +213,28 @@ <ClCompile Include="src\utils.cpp" />
<ClCompile Include="src\WASocketConnection.cpp" />
<ClCompile Include="src\WhatsAPI++\BinTreeNodeReader.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\BinTreeNodeWriter.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\ByteArray.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\FMessage.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\ProtocolTreeNode.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\utilities.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\WAConnection.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\WALogin.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
diff --git a/protocols/WhatsApp/WhatsApp_11.vcxproj b/protocols/WhatsApp/WhatsApp_11.vcxproj index a6ee270054..a6b9560291 100644 --- a/protocols/WhatsApp/WhatsApp_11.vcxproj +++ b/protocols/WhatsApp/WhatsApp_11.vcxproj @@ -212,36 +212,28 @@ <ClCompile Include="src\utils.cpp" />
<ClCompile Include="src\WASocketConnection.cpp" />
<ClCompile Include="src\WhatsAPI++\BinTreeNodeReader.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\BinTreeNodeWriter.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\ByteArray.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\FMessage.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\ProtocolTreeNode.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\utilities.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\WAConnection.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\WhatsAPI++\WALogin.cpp">
- <PrecompiledHeaderFile>../common.h</PrecompiledHeaderFile>
- <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
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>
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp index e5cb3b034f..6288d74ad9 100644 --- a/protocols/WhatsApp/src/connection.cpp +++ b/protocols/WhatsApp/src/connection.cpp @@ -142,7 +142,6 @@ void WhatsAppProto::stayConnectedLoop(void*) ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) ID_STATUS_OFFLINE, m_iStatus);
CODE_BLOCK_TRY
-
unsigned passLen;
ptrA passBin((char*)mir_base64_decode(pass.c_str(), &passLen));
std::string password(passBin, passLen);
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index 8444cdd6f1..b78ef7f3b5 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -112,3 +112,8 @@ BYTE* utils::md5string(const BYTE *data, int size, BYTE *digest) mir_md5_finish(&md5_state, digest);
return digest;
}
+
+std::string base64_encode(void* pData, size_t len)
+{
+ return (char*)ptrA( mir_base64_encode((BYTE*)pData, (unsigned)len));
+}
\ No newline at end of file |