summaryrefslogtreecommitdiff
path: root/plugins/RemovePersonalSettings/src/rps.cpp
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/RemovePersonalSettings/src/rps.cpp
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/RemovePersonalSettings/src/rps.cpp')
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index 5df0d124b5..7da24ba134 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -195,14 +195,14 @@ void RemoveUsers()
MCONTACT hContactOld = hContact;
hContact = db_find_next(hContact);
- if (isMetaContact(hContactOld) )
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContactOld, 0);
+ if (isMetaContact(hContactOld))
+ db_delete_contact(hContactOld);
}
// Now delete all left-overs
hContact = db_find_first();
while(hContact != NULL) {
- CallService(MS_DB_CONTACT_DELETE, hContact, 0);
+ db_delete_contact(hContact);
hContact = db_find_first();
}
@@ -632,7 +632,7 @@ void DeleteSettingEx(const char *szModule, const char *szSetting)
dms.filter = szModule;
dms.lenFilterMinusOne = lenModule-1;
- CallService(MS_DB_MODULES_ENUM, (WPARAM) &dms, (LPARAM) &ModuleEnumProc);
+ db_enum_modules(ModuleEnumProc, &dms);
// Delete then
szModule = dms.buffer;
@@ -647,19 +647,10 @@ void DeleteSettingEx(const char *szModule, const char *szSetting)
size_t lenSetting = szSetting == NULL ? 0 : mir_strlen(szSetting);
if (szSetting == NULL || szSetting[0] == '*' || szSetting[lenSetting-1] == '*') {
DeleteModuleStruct dms;
- DBCONTACTENUMSETTINGS dbces;
-
memset(&dms, 0, sizeof(dms));
-
dms.filter = szSetting;
dms.lenFilterMinusOne = lenSetting-1;
-
- dbces.pfnEnumProc = EnumProc;
- dbces.lParam = (LPARAM) &dms;
- dbces.szModule = szModule;
- dbces.ofsSettings = 0;
-
- CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM) &dbces);
+ db_enum_settings(NULL, EnumProc, szModule, &dms);
// Delete then
szSetting = dms.buffer;