summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/mir_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src/mir_db.cpp')
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp43
1 files changed, 3 insertions, 40 deletions
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index 6bf79fc8e7..f1b8feaf83 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -28,36 +28,6 @@ namespace DB {
**/
namespace Contact {
-
-/**
- * Gets the number of contacts in the database, which does not count the user
- * @param hContact - handle to the contact
- * @return Returns the number of contacts. They can be retrieved using
- * contact/findfirst and contact/findnext
- **/
-INT_PTR GetCount()
-{
- return CallService(MS_DB_CONTACT_GETCOUNT, 0, 0);
-}
-
-/**
- * Simply adds a new contact without setting up any protocol or something else
- * @return HANDLE The function returns the HANDLE of the new contact
- **/
-MCONTACT Add()
-{
- return (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
-}
-
-/**
- * This function deletes a contact from the database.
- * @param hContact - handle to the contact
- **/
-BYTE Delete(MCONTACT hContact)
-{
- return CallService(MS_DB_CONTACT_DELETE, hContact, 0) != 0;
-}
-
/**
* This function trys to guess, when an ICQ contact was added to database.
**/
@@ -121,10 +91,7 @@ static int IsEmptyEnumProc(LPCSTR, LPARAM)
bool IsEmpty(MCONTACT hContact, LPCSTR pszModule)
{
- DBCONTACTENUMSETTINGS dbces = { 0 };
- dbces.pfnEnumProc = IsEmptyEnumProc;
- dbces.szModule = pszModule;
- return (0 > CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces));
+ return 0 > db_enum_settings(hContact, IsEmptyEnumProc, pszModule);
}
/**
@@ -755,7 +722,7 @@ LPSTR CEnumList::Insert(LPCSTR str)
INT_PTR CEnumList::EnumModules()
{
- return CallService(MS_DB_MODULES_ENUM, (WPARAM)this, (LPARAM)CEnumList::EnumProc);
+ return db_enum_modules(CEnumList::EnumProc, this);
}
/**
@@ -765,11 +732,7 @@ INT_PTR CEnumList::EnumModules()
INT_PTR CEnumList::EnumSettings(MCONTACT hContact, LPCSTR pszModule)
{
- DBCONTACTENUMSETTINGS dbces = { 0 };
- dbces.pfnEnumProc = (DBSETTINGENUMPROC)CEnumList::EnumSettingsProc;
- dbces.szModule = pszModule;
- dbces.lParam = (LPARAM)this;
- return CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
+ return db_enum_settings(hContact, &CEnumList::EnumSettingsProc, pszModule, this);
}
} /* namespace DB */ \ No newline at end of file