summaryrefslogtreecommitdiff
path: root/plugins/TooltipNotify
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-14 18:01:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-14 18:01:49 +0000
commit7bdb598e26e7e98788933af43090d34027166969 (patch)
tree65c215c0693c86134e471f0746e9726b645b51bb /plugins/TooltipNotify
parent9f285a935709f4dda1065d6450739476168c43af (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/TooltipNotify')
-rw-r--r--plugins/TooltipNotify/src/DbHelpers.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/plugins/TooltipNotify/src/DbHelpers.cpp b/plugins/TooltipNotify/src/DbHelpers.cpp
index 4393e44b5a..8fe93249a6 100644
--- a/plugins/TooltipNotify/src/DbHelpers.cpp
+++ b/plugins/TooltipNotify/src/DbHelpers.cpp
@@ -13,12 +13,7 @@ static int EnumSettingsProc1(const char*, LPARAM)
bool ModuleSettingsExists(MCONTACT hContact, const char* pszModuleName)
{
- DBCONTACTENUMSETTINGS dbces = {0};
- dbces.szModule = pszModuleName;
- dbces.pfnEnumProc = EnumSettingsProc1;
-
- int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
- return (nResult != -1);
+ return db_enum_settings(hContact, EnumSettingsProc1, pszModuleName) != -1;
}
static int EnumSettingsProc2(const char *pszSetting, LPARAM lParam)
@@ -31,12 +26,7 @@ static int EnumSettingsProc2(const char *pszSetting, LPARAM lParam)
void DeleteModuleSettings(MCONTACT hContact, const char* pszModuleName)
{
SettingsList settingsList;
- DBCONTACTENUMSETTINGS dbces = {0};
- dbces.szModule = pszModuleName;
- dbces.lParam = (LPARAM)&settingsList;
- dbces.pfnEnumProc = EnumSettingsProc2;
-
- int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
+ int nResult = db_enum_settings(hContact, EnumSettingsProc2, pszModuleName, &settingsList);
if (nResult != -1)
{
for(unsigned i=0; i<settingsList.size(); i++)
@@ -60,12 +50,7 @@ static int GetSetting(MCONTACT hContact, const char *szModule, const char *szSet
void RenameModule(MCONTACT hContact, const char* pszOldName, const char* pszNewName)
{
SettingsList settingsList;
- DBCONTACTENUMSETTINGS dbces = {0};
- dbces.szModule = pszOldName;
- dbces.lParam = (LPARAM)&settingsList;
- dbces.pfnEnumProc = EnumSettingsProc2;
-
- int nResult = ::CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
+ int nResult = db_enum_settings(hContact, EnumSettingsProc2, pszOldName, &settingsList);
if (nResult != -1)
{
DBVARIANT dbv;