From de5dce707cc60ace5b92d2ac61914c590cb9680b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 29 Jun 2013 18:16:23 +0000 Subject: rest of unused databases services removed git-svn-id: http://svn.miranda-ng.org/main/trunk@5181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp | 18 ++++-------------- plugins/UserInfoEx/src/mir_db.cpp | 10 +--------- 2 files changed, 5 insertions(+), 23 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index b57f2835ce..5e5c25e482 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -693,22 +693,12 @@ size_t CVCardFileVCF::packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *c **/ BYTE CVCardFileVCF::GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv) { - DBCONTACTGETSETTING cgs; - - cgs.szModule = pszModule; - cgs.szSetting = pszSetting; - cgs.pValue = dbv; - dbv->type = _useUtf8 ? DBVT_UTF8 : DBVT_ASCIIZ; + int type = _useUtf8 ? DBVT_UTF8 : DBVT_ASCIIZ; dbv->pszVal = NULL; - if (!pszModule || CallService(MS_DB_CONTACT_GETSETTING_STR, (WPARAM)_hContact, (LPARAM)&cgs) || (dbv->type == DBVT_ASCIIZ && !dbv->pszVal && !*dbv->pszVal)) { - cgs.szModule = _pszBaseProto; - cgs.szSetting = pszSetting; - cgs.pValue = dbv; - dbv->type = DBVT_ASCIIZ; - if (!_pszBaseProto || CallService(MS_DB_CONTACT_GETSETTING_STR, (WPARAM)_hContact, (LPARAM)&cgs) || (dbv->type == DBVT_ASCIIZ && !dbv->pszVal && !*dbv->pszVal)) { + if (!pszModule || db_get_s(_hContact, pszModule, pszSetting, dbv, type) || (dbv->type == DBVT_ASCIIZ && !dbv->pszVal && !*dbv->pszVal)) + if (!_pszBaseProto || db_get_s(_hContact, _pszBaseProto, pszSetting, dbv) || (dbv->type == DBVT_ASCIIZ && !dbv->pszVal && !*dbv->pszVal)) return DBVT_DELETED; - } - } + _hasUtf8 += _useUtf8 && !IsUSASCII(dbv->pszVal, NULL); return dbv->type; } diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index dc31be814a..e40855b24b 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -262,16 +262,8 @@ namespace Setting { **/ BYTE Get(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType) { - BYTE result; - DBCONTACTGETSETTING dgs; - - dgs.szModule = pszModule; - dgs.szSetting = pszSetting; - dgs.pValue = dbv; - dbv->type = 0; - // read value without translation to specific type - result = CallService(MS_DB_CONTACT_GETSETTING_STR, (WPARAM) hContact, (LPARAM) &dgs) != 0; + BYTE result = db_get_s(hContact, pszModule, pszSetting, dbv, 0) != 0; // Is value read successfully and destination type set? if (!result && destType) { -- cgit v1.2.3