diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-10 23:26:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-10 23:26:08 +0300 |
commit | 39681c2aa83e33d46598f8aeecd10370b04cf364 (patch) | |
tree | ee9ef3cb681b97f5d9f8e046add17b8356e9d7ad /src | |
parent | 802cbbae257dca16957d9b7e028be1d0d468e097 (diff) |
stupid schema with event handles sharing via CreateEventHook eliminated
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/db_intf.cpp | 27 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 8 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 8 |
3 files changed, 35 insertions, 8 deletions
diff --git a/src/mir_app/src/db_intf.cpp b/src/mir_app/src/db_intf.cpp index a4d271c367..e864280432 100644 --- a/src/mir_app/src/db_intf.cpp +++ b/src/mir_app/src/db_intf.cpp @@ -57,16 +57,27 @@ MIR_APP_DLL(DATABASELINK*) FindDatabasePlugin(const wchar_t *ptszFileName) ///////////////////////////////////////////////////////////////////////////////
+MIR_APP_EXPORT HANDLE
+ g_hevContactDeleted, // ME_DB_CONTACT_DELETED
+ g_hevContactAdded, // ME_DB_CONTACT_ADDED
+ g_hevSettingChanged, // ME_DB_CONTACT_SETTINGCHANGED
+ g_hevMarkedRead, // ME_DB_EVENT_MARKED_READ
+ g_hevEventAdded, // ME_DB_EVENT_ADDED
+ g_hevEventEdited, // ME_DB_EVENT_EDITED
+ g_hevEventDeleted, // ME_DB_EVENT_DELETED
+ g_hevEventFiltered;
+
int LoadDbintfModule()
{
// create events once, they will be inherited by all database plugins
- CreateHookableEvent(ME_DB_CONTACT_DELETED);
- CreateHookableEvent(ME_DB_CONTACT_ADDED);
- CreateHookableEvent(ME_DB_CONTACT_SETTINGCHANGED);
- CreateHookableEvent(ME_DB_EVENT_MARKED_READ);
-
- CreateHookableEvent(ME_DB_EVENT_ADDED);
- CreateHookableEvent(ME_DB_EVENT_DELETED);
- CreateHookableEvent(ME_DB_EVENT_FILTER_ADD);
+ g_hevContactDeleted = CreateHookableEvent(ME_DB_CONTACT_DELETED);
+ g_hevContactAdded = CreateHookableEvent(ME_DB_CONTACT_ADDED);
+ g_hevSettingChanged = CreateHookableEvent(ME_DB_CONTACT_SETTINGCHANGED);
+ g_hevMarkedRead = CreateHookableEvent(ME_DB_EVENT_MARKED_READ);
+
+ g_hevEventAdded = CreateHookableEvent(ME_DB_EVENT_ADDED);
+ g_hevEventEdited = CreateHookableEvent(ME_DB_EVENT_EDITED);
+ g_hevEventDeleted = CreateHookableEvent(ME_DB_EVENT_DELETED);
+ g_hevEventFiltered = CreateHookableEvent(ME_DB_EVENT_FILTER_ADD);
return 0;
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 2a4d43f391..1ebcb18629 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -653,3 +653,11 @@ Miranda_WaitOnHandleEx @663 ?GetEventById@MDatabaseReadonly@@UAGIPBD0@Z @686 NONAME
?SetEventId@MDatabaseReadonly@@UAGHPBDI0@Z @687 NONAME
?EditEvent@MDatabaseReadonly@@UAGHIIPAUDBEVENTINFO@@@Z @688 NONAME
+g_hevContactAdded @689 NONAME
+g_hevContactDeleted @690 NONAME
+g_hevEventAdded @691 NONAME
+g_hevEventDeleted @692 NONAME
+g_hevEventEdited @693 NONAME
+g_hevEventFiltered @694 NONAME
+g_hevMarkedRead @695 NONAME
+g_hevSettingChanged @696 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index fc9155d7cb..5b9ec3aaf3 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -653,3 +653,11 @@ Miranda_WaitOnHandleEx @663 ?GetEventById@MDatabaseReadonly@@UEAAIPEBD0@Z @686 NONAME
?SetEventId@MDatabaseReadonly@@UEAAHPEBDI0@Z @687 NONAME
?EditEvent@MDatabaseReadonly@@UEAAHIIPEAUDBEVENTINFO@@@Z @688 NONAME
+g_hevContactAdded @689 NONAME
+g_hevContactDeleted @690 NONAME
+g_hevEventAdded @691 NONAME
+g_hevEventDeleted @692 NONAME
+g_hevEventEdited @693 NONAME
+g_hevEventFiltered @694 NONAME
+g_hevMarkedRead @695 NONAME
+g_hevSettingChanged @696 NONAME
|