From 097c52ad9a2928422084bf76cebee58958341574 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Apr 2013 19:47:13 +0000 Subject: end of the old database macroses git-svn-id: http://svn.miranda-ng.org/main/trunk@4373 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MenuItemEx/src/main.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'plugins/MenuItemEx/src/main.cpp') diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 9f9fc15a5e..b3e5ae126e 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -200,9 +200,8 @@ void RenameDbProto(HANDLE hContact, HANDLE hContactNew, char* oldName, char* new db_set_utf(hContactNew, newName, setting->name, dbv.pszVal); break; case DBVT_BLOB: - DBWriteContactSettingBlob(hContactNew, newName, setting->name, dbv.pbVal, dbv.cpbVal); + db_set_blob(hContactNew, newName, setting->name, dbv.pbVal, dbv.cpbVal); break; - } if (delOld) db_unset(hContact, oldName, setting->name); @@ -321,21 +320,19 @@ void GetID(HANDLE hContact,LPSTR szProto,LPSTR szID) int StatusMsgExists(HANDLE hContact) { - LPSTR module,msg; char par[32]; BOOL ret = 0; - int i; - module = GetContactProto(hContact); + LPSTR module = GetContactProto(hContact); if (!module) return 0; - for(i = 0; i < SIZEOF(statusMsg); i++) { + for(int i = 0; i < SIZEOF(statusMsg); i++) { if (statusMsg[i].flag & 8) mir_snprintf(par, SIZEOF(par), "%s/%s", module, statusMsg[i].name); else strcpy(par, statusMsg[i].name); - msg = DBGetString(hContact, (statusMsg[i].module) ? statusMsg[i].module : module, par); + LPSTR msg = db_get_sa(hContact, (statusMsg[i].module) ? statusMsg[i].module : module, par); if (msg) { if (strlen(msg)) ret |= statusMsg[i].flag; @@ -367,7 +364,7 @@ BOOL MirVerExists(HANDLE hContact) szProto = GetContactProto(hContact); if (!szProto) return 0; - msg = DBGetString(hContact,szProto,"MirVer"); + msg = db_get_sa(hContact,szProto,"MirVer"); if (msg) { if (strlen(msg)) ret = 1; mir_free(msg); @@ -390,12 +387,10 @@ void getIP(HANDLE hContact,LPSTR szProto,LPSTR szIP) LPSTR getMirVer(HANDLE hContact) { - LPSTR szProto, msg; - - szProto = GetContactProto(hContact); + LPSTR szProto = GetContactProto(hContact); if (!szProto) return NULL; - msg = DBGetString(hContact,szProto,"MirVer"); + LPSTR msg = db_get_sa(hContact,szProto,"MirVer"); if (msg) { if (strlen(msg)) return msg; @@ -679,7 +674,7 @@ INT_PTR onCopyStatusMsg(WPARAM wparam,LPARAM lparam) else strcpy(par, statusMsg[i].name); - LPTSTR msg = DBGetStringT((HANDLE)wparam, (statusMsg[i].module) ? statusMsg[i].module : module, par); + LPTSTR msg = db_get_tsa((HANDLE)wparam, (statusMsg[i].module) ? statusMsg[i].module : module, par); if (msg) { if (_tcsclen(msg)) { if (flags & VF_SMNAME) { -- cgit v1.2.3