diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-10 20:28:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-10 20:28:08 +0000 |
commit | 2bb421f6b7b7ded13f6240259e81ab81d47e663b (patch) | |
tree | aad40e7409814c5ad30509b7f810f6fd3e0dce72 /protocols/WhatsApp/src/connection.cpp | |
parent | 2b55a49b73ec41e782cd213d24d7ede6c62ade92 (diff) |
protocol DB helpers for Wassup
git-svn-id: http://svn.miranda-ng.org/main/trunk@5321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/connection.cpp')
-rw-r--r-- | protocols/WhatsApp/src/connection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp index 6288d74ad9..edd04248df 100644 --- a/protocols/WhatsApp/src/connection.cpp +++ b/protocols/WhatsApp/src/connection.cpp @@ -44,7 +44,7 @@ void WhatsAppProto::stayConnectedLoop(void*) std::string cc, in, pass;
DBVARIANT dbv = {0};
- if ( !db_get_s(NULL,m_szModuleName,WHATSAPP_KEY_CC,&dbv,DBVT_ASCIIZ))
+ if ( !getString(WHATSAPP_KEY_CC, &dbv))
{
cc = dbv.pszVal;
db_free(&dbv);
@@ -57,7 +57,7 @@ void WhatsAppProto::stayConnectedLoop(void*) }
error = true;
- if ( !db_get_s(NULL,m_szModuleName,WHATSAPP_KEY_LOGIN,&dbv,DBVT_ASCIIZ))
+ if ( !getString(WHATSAPP_KEY_LOGIN, &dbv))
{
in = dbv.pszVal;
db_free(&dbv);
@@ -72,7 +72,7 @@ void WhatsAppProto::stayConnectedLoop(void*) this->jid = this->phoneNumber + "@s.whatsapp.net";
error = true;
- if ( !db_get_s(NULL, m_szModuleName, WHATSAPP_KEY_NICK, &dbv, DBVT_ASCIIZ))
+ if ( !getString(WHATSAPP_KEY_NICK, &dbv))
{
this->nick = dbv.pszVal;
db_free(&dbv);
@@ -85,7 +85,7 @@ void WhatsAppProto::stayConnectedLoop(void*) }
error = true;
- if ( !db_get_s(NULL,m_szModuleName,WHATSAPP_KEY_PASS,&dbv, DBVT_ASCIIZ))
+ if ( !getString(WHATSAPP_KEY_PASS, &dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -145,7 +145,7 @@ void WhatsAppProto::stayConnectedLoop(void*) unsigned passLen;
ptrA passBin((char*)mir_base64_decode(pass.c_str(), &passLen));
std::string password(passBin, passLen);
- BYTE UseSSL = db_get_b(NULL, this->ModuleName(), WHATSAPP_KEY_SSL, 0);
+ BYTE UseSSL = getByte(WHATSAPP_KEY_SSL, 0);
if (UseSSL) {
this->conn = new WASocketConnection("c.whatsapp.net", 443);
|