summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-07 19:47:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-07 19:47:13 +0000
commit097c52ad9a2928422084bf76cebee58958341574 (patch)
tree26d6b11e9738fc4e854f68c0ff04eaadf7d849e8 /protocols/FacebookRM
parentf096b29abb03618ec609ba4acaedaed43eec1fea (diff)
end of the old database macroses
git-svn-id: http://svn.miranda-ng.org/main/trunk@4373 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/communication.cpp4
-rw-r--r--protocols/FacebookRM/src/contacts.cpp4
-rw-r--r--protocols/FacebookRM/src/db.h4
-rw-r--r--protocols/FacebookRM/src/process.cpp16
4 files changed, 14 insertions, 14 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index d6dbd885d2..8e3897e2d6 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -782,8 +782,8 @@ bool facebook_client::home( )
// Get real_name
this->self_.real_name = utils::text::source_get_value( &resp.data, 2, "<strong class=\"profileName\">", "</strong>" );
if (!this->self_.real_name.empty()) {
- DBWriteContactSettingUTF8String(NULL, parent->m_szModuleName, FACEBOOK_KEY_NAME, this->self_.real_name.c_str());
- DBWriteContactSettingUTF8String(NULL, parent->m_szModuleName, FACEBOOK_KEY_NICK, this->self_.real_name.c_str());
+ db_set_utf(NULL, parent->m_szModuleName, FACEBOOK_KEY_NAME, this->self_.real_name.c_str());
+ db_set_utf(NULL, parent->m_szModuleName, FACEBOOK_KEY_NICK, this->self_.real_name.c_str());
parent->Log(" Got self real name: %s", this->self_.real_name.c_str());
} else {
client_notify(TranslateT("Something happened to Facebook. Maybe there was some major update so you should wait for an update."));
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index c54060a049..abea7b8f49 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -120,8 +120,8 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, BYTE type, bool dont_
if (strlen(new_name) > 0)
{
- DBWriteContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, new_name);
- DBWriteContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NICK, new_name);
+ db_set_utf(hContact, m_szModuleName, FACEBOOK_KEY_NAME, new_name);
+ db_set_utf(hContact, m_szModuleName, FACEBOOK_KEY_NICK, new_name);
}
db_set_b(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, type);
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h
index f7a3a560f3..1d309b1160 100644
--- a/protocols/FacebookRM/src/db.h
+++ b/protocols/FacebookRM/src/db.h
@@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define setString( setting, value ) db_set_s( NULL, m_szModuleName, setting, value )
#define getTString( setting, dest ) db_get_ts( NULL, m_szModuleName, setting, dest )
#define setTString( setting, value ) db_set_ts( NULL, m_szModuleName, setting, value )
-#define getU8String( setting, dest ) DBGetContactSettingUTF8String( NULL, m_szModuleName, setting, dest )
-#define setU8String( setting, value ) DBWriteContactSettingUTF8String( NULL, m_szModuleName, setting, value )
+#define getU8String( setting, dest ) db_get_utf( NULL, m_szModuleName, setting, dest )
+#define setU8String( setting, value ) db_set_utf( NULL, m_szModuleName, setting, value )
#define deleteSetting( setting ) db_unset( NULL, m_szModuleName, setting )
// DB keys
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index c1e4dcea1f..c362be15eb 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -97,8 +97,8 @@ void FacebookProto::ProcessBuddyList( void* data )
fbu->handle = AddToContactList(fbu, FACEBOOK_CONTACT_FRIEND);
if (!fbu->real_name.empty()) {
- DBWriteContactSettingUTF8String(fbu->handle,m_szModuleName,FACEBOOK_KEY_NAME,fbu->real_name.c_str());
- DBWriteContactSettingUTF8String(fbu->handle,m_szModuleName,FACEBOOK_KEY_NICK,fbu->real_name.c_str());
+ db_set_utf(fbu->handle,m_szModuleName,FACEBOOK_KEY_NAME,fbu->real_name.c_str());
+ db_set_utf(fbu->handle,m_szModuleName,FACEBOOK_KEY_NICK,fbu->real_name.c_str());
}
}
@@ -189,15 +189,15 @@ void FacebookProto::ProcessFriendList( void* data )
db_set_b(hContact, m_szModuleName, "Gender", fbu->gender);
// Update real name
- if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv))
+ if ( !db_get_utf(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv))
{
update_required = strcmp( dbv.pszVal, fbu->real_name.c_str()) != 0;
db_free(&dbv);
}
if ( update_required )
{
- DBWriteContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, fbu->real_name.c_str());
- DBWriteContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NICK, fbu->real_name.c_str());
+ db_set_utf(hContact, m_szModuleName, FACEBOOK_KEY_NAME, fbu->real_name.c_str());
+ db_set_utf(hContact, m_szModuleName, FACEBOOK_KEY_NICK, fbu->real_name.c_str());
}
if (db_get_b(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, 0) != FACEBOOK_CONTACT_FRIEND) {
@@ -235,7 +235,7 @@ void FacebookProto::ProcessFriendList( void* data )
db_set_b(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, FACEBOOK_CONTACT_NONE);
std::string contactname = id;
- if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv)) {
+ if ( !db_get_utf(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv)) {
contactname = dbv.pszVal;
db_free(&dbv);
}
@@ -260,8 +260,8 @@ void FacebookProto::ProcessFriendList( void* data )
HANDLE hContact = AddToContactList(fbu, FACEBOOK_CONTACT_FRIEND, true); // This contact is surely new
db_set_b(hContact, m_szModuleName, "Gender", fbu->gender );
- DBWriteContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, fbu->real_name.c_str());
- DBWriteContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NICK, fbu->real_name.c_str());
+ db_set_utf(hContact, m_szModuleName, FACEBOOK_KEY_NAME, fbu->real_name.c_str());
+ db_set_utf(hContact, m_szModuleName, FACEBOOK_KEY_NICK, fbu->real_name.c_str());
db_set_s(hContact, m_szModuleName, FACEBOOK_KEY_AV_URL, fbu->image_url.c_str());
// db_set_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE );
}