diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-10 20:20:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-10 20:20:46 +0000 |
commit | b7639142c91c6fa38285fdc6de661a0b36d41fbe (patch) | |
tree | 99136618352c2030d72008cb027040869d08770b /protocols/FacebookRM/src/json.cpp | |
parent | bfad803f0247a7395ed67eb04c190b3dfa511b0c (diff) |
protocol DB helpers for Facebook
git-svn-id: http://svn.miranda-ng.org/main/trunk@5316 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 426e867475..32909c95b4 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -344,7 +344,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = proto->m_szModuleName;
- bool local_time = db_get_b(NULL, proto->m_szModuleName, FACEBOOK_KEY_LOCAL_TIMESTAMP, 0) != 0;
+ bool local_time = proto->getByte(FACEBOOK_KEY_LOCAL_TIMESTAMP, 0) != 0;
dbei.timestamp = local_time ? ::time(NULL) : utils::time::fix_timestamp(time_sent.Value());
dbei.cbBlob = (DWORD)message_text.length() + 1;
@@ -469,7 +469,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa }
else if (type.Value() == "notification_json") // event notification
{
- if (!db_get_b(NULL, proto->m_szModuleName, FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE))
+ if (!proto->getByte(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE))
continue;
const Array& notificationsArray = objMember["nodes"];
@@ -510,8 +510,8 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa HANDLE hContact = proto->AddToContactList(&fbu, CONTACT_FRIEND);
- if (db_get_w(hContact, proto->m_szModuleName, "Status", 0) == ID_STATUS_OFFLINE)
- db_set_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_ONLINE);
+ if (proto->getWord(hContact, "Status", 0) == ID_STATUS_OFFLINE)
+ proto->setWord(hContact, "Status", ID_STATUS_ONLINE);
const Number& state = objMember["st"];
if (state.Value() == 1)
|