From 366b12a36bf052025bce085d2859486e0318231c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 17 Apr 2024 20:00:05 +0300 Subject: db_event_delivered + ME_DB_EVENT_DELIVERED = helper & hookable event to catch event's delivery to a server --- include/m_database.h | 14 ++++++++++++++ include/m_db_int.h | 7 ++++--- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/m_database.h b/include/m_database.h index 75c34d2dbb..5dd0a2859a 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -298,6 +298,10 @@ EXTERN_C MIR_CORE_DLL(int) db_event_count(MCONTACT hContact); EXTERN_C MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent, int flags = 0); +// Marks our own event as delivered + +EXTERN_C MIR_CORE_DLL(int) db_event_delivered(MCONTACT hContact, MEVENT hDbEvent); + // Edits an event in the database // Returns 0 on success, or nonzero on error @@ -612,6 +616,16 @@ EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags); #define ME_DB_EVENT_DELETED "DB/Event/Deleted" +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Event/Delivered event +// Called when the server confirms that an event was successfully delivered to server +// wParam = (MCONTACT)hContact +// lParam = (LPARAM)(HANDLE)hDbEvent +// hDbEvent is a valid handle to the event. +// hContact is a valid handle to the contact to which hDbEvent refers, and will remain valid. + +#define ME_DB_EVENT_DELIVERED "DB/Event/Delivered" + ///////////////////////////////////////////////////////////////////////////////////////// // DB/Contact/Added event // Called when a new contact has been added to the database diff --git a/include/m_db_int.h b/include/m_db_int.h index 1657a13d05..51f494049a 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -378,12 +378,13 @@ struct DATABASELINK EXTERN_C MIR_APP_EXPORT HANDLE g_hevContactDeleted, // ME_DB_CONTACT_DELETED - g_hevContactAdded, // ME_DB_CONTACT_ADDED + 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_hevEventAdded, // ME_DB_EVENT_ADDED + g_hevEventEdited, // ME_DB_EVENT_EDITED g_hevEventDeleted, // ME_DB_EVENT_DELETED + g_hevEventDelivered, // ME_DB_EVENT_DELIVERED g_hevEventFiltered; // ME_DB_EVENT_FILTER_ADD ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3