diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-14 18:01:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-14 18:01:49 +0000 |
commit | 7bdb598e26e7e98788933af43090d34027166969 (patch) | |
tree | 65c215c0693c86134e471f0746e9726b645b51bb /plugins/Quotes/src | |
parent | 9f285a935709f4dda1065d6450739476168c43af (diff) |
second major wipeout of database services & structures:
- DBCONTACTENUMSETTINGS removed;
- all helpers moved to mir_core.dll
git-svn-id: http://svn.miranda-ng.org/main/trunk@17296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src')
-rw-r--r-- | plugins/Quotes/src/ImportExport.cpp | 11 | ||||
-rw-r--r-- | plugins/Quotes/src/QuotesProviderBase.cpp | 4 | ||||
-rw-r--r-- | plugins/Quotes/src/QuotesProviderDukasCopy.cpp | 2 | ||||
-rw-r--r-- | plugins/Quotes/src/QuotesProviderFinance.cpp | 2 | ||||
-rw-r--r-- | plugins/Quotes/src/QuotesProviderGoogle.cpp | 2 |
5 files changed, 8 insertions, 13 deletions
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp index 6818c5c879..468558b7be 100644 --- a/plugins/Quotes/src/ImportExport.cpp +++ b/plugins/Quotes/src/ImportExport.cpp @@ -106,13 +106,8 @@ int EnumDbModules(const char *szModuleName, DWORD, LPARAM lp) if (pModule) {
ctx->m_pszModule = szModuleName;
ctx->m_pNode = pModule;
+ db_enum_settings(ctx->m_hContact, &enum_contact_settings, szModuleName, ctx);
- DBCONTACTENUMSETTINGS dbces;
- dbces.pfnEnumProc = &enum_contact_settings;
- dbces.szModule = szModuleName;
- dbces.lParam = reinterpret_cast<LPARAM>(ctx);
-
- CallService(MS_DB_CONTACT_ENUMSETTINGS, WPARAM(ctx->m_hContact), reinterpret_cast<LPARAM>(&dbces));
if (pModule->GetChildCount() > 0)
pXml->AddChild(pModule);
@@ -131,7 +126,7 @@ IXMLNode::TXMLNodePtr export_contact(MCONTACT hContact, const CModuleInfo::TXMLE ctx.m_pNode = pNode;
ctx.m_hContact = hContact;
- CallService(MS_DB_MODULES_ENUM, (WPARAM)&ctx, (LPARAM)EnumDbModules);
+ db_enum_modules(EnumDbModules, &ctx);
}
return pNode;
}
@@ -557,7 +552,7 @@ bool import_contact(const IXMLNode::TXMLNodePtr& pXmlContact, CImportContext& im bool bResult = get_contact_state(pXmlContact, cst);
if (bResult) {
if (NULL == cst.m_hContact) {
- cst.m_hContact = MCONTACT(CallService(MS_DB_CONTACT_ADD, 0, 0));
+ cst.m_hContact = db_add_contact();
cst.m_bNewContact = true;
}
else if (impctx.m_nFlags & QUOTES_IMPORT_SKIP_EXISTING_CONTACTS)
diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp index 73937e2cf5..7697ba6d6a 100644 --- a/plugins/Quotes/src/QuotesProviderBase.cpp +++ b/plugins/Quotes/src/QuotesProviderBase.cpp @@ -662,7 +662,7 @@ void CQuotesProviderBase::WriteContactRate(MCONTACT hContact, double dRate, cons MCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName)
{
- MCONTACT hContact = MCONTACT(CallService(MS_DB_CONTACT_ADD, 0, 0));
+ MCONTACT hContact = db_add_contact();
if (hContact) {
if (0 == Proto_AddToContact(hContact, QUOTES_PROTOCOL_NAME)) {
tstring sProvName = GetInfo().m_sName;
@@ -674,7 +674,7 @@ MCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName) m_aContacts.push_back(hContact);
}
else {
- CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
+ db_delete_contact(hContact);
hContact = NULL;
}
}
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp index 8119521bd1..c86049c521 100644 --- a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp +++ b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp @@ -38,7 +38,7 @@ bool CQuotesProviderDukasCopy::WatchForQuote(const CQuote& rQuote, bool bWatch) m_aContacts.erase(i);
}
- CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
+ db_delete_contact(hContact);
return true;
}
else if ((true == bWatch) && (i == m_aContacts.end())) {
diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp index ada9936e77..d17a1c39ea 100644 --- a/plugins/Quotes/src/QuotesProviderFinance.cpp +++ b/plugins/Quotes/src/QuotesProviderFinance.cpp @@ -37,7 +37,7 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote, bool bWatch) m_aContacts.erase(i);
}
- CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
+ db_delete_contact(hContact);
return true;
}
diff --git a/plugins/Quotes/src/QuotesProviderGoogle.cpp b/plugins/Quotes/src/QuotesProviderGoogle.cpp index 555081c72c..fb530adb06 100644 --- a/plugins/Quotes/src/QuotesProviderGoogle.cpp +++ b/plugins/Quotes/src/QuotesProviderGoogle.cpp @@ -53,7 +53,7 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri, m_aContacts.erase(i);
}
- CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
+ db_delete_contact(hContact);
return true;
}
|