diff options
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_byte.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_db_utils.h | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_events.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_file.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_opt.cpp | 12 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_privacy.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_std.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_vcard.cpp | 22 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_xstatus.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/ui_utils.cpp | 2 |
16 files changed, 51 insertions, 51 deletions
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 2f795f0872..0ef10c220d 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -155,7 +155,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) if (m_options.BsProxyManual) {
proxyJid = NULL;
- if ( !DBGetContactSettingString(NULL, m_szModuleName, "BsProxyServer", &dbv)) {
+ if ( !db_get_s(NULL, m_szModuleName, "BsProxyServer", &dbv)) {
proxyJid = mir_a2t(dbv.pszVal);
db_free(&dbv);
}
@@ -199,7 +199,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) if (bDirect) {
if (m_options.BsDirectManual) {
- if ( !DBGetContactSettingString(NULL, m_szModuleName, "BsDirectAddr", &dbv))
+ if ( !db_get_s(NULL, m_szModuleName, "BsDirectAddr", &dbv))
localAddr = dbv.pszVal;
}
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 4182cccb23..36a4dbcf40 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -145,7 +145,7 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM* item) DBVARIANT dbv;
if (JABBER_LIST_ITEM* bookmark = ListGetItemPtr(LIST_BOOKMARK, item->jid))
if (bookmark->name) {
- if ( !DBGetContactSettingTString(hContact, "CList", "MyHandle", &dbv))
+ if ( !db_get_ts(hContact, "CList", "MyHandle", &dbv))
db_free(&dbv);
else
db_set_ts(hContact, "CList", "MyHandle", bookmark->name);
@@ -380,7 +380,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM* item, int code, HXML reason) CallServiceSync(MS_GC_EVENT, WINDOW_CLEARLOG, (LPARAM)&gce);
DBVARIANT dbvMessage;
- if ( !DBGetContactSettingTString(NULL, m_szModuleName, "GcMsgQuit", &dbvMessage)) {
+ if ( !db_get_ts(NULL, m_szModuleName, "GcMsgQuit", &dbvMessage)) {
szMessage = NEWTSTR_ALLOCA(dbvMessage.ptszVal);
db_free(&dbvMessage);
}
@@ -1079,7 +1079,7 @@ static void sttNickListHook(CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK* {
if (ppro->m_bJabberOnline) {
DBVARIANT dbv = {0};
- TCHAR *szMessage = DBGetContactSettingTString(NULL, ppro->m_szModuleName, "GcMsgSlap", &dbv) ?
+ TCHAR *szMessage = db_get_ts(NULL, ppro->m_szModuleName, "GcMsgSlap", &dbv) ?
NEWTSTR_ALLOCA(TranslateTS(JABBER_GC_MSG_SLAP)) : dbv.ptszVal;
TCHAR buf[256];
diff --git a/protocols/JabberG/src/jabber_db_utils.h b/protocols/JabberG/src/jabber_db_utils.h index d5a74d22b0..9695fe2380 100644 --- a/protocols/JabberG/src/jabber_db_utils.h +++ b/protocols/JabberG/src/jabber_db_utils.h @@ -143,7 +143,7 @@ public: {
CMString result;
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, m_proto->m_szModuleName, m_szSetting, &dbv))
+ if ( !db_get_ts(NULL, m_proto->m_szModuleName, m_szSetting, &dbv))
{
result = dbv.ptszVal;
db_free(&dbv);
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 4baa572ed0..cfd0bdc946 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -96,7 +96,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING* cws, HANDLE hCon return;
TCHAR* nick;
- if ( !DBGetContactSettingTString(hContact, "CList", "MyHandle", &dbv)) {
+ if ( !db_get_ts(hContact, "CList", "MyHandle", &dbv)) {
nick = mir_tstrdup(dbv.ptszVal);
db_free(&dbv);
}
@@ -164,7 +164,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING* cws, HANDL TCHAR *nick;
Log("Add %S permanently to list", jid.pszVal);
- if ( !DBGetContactSettingTString(hContact, "CList", "MyHandle", &dbv)) {
+ if ( !db_get_ts(hContact, "CList", "MyHandle", &dbv)) {
nick = mir_tstrdup(dbv.ptszVal);
db_free(&dbv);
}
@@ -178,7 +178,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING* cws, HANDL return;
}
- if ( !DBGetContactSettingTString(hContact, "CList", "Group", &dbv)) {
+ if ( !db_get_ts(hContact, "CList", "Group", &dbv)) {
AddContactToRoster(jid.ptszVal, nick, dbv.ptszVal);
db_free(&dbv);
}
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 3a0c5cdb06..3ade62cdd2 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -307,7 +307,7 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) char *myAddr = NULL;
DBVARIANT dbv;
if (m_options.BsDirect && m_options.BsDirectManual) {
- if ( !DBGetContactSettingString(NULL, m_szModuleName, "BsDirectAddr", &dbv))
+ if ( !db_get_s(NULL, m_szModuleName, "BsDirectAddr", &dbv))
myAddr = dbv.pszVal;
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 56f181e658..9d3bb562cf 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -503,7 +503,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo* pInfo) // Don't set group again if already correct, or Miranda may show wrong group count in some case
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(hContact, "CList", "Group", &dbv)) {
+ if ( !db_get_ts(hContact, "CList", "Group", &dbv)) {
if (lstrcmp(dbv.ptszVal, item->group))
db_set_ts(hContact, "CList", "Group", item->group);
db_free(&dbv);
@@ -1116,7 +1116,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode) else {
char text[ 100 ];
sprintf(text, "e-mail%d", nEmail-1);
- if ( DBGetContactSettingString(hContact, m_szModuleName, text, &dbv)) break;
+ if ( db_get_s(hContact, m_szModuleName, text, &dbv)) break;
db_free(&dbv);
JDeleteSetting(hContact, text);
}
@@ -1127,7 +1127,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode) while (true) {
char text[ 100 ];
sprintf(text, "e-mail%d", nEmail);
- if ( DBGetContactSettingString(NULL, m_szModuleName, text, &dbv)) break;
+ if ( db_get_s(NULL, m_szModuleName, text, &dbv)) break;
db_free(&dbv);
JDeleteSetting(NULL, text);
sprintf(text, "e-mailFlag%d", nEmail);
@@ -1160,7 +1160,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode) while (true) {
char text[ 100 ];
sprintf(text, "Phone%d", nPhone);
- if ( DBGetContactSettingString(NULL, m_szModuleName, text, &dbv)) break;
+ if ( db_get_s(NULL, m_szModuleName, text, &dbv)) break;
db_free(&dbv);
JDeleteSetting(NULL, text);
sprintf(text, "PhoneFlag%d", nPhone);
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index f6f404c4e0..c0348c53a3 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -518,7 +518,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM) if (ListGetItemPtr(LIST_ROSTER, roomID) == NULL) {
TCHAR *nick = 0;
TCHAR *group = 0;
- if ( !DBGetContactSettingTString((HANDLE)wParam, "CList", "Group", &dbv)) {
+ if ( !db_get_ts((HANDLE)wParam, "CList", "Group", &dbv)) {
group = NEWTSTR_ALLOCA(dbv.ptszVal);
db_free(&dbv);
}
@@ -1065,10 +1065,10 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) DBVARIANT dbv;
BOOL bSupportTyping = FALSE;
- if ( !DBGetContactSetting(event->hContact, "SRMsg", "SupportTyping", &dbv)) {
+ if ( !db_get(event->hContact, "SRMsg", "SupportTyping", &dbv)) {
bSupportTyping = dbv.bVal == 1;
db_free(&dbv);
- } else if ( !DBGetContactSetting(NULL, "SRMsg", "DefaultTyping", &dbv)) {
+ } else if ( !db_get(NULL, "SRMsg", "DefaultTyping", &dbv)) {
bSupportTyping = dbv.bVal == 1;
db_free(&dbv);
}
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index da614d2e33..9e42b13f53 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -75,7 +75,7 @@ static void JabberContactListCreateClistGroup(TCHAR* groupName) for (i=0;;i++) {
_itoa(i, str, 10);
- if ( DBGetContactSettingTString(NULL, "CListGroups", str, &dbv))
+ if ( db_get_ts(NULL, "CListGroups", str, &dbv))
break;
TCHAR* name = dbv.ptszVal;
if (name[0]!='\0' && !_tcscmp(name+1, groupName)) {
@@ -299,8 +299,8 @@ void CJabberProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbL }
else {
DBVARIANT dbv1, dbv2;
- BOOL res1 = DBGetContactSettingString(NULL, m_szModuleName, "LoginName", &dbv1);
- BOOL res2 = DBGetContactSettingString(NULL, m_szModuleName, "LoginServer", &dbv2);
+ BOOL res1 = db_get_s(NULL, m_szModuleName, "LoginName", &dbv1);
+ BOOL res2 = db_get_s(NULL, m_szModuleName, "LoginServer", &dbv2);
mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S@%S avatar.%S"),
res1 ? "noname" : dbv1.pszVal,
res2 ? m_szModuleName : dbv2.pszVal,
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 64c09c4966..614baef47f 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -470,7 +470,7 @@ protected: if (GetComputerName(szCompName, &dwCompNameLength))
m_cbResource.AddString(szCompName);
- if ( !DBGetContactSettingTString(NULL, m_proto->m_szModuleName, "Resource", &dbv))
+ if ( !db_get_ts(NULL, m_proto->m_szModuleName, "Resource", &dbv))
{
if (CB_ERR == m_cbResource.FindString(dbv.ptszVal, -1, true))
m_cbResource.AddString(dbv.ptszVal);
@@ -1079,11 +1079,11 @@ void CJabberProto::_RosterHandleGetRequest(HXML node) TCHAR *name = NULL;
TCHAR *group = NULL;
DBVARIANT dbvtemp;
- if ( !DBGetContactSettingTString(hContact, "CList", "MyHandle", &dbvtemp)) {
+ if ( !db_get_ts(hContact, "CList", "MyHandle", &dbvtemp)) {
name = mir_tstrdup(dbvtemp.ptszVal);
db_free(&dbvtemp);
}
- if ( !DBGetContactSettingTString(hContact, "CList", "Group", &dbvtemp)) {
+ if ( !db_get_ts(hContact, "CList", "Group", &dbvtemp)) {
group = mir_tstrdup(dbvtemp.ptszVal);
db_free(&dbvtemp);
}
@@ -1702,7 +1702,7 @@ protected: if (GetComputerName(szCompName, &dwCompNameLength))
m_cbResource.AddString(szCompName);
- if ( !DBGetContactSettingTString(NULL, m_proto->m_szModuleName, "Resource", &dbv))
+ if ( !db_get_ts(NULL, m_proto->m_szModuleName, "Resource", &dbv))
{
if (CB_ERR == m_cbResource.FindString(dbv.ptszVal, -1, true))
m_cbResource.AddString(dbv.ptszVal);
@@ -1725,7 +1725,7 @@ protected: m_cbType.AddString(TranslateT("S.ms"), ACC_SMS);
m_cbServer.GetTextA(server, SIZEOF(server));
- if ( !DBGetContactSettingString(NULL, m_proto->m_szModuleName, "ManualHost", &dbv))
+ if ( !db_get_s(NULL, m_proto->m_szModuleName, "ManualHost", &dbv))
{
lstrcpynA(manualServer, dbv.pszVal, SIZEOF(manualServer));
db_free(&dbv);
@@ -1780,7 +1780,7 @@ protected: m_txtManualHost.Enable();
m_txtPort.Enable();
- if ( !DBGetContactSettingTString(NULL, m_proto->m_szModuleName, "ManualHost", &dbv))
+ if ( !db_get_ts(NULL, m_proto->m_szModuleName, "ManualHost", &dbv))
{
m_txtManualHost.SetText(dbv.ptszVal);
db_free(&dbv);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 4581325496..04289ee5d8 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -480,7 +480,7 @@ public: for (int i = 0; ; i++)
{
mir_snprintf(buf, 20, "%d", i);
- if ( DBGetContactSettingTString(NULL, "CListGroups", buf, &dbv))
+ if ( db_get_ts(NULL, "CListGroups", buf, &dbv))
break;
SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_ADDSTRING, 0, (LPARAM)&dbv.ptszVal[1]);
@@ -1382,7 +1382,7 @@ bool CJabberDlgPrivacyLists::CListIsGroup(HANDLE hGroup) _i64toa((INT_PTR)hGroup-1, idstr, 10);
DBVARIANT dbv;
- bool result = DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv) == 0;
+ bool result = db_get_ts(NULL, "CListGroups", idstr, &dbv) == 0;
if (result)
db_free(&dbv);
@@ -1400,7 +1400,7 @@ HANDLE CJabberDlgPrivacyLists::CListFindGroupByName(TCHAR *name) {
_itoa(i, idstr, 10);
- if ( DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if ( db_get_ts(NULL, "CListGroups", idstr, &dbv))
break;
if ( !_tcscmp(dbv.ptszVal + 1, name))
@@ -1607,7 +1607,7 @@ void CJabberDlgPrivacyLists::CListBuildList(HWND hwndList, CPrivacyList *pList) char idstr[33];
_itoa(iGroup-1, idstr, 10);
DBVARIANT dbv = {0};
- if ( DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if ( db_get_ts(NULL, "CListGroups", idstr, &dbv))
break;
hItem = m_clcClist.FindGroup((HANDLE)iGroup);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index b4083314e9..4986c7f401 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -195,7 +195,7 @@ CJabberProto::CJabberProto(const char* aProtoName, const TCHAR *aUserName) : }
else m_tszSelectedLang = mir_tstrdup(_T("en"));
- if ( !DBGetContactSettingString(NULL, m_szModuleName, "Password", &dbv)) {
+ if ( !db_get_s(NULL, m_szModuleName, "Password", &dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING, lstrlenA(dbv.pszVal) + 1, (LPARAM)dbv.pszVal);
TCHAR *pssw = mir_a2t(dbv.pszVal);
JSetStringCrypt(NULL, "LoginPassword", pssw);
diff --git a/protocols/JabberG/src/jabber_std.cpp b/protocols/JabberG/src/jabber_std.cpp index 9d4ae894fd..373c0681f7 100644 --- a/protocols/JabberG/src/jabber_std.cpp +++ b/protocols/JabberG/src/jabber_std.cpp @@ -110,12 +110,12 @@ int CJabberProto::JGetStaticString(const char* valueName, HANDLE hContact, char* int CJabberProto::JGetStringUtf(HANDLE hContact, char* valueName, DBVARIANT* dbv)
{
- return DBGetContactSettingStringUtf(hContact, m_szModuleName, valueName, dbv);
+ return db_get_utf(hContact, m_szModuleName, valueName, dbv);
}
int CJabberProto::JGetStringT(HANDLE hContact, char* valueName, DBVARIANT* dbv)
{
- return DBGetContactSettingTString(hContact, m_szModuleName, valueName, dbv);
+ return db_get_ts(hContact, m_szModuleName, valueName, dbv);
}
TCHAR *CJabberProto::JGetStringT(HANDLE hContact, char* valueName)
@@ -214,7 +214,7 @@ void __forceinline sttCryptString(char *str) TCHAR* CJabberProto::JGetStringCrypt(HANDLE hContact, char *valueName)
{
DBVARIANT dbv;
- if ( DBGetContactSettingString(hContact, m_szModuleName, valueName, &dbv))
+ if ( db_get_s(hContact, m_szModuleName, valueName, &dbv))
return NULL;
sttCryptString(dbv.pszVal);
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index e38dbf1c67..3660fbce04 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -259,7 +259,7 @@ void CJabberProto::ServerThread(ThreadData* info) info->auth = NULL;
if (m_options.ManualConnect == TRUE) {
- if ( !DBGetContactSettingString(NULL, m_szModuleName, "ManualHost", &dbv)) {
+ if ( !db_get_s(NULL, m_szModuleName, "ManualHost", &dbv)) {
strncpy(info->manualHost, dbv.pszVal, SIZEOF(info->manualHost));
info->manualHost[SIZEOF(info->manualHost)-1] = '\0';
db_free(&dbv);
@@ -315,7 +315,7 @@ LBL_FatalError: goto LBL_Exit;
}
- if ( !DBGetContactSettingString(NULL, m_szModuleName, "LoginServer", &dbv)) {
+ if ( !db_get_s(NULL, m_szModuleName, "LoginServer", &dbv)) {
strncpy(info->server, dbv.pszVal, SIZEOF(info->server)-1);
db_free(&dbv);
}
@@ -923,7 +923,7 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData* info) }
Log("Success: Logged-in.");
- if ( DBGetContactSettingString(NULL, m_szModuleName, "Nick", &dbv))
+ if ( db_get_s(NULL, m_szModuleName, "Nick", &dbv))
JSetStringT(NULL, "Nick", info->username);
else
db_free(&dbv);
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index ed7adff6f9..fd036db767 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -51,7 +51,7 @@ static void SetDialogField(CJabberProto* ppro, HWND hwndDlg, int nDlgItem, char* {
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, ppro->m_szModuleName, key, &dbv)) {
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, key, &dbv)) {
SetDlgItemText(hwndDlg, nDlgItem, (bTranslate) ? TranslateTS(dbv.ptszVal) : dbv.ptszVal);
db_free(&dbv);
}
@@ -566,7 +566,7 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowText(hwndDlg, TranslateT("Jabber vCard: Edit Email Address"));
wsprintfA(idstr, "e-mail%d", dat->id);
- if ( !DBGetContactSettingString(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) {
+ if ( !db_get_s(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_EMAIL, dbv.pszVal);
db_free(&dbv);
wsprintfA(idstr, "e-mailFlag%d", lParam);
@@ -590,7 +590,7 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (dat->id < 0) {
for (dat->id=0;;dat->id++) {
mir_snprintf(idstr, SIZEOF(idstr), "e-mail%d", dat->id);
- if ( DBGetContactSettingString(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) break;
+ if ( db_get_s(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) break;
db_free(&dbv);
} }
GetDlgItemText(hwndDlg, IDC_EMAIL, text, SIZEOF(text));
@@ -632,7 +632,7 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowText(hwndDlg, TranslateT("Jabber vCard: Edit Phone Number"));
wsprintfA(idstr, "Phone%d", dat->id);
- if ( !DBGetContactSettingString(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) {
+ if ( !db_get_s(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_PHONE, dbv.pszVal);
db_free(&dbv);
wsprintfA(idstr, "PhoneFlag%d", dat->id);
@@ -664,7 +664,7 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (dat->id < 0) {
for (dat->id=0;;dat->id++) {
wsprintfA(idstr, "Phone%d", dat->id);
- if ( DBGetContactSettingString(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) break;
+ if ( db_get_s(NULL, dat->ppro->m_szModuleName, idstr, &dbv)) break;
db_free(&dbv);
}
}
@@ -747,7 +747,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP lvi.iItem = 0;
for (i=0;;i++) {
wsprintfA(idstr, "e-mail%d", i);
- if ( DBGetContactSettingTString(NULL, ppro->m_szModuleName, idstr, &dbv)) break;
+ if ( db_get_ts(NULL, ppro->m_szModuleName, idstr, &dbv)) break;
wsprintf(number, _T("%d"), i+1);
lvi.pszText = number;
lvi.lParam = (LPARAM)i;
@@ -766,7 +766,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP lvi.iItem = 0;
for (i=0;;i++) {
wsprintfA(idstr, "Phone%d", i);
- if ( DBGetContactSettingTString(NULL, ppro->m_szModuleName, idstr, &dbv)) break;
+ if ( db_get_ts(NULL, ppro->m_szModuleName, idstr, &dbv)) break;
wsprintf(number, _T("%d"), i+1);
lvi.pszText = number;
lvi.lParam = (LPARAM)i;
@@ -873,7 +873,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP WORD nFlag;
wsprintfA(idstr, szIdTemplate, i+1);
- if ( DBGetContactSettingString(NULL, ppro->m_szModuleName, idstr, &dbv)) break;
+ if ( db_get_s(NULL, ppro->m_szModuleName, idstr, &dbv)) break;
wsprintfA(idstr,szIdTemplate,i);
ppro->JSetString(NULL, idstr, dbv.pszVal);
wsprintfA(idstr, szFlagTemplate, i+1);
@@ -1021,7 +1021,7 @@ void CJabberProto::AppendVcardFromDB(HXML n, char* tag, char* key) return;
DBVARIANT dbv;
- if ( DBGetContactSettingTString(NULL, m_szModuleName, key, &dbv))
+ if ( db_get_ts(NULL, m_szModuleName, key, &dbv))
n << XCHILD(_A2T(tag));
else {
n << XCHILD(_A2T(tag), dbv.ptszVal);
@@ -1058,7 +1058,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) for (i=0;;i++) {
wsprintfA(idstr, "e-mail%d", i);
- if ( DBGetContactSettingTString(NULL, m_szModuleName, idstr, &dbv))
+ if ( db_get_ts(NULL, m_szModuleName, idstr, &dbv))
break;
HXML e = v << XCHILD(_T("EMAIL"), dbv.ptszVal);
@@ -1106,7 +1106,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) for (i=0;;i++) {
wsprintfA(idstr, "Phone%d", i);
- if ( DBGetContactSettingTString(NULL, m_szModuleName, idstr, &dbv)) break;
+ if ( db_get_ts(NULL, m_szModuleName, idstr, &dbv)) break;
db_free(&dbv);
n = v << XCHILD(_T("TEL"));
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 5427401826..306527b920 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1513,7 +1513,7 @@ char *CJabberProto::ReadAdvStatusA(HANDLE hContact, const char *pszSlot, const c mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
DBVARIANT dbv;
- if ( DBGetContactSettingString(hContact, "AdvStatus", szSetting, &dbv))
+ if ( db_get_s(hContact, "AdvStatus", szSetting, &dbv))
return NULL;
char *res = mir_strdup(dbv.pszVal);
@@ -1527,7 +1527,7 @@ TCHAR *CJabberProto::ReadAdvStatusT(HANDLE hContact, const char *pszSlot, const mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
DBVARIANT dbv;
- if ( DBGetContactSettingTString(hContact, "AdvStatus", szSetting, &dbv))
+ if ( db_get_ts(hContact, "AdvStatus", szSetting, &dbv))
return NULL;
TCHAR *res = mir_tstrdup(dbv.ptszVal);
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp index 584c3cf081..2e51880d81 100644 --- a/protocols/JabberG/src/ui_utils.cpp +++ b/protocols/JabberG/src/ui_utils.cpp @@ -2431,7 +2431,7 @@ void CDbLink::SaveInt(DWORD value) TCHAR* CDbLink::LoadText()
{
if (dbv.type != DBVT_DELETED) db_free(&dbv);
- if ( !DBGetContactSettingTString(NULL, m_szModule, m_szSetting, &dbv))
+ if ( !db_get_ts(NULL, m_szModule, m_szSetting, &dbv))
{
if (dbv.type == DBVT_TCHAR)
return dbv.ptszVal;
|