summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-10 20:28:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-10 20:28:08 +0000
commit2bb421f6b7b7ded13f6240259e81ab81d47e663b (patch)
treeaad40e7409814c5ad30509b7f810f6fd3e0dce72 /protocols/WhatsApp/src/proto.cpp
parent2b55a49b73ec41e782cd213d24d7ede6c62ade92 (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/proto.cpp')
-rw-r--r--protocols/WhatsApp/src/proto.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index 5a6cab3f85..5c2ffad18f 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -112,7 +112,7 @@ int WhatsAppProto::SetStatus( int new_status )
case ID_STATUS_IDLE:
default:
m_iDesiredStatus = ID_STATUS_INVISIBLE;
- if (db_get_b(NULL, m_szModuleName, WHATSAPP_KEY_MAP_STATUSES, DEFAULT_MAP_STATUSES))
+ if (getByte(WHATSAPP_KEY_MAP_STATUSES, DEFAULT_MAP_STATUSES))
break;
case ID_STATUS_ONLINE:
case ID_STATUS_FREECHAT:
@@ -183,7 +183,7 @@ string WhatsAppProto::Register(int state, string cc, string number, string code)
return ret;
}
- if ( !db_get_s(NULL,m_szModuleName,WHATSAPP_KEY_IDX,&dbv,DBVT_ASCIIZ))
+ if ( !getString(WHATSAPP_KEY_IDX, &dbv))
{
idx = dbv.pszVal;
db_free(&dbv);
@@ -196,7 +196,7 @@ string WhatsAppProto::Register(int state, string cc, string number, string code)
BYTE idxBuf[16];
utils::md5string(tm.str(), idxBuf);
idx = std::string((const char*) idxBuf, 16);
- db_set_s(0, m_szModuleName, WHATSAPP_KEY_IDX, idx.c_str());
+ setString(WHATSAPP_KEY_IDX, idx.c_str());
}
string url;
@@ -303,7 +303,7 @@ int WhatsAppProto::RequestFriendship(WPARAM wParam, LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
DBVARIANT dbv;
- if ( !db_get_s(hContact,m_szModuleName,WHATSAPP_KEY_ID,&dbv, DBVT_ASCIIZ))
+ if ( !getString(hContact, WHATSAPP_KEY_ID, &dbv))
{
std::string id(dbv.pszVal);
this->connection->sendQueryLastOnline(id);