diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-23 22:06:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-23 22:06:26 +0300 |
commit | 6d6cb956a78b2dbfa7e8d62f4234d8f27b100468 (patch) | |
tree | e41f29a86d93ffc0ca414e8d84c8cdd47847baeb /include/m_database.h | |
parent | 6bb0abf1e62b18e4029ae0b7b73ee47f3fe3b39d (diff) |
database enumerators => void* instead of LPARAM
Diffstat (limited to 'include/m_database.h')
-rw-r--r-- | include/m_database.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/m_database.h b/include/m_database.h index 2292c76513..eb4bd3cbcf 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -99,21 +99,20 @@ EXTERN_C MIR_CORE_DLL(int) db_is_contact(MCONTACT hContact); // Returns the value returned by the last call to dbmep
// This service is only really useful for debugging, in conjunction with db/contact/enumsettings
// dbmep should return 0 to continue enumeration, or nonzero to stop.
-// ofsModuleName is the offset of the module name from the start of the profile
-// database, and is only useful for really heavyweight debugging
+//
// Modules names will be enumerated in no particular order
// Writing to the database while module names are being enumerated will cause
// unpredictable results in the enumeration, but the write will work.
// szModuleName is only guaranteed to be valid for the duration of the callback.
// If you want to keep it for longer you must allocation your own storage.
-typedef int(*DBMODULEENUMPROC)(const char *szModuleName, DWORD ofsModuleName, LPARAM lParam);
+typedef int(*DBMODULEENUMPROC)(const char *szModuleName, void *param);
-EXTERN_C MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC dbmep, const void *param = NULL);
+EXTERN_C MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC dbmep, void *param = nullptr);
// Lists all resident settings
-EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, const void *param = NULL);
+EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, void *param = nullptr);
// Lists all the settings a specific modules has stored in the database for a specific contact.
// Returns the return value of the last call to pfnEnumProc, or -1 if there are
@@ -124,9 +123,9 @@ EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, const void // szSetting is only guaranteed to be valid for the duration of the callback. If
// you want to keep it for longer you must allocation your own storage.
-typedef int (*DBSETTINGENUMPROC)(const char *szSetting, LPARAM lParam);
+typedef int (*DBSETTINGENUMPROC)(const char *szSetting, void *param);
-EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param = NULL);
+EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param = nullptr);
/////////////////////////////////////////////////////////////////////////////////////////
// DBVARIANT: used by db/contact/getsetting and db/contact/writesetting
|