summaryrefslogtreecommitdiff
path: root/plugins/Quotes
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Quotes')
-rw-r--r--plugins/Quotes/src/DBUtils.cpp9
-rw-r--r--plugins/Quotes/src/ImportExport.cpp7
2 files changed, 3 insertions, 13 deletions
diff --git a/plugins/Quotes/src/DBUtils.cpp b/plugins/Quotes/src/DBUtils.cpp
index 583cedcf85..d85f85c282 100644
--- a/plugins/Quotes/src/DBUtils.cpp
+++ b/plugins/Quotes/src/DBUtils.cpp
@@ -36,14 +36,7 @@ std::wstring Quotes_DBGetStringW(HANDLE hContact,const char* szModule,const char
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<BYTE*>(&dValue);
- return 0 == CallService(MS_DB_CONTACT_WRITESETTING,reinterpret_cast<WPARAM>(hContact),reinterpret_cast<LPARAM>(&cws));
+ return 0 == db_set_blob(hContact, szModule, szSetting, &dValue, sizeof(dValue));
}
bool Quotes_DBReadDouble(HANDLE hContact,const char* szModule,const char* szSetting,double& rdValue)
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp
index 00153d79dd..6c7d7fc1fa 100644
--- a/plugins/Quotes/src/ImportExport.cpp
+++ b/plugins/Quotes/src/ImportExport.cpp
@@ -309,17 +309,14 @@ INT_PTR Quotes_Export(WPARAM wp,LPARAM lp)
namespace
{
- bool set_contact_settings(HANDLE hContact,DBCONTACTWRITESETTING& dbs)
+ bool set_contact_settings(HANDLE hContact, DBCONTACTWRITESETTING& dbs)
{
assert(DBVT_DELETED != dbs.value.type);
- return (0 == CallService(MS_DB_CONTACT_WRITESETTING,reinterpret_cast<WPARAM>(hContact),
- reinterpret_cast<LPARAM>(&dbs)));
+ return (0 == db_set(hContact, dbs.szModule, dbs.szSetting, &dbs.value));
}
bool handle_module(HANDLE hContact,const IXMLNode::TXMLNodePtr& pXmlModule,UINT nFlags)
{
-// USES_CONVERSION;
-
size_t cCreatedRecords = 0;
tstring sModuleName = pXmlModule->GetText();
if(false == sModuleName.empty())