From a70382b0e8bed265a1d314d9f6aae8f2dd48d20b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 18:45:54 +0000 Subject: ex-protos moved to the Plugins folder git-svn-id: http://svn.miranda-ng.org/main/trunk@2545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Quotes/src/DBUtils.cpp | 70 ---------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 protocols/Quotes/src/DBUtils.cpp (limited to 'protocols/Quotes/src/DBUtils.cpp') diff --git a/protocols/Quotes/src/DBUtils.cpp b/protocols/Quotes/src/DBUtils.cpp deleted file mode 100644 index 11c0fb3d0d..0000000000 --- a/protocols/Quotes/src/DBUtils.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "StdAfx.h" -#include "DBUtils.h" - -std::string Quotes_DBGetStringA(HANDLE hContact,const char* szModule,const char* szSetting,const char* pszDefValue /*= NULL*/) -{ - std::string sResult; - char* pszSymbol = DBGetString(hContact,szModule,szSetting); - if(NULL != pszSymbol) - { - sResult = pszSymbol; - mir_free(pszSymbol); - } - else if(NULL != pszDefValue) - { - sResult = pszDefValue; - } - - return sResult; -} - -std::wstring Quotes_DBGetStringW(HANDLE hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue/* = NULL*/) -{ - std::wstring sResult; - wchar_t* pszSymbol = DBGetStringW(hContact,szModule,szSetting); - if(NULL != pszSymbol) - { - sResult = pszSymbol; - mir_free(pszSymbol); - } - else if(NULL != pszDefValue) - { - sResult = pszDefValue; - } - - return sResult; -} - -bool Quotes_DBWriteDouble(HANDLE hContact,const char* szModule,const char* szSetting,double dValue) -{ - DBCONTACTWRITESETTING cws = {0}; - - cws.szModule = szModule; - cws.szSetting = szSetting; - cws.value.type = DBVT_BLOB; - cws.value.cpbVal = sizeof(dValue); - cws.value.pbVal = reinterpret_cast(&dValue); - return 0 == CallService(MS_DB_CONTACT_WRITESETTING,reinterpret_cast(hContact),reinterpret_cast(&cws)); -} - -bool Quotes_DBReadDouble(HANDLE hContact,const char* szModule,const char* szSetting,double& rdValue) -{ - DBVARIANT dbv = {0}; - DBCONTACTGETSETTING cgs; - cgs.szModule=szModule; - cgs.szSetting=szSetting; - cgs.pValue = &dbv; - dbv.type = DBVT_BLOB; - - bool bResult = ((0 == CallService(MS_DB_CONTACT_GETSETTING,(WPARAM)hContact,(LPARAM)&cgs)) - && (DBVT_BLOB == dbv.type)); - - if(bResult) - { - rdValue = *reinterpret_cast(dbv.pbVal); - } - - DBFreeVariant(&dbv); - return bResult; -} - -- cgit v1.2.3