summaryrefslogtreecommitdiff
path: root/protocols/GTalkExt/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/GTalkExt/src')
-rw-r--r--protocols/GTalkExt/src/handlers.cpp2
-rw-r--r--protocols/GTalkExt/src/inbox.cpp4
-rw-r--r--protocols/GTalkExt/src/notifications.cpp10
-rw-r--r--protocols/GTalkExt/src/options.cpp8
-rw-r--r--protocols/GTalkExt/src/tipper_items.cpp20
5 files changed, 22 insertions, 22 deletions
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp
index e1dd02b925..fecfe82523 100644
--- a/protocols/GTalkExt/src/handlers.cpp
+++ b/protocols/GTalkExt/src/handlers.cpp
@@ -360,7 +360,7 @@ IJabberInterface* IsGoogleAccount(LPCSTR szModuleName)
if (!japi) return NULL;
DBVARIANT dbv;
- if ( DBGetContactSettingString(NULL, szModuleName, "ManualHost", &dbv))
+ if ( db_get_s(NULL, szModuleName, "ManualHost", &dbv))
return NULL;
bool res = !strcmp(dbv.pszVal, "talk.google.com");
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp
index bb699e365c..d325a90819 100644
--- a/protocols/GTalkExt/src/inbox.cpp
+++ b/protocols/GTalkExt/src/inbox.cpp
@@ -241,7 +241,7 @@ void OpenUrl(LPCSTR acc, LPCTSTR mailbox, LPCTSTR url)
void OpenContactInbox(LPCSTR acc)
{
DBVARIANT dbv;
- if ( DBGetContactSettingTString(0, acc, "jid", &dbv))
+ if ( db_get_ts(0, acc, "jid", &dbv))
return;
LPTSTR host = _tcschr(dbv.ptszVal, '@');
@@ -256,5 +256,5 @@ void OpenContactInbox(LPCSTR acc)
mir_sntprintf(buf, SIZEOF(buf), INBOX_URL_FORMAT, _T(""), _T("mail")); // common
OpenUrl(acc, dbv.ptszVal, buf);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp
index 995848e0e4..343112cca9 100644
--- a/protocols/GTalkExt/src/notifications.cpp
+++ b/protocols/GTalkExt/src/notifications.cpp
@@ -53,12 +53,12 @@ LPCSTR GetJidAcc(LPCTSTR jid)
DBVARIANT dbv;
for (int i=0; i < count; i++)
if (getJabberApi(protos[i]->szModuleName))
- if (!DBGetContactSettingTString(0, protos[i]->szModuleName, "jid", &dbv))
+ if (!db_get_ts(0, protos[i]->szModuleName, "jid", &dbv))
__try {
if (!lstrcmpi(jid, dbv.ptszVal)) return protos[i]->szModuleName;
}
__finally {
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
return NULL;
@@ -144,9 +144,9 @@ void ShowNotification(LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LP
extern HICON g_hPopupIcon;
data->lchIcon = g_hPopupIcon;
- data->iSeconds = (int)DBGetContactSettingDword(0, SHORT_PLUGIN_NAME, TIMEOUT_SETTING, 0);
- data->colorBack = (COLORREF)DBGetContactSettingDword(0, SHORT_PLUGIN_NAME, BACK_COLOR_SETTING, 0);
- data->colorText = (COLORREF)DBGetContactSettingDword(0, SHORT_PLUGIN_NAME, TEXT_COLOR_SETTING, 0);
+ data->iSeconds = (int)db_get_dw(0, SHORT_PLUGIN_NAME, TIMEOUT_SETTING, 0);
+ data->colorBack = (COLORREF)db_get_dw(0, SHORT_PLUGIN_NAME, BACK_COLOR_SETTING, 0);
+ data->colorText = (COLORREF)db_get_dw(0, SHORT_PLUGIN_NAME, TEXT_COLOR_SETTING, 0);
if (data->colorBack == data->colorText) {
data->colorBack = 0;
data->colorText = 0;
diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp
index 37191383f8..1d2fb700d3 100644
--- a/protocols/GTalkExt/src/options.cpp
+++ b/protocols/GTalkExt/src/options.cpp
@@ -66,7 +66,7 @@ BOOL ReadCheckbox(HWND wnd, int id, DWORD controls)
DWORD ReadCheckboxes(HWND wnd, LPCSTR mod)
{
- DWORD controls = DBGetContactSettingDword(0, NOTIFY_SETTINGS_FROM_MOD_NAME, mod, 0);
+ DWORD controls = db_get_dw(0, NOTIFY_SETTINGS_FROM_MOD_NAME, mod, 0);
ReadCheckbox(wnd, IDC_POPUPSENABLED, controls);
ReadCheckbox(wnd, IDC_POPUPSINFULLSCREEN, controls);
ReadCheckbox(wnd, IDC_AUTHONMAILBOX, controls);
@@ -171,13 +171,13 @@ INT_PTR CALLBACK PopupsOptionsDlgProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM
case WM_INITDIALOG:
TranslateDialogDefault(wnd);
SendMessage(GetDlgItem(wnd, IDC_BACKCOLORPICKER), CPM_SETCOLOUR, 0,
- (LPARAM)DBGetContactSettingDword(0, SHORT_PLUGIN_NAME, BACK_COLOR_SETTING, 0));
+ (LPARAM)db_get_dw(0, SHORT_PLUGIN_NAME, BACK_COLOR_SETTING, 0));
SendMessage(GetDlgItem(wnd, IDC_TEXTCOLORPICKER), CPM_SETCOLOUR, 0,
- (LPARAM)DBGetContactSettingDword(0, SHORT_PLUGIN_NAME, TEXT_COLOR_SETTING, 0));
+ (LPARAM)db_get_dw(0, SHORT_PLUGIN_NAME, TEXT_COLOR_SETTING, 0));
{
LPTSTR timeout = (LPTSTR)malloc(11 * sizeof(TCHAR));
__try {
- wsprintf(timeout, _T("%d"), DBGetContactSettingDword(0, SHORT_PLUGIN_NAME, TIMEOUT_SETTING, 0));
+ wsprintf(timeout, _T("%d"), db_get_dw(0, SHORT_PLUGIN_NAME, TIMEOUT_SETTING, 0));
SendMessage(GetDlgItem(wnd, IDC_TIMEOUTEDIT), WM_SETTEXT, 0, (LPARAM)timeout);
}
__finally {
diff --git a/protocols/GTalkExt/src/tipper_items.cpp b/protocols/GTalkExt/src/tipper_items.cpp
index cacdf5878e..8acb72ce60 100644
--- a/protocols/GTalkExt/src/tipper_items.cpp
+++ b/protocols/GTalkExt/src/tipper_items.cpp
@@ -57,7 +57,7 @@ void ShiftTipperSettings(LPSTR buff, int count, LPSTR format)
if (CallService(MS_DB_CONTACT_GETSETTING, 0, (LPARAM)&cgs)) break;
__try {
if (DBVT_ASCIIZ == cws.value.type) {
- DBFreeVariant(&cws.value);
+ db_free(&cws.value);
cws.value.type = DBVT_WCHAR;
if (CallService(MS_DB_CONTACT_GETSETTING_STR, 0, (LPARAM)&cgs)) break;
}
@@ -70,7 +70,7 @@ void ShiftTipperSettings(LPSTR buff, int count, LPSTR format)
CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&cws);
}
__finally {
- DBFreeVariant(&cws.value);
+ db_free(&cws.value);
}
}
}
@@ -80,10 +80,10 @@ void SetLabelProp(int index, LPSTR setting)
sprintf(setting, LABEL_SETTING_PROP, index);
DBVARIANT dbv1 = {0};
- if (!DBGetContactSettingTString(0, TIPPER_ITEMS_MOD_NAME, setting, &dbv1))
+ if (!db_get_ts(0, TIPPER_ITEMS_MOD_NAME, setting, &dbv1))
__try {
DBVARIANT dbv2 = {0};
- if (!DBGetContactSettingTString(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING, &dbv2))
+ if (!db_get_ts(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING, &dbv2))
__try {
if (!lstrcmp(dbv1.ptszVal, dbv2.ptszVal)) {
LPTSTR label = TranslateTS(UNREAD_THREADS_LABEL);
@@ -92,17 +92,17 @@ void SetLabelProp(int index, LPSTR setting)
}
}
__finally {
- DBFreeVariant(&dbv2);
+ db_free(&dbv2);
}
}
__finally {
- DBFreeVariant(&dbv1);
+ db_free(&dbv1);
}
}
void AddTipperItem()
{
- unsigned short itemCount = DBGetContactSettingWord(0, TIPPER_ITEMS_MOD_NAME,
+ unsigned short itemCount = db_get_w(0, TIPPER_ITEMS_MOD_NAME,
TIPPER_ITEM_COUNT_SETTING , unsigned short(-1));
if (unsigned short(-1) == itemCount) return;
@@ -116,7 +116,7 @@ void AddTipperItem()
sprintf(setting, VALUE_SETTING_PROP, i);
DBVARIANT dbv = {0};
- if (!DBGetContactSettingTString(0, TIPPER_ITEMS_MOD_NAME, setting, &dbv))
+ if (!db_get_ts(0, TIPPER_ITEMS_MOD_NAME, setting, &dbv))
__try {
if (!lstrcmp(UNREAD_THREADS_RAW, dbv.ptszVal)) {
SetLabelProp(i, setting);
@@ -124,7 +124,7 @@ void AddTipperItem()
}
}
__finally {
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -152,6 +152,6 @@ void AddTipperItem()
free(setting);
}
- DBWriteContactSettingWord(0, TIPPER_ITEMS_MOD_NAME,
+ db_set_w(0, TIPPER_ITEMS_MOD_NAME,
TIPPER_ITEM_COUNT_SETTING, itemCount + 1);
} \ No newline at end of file