diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-10 19:46:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-10 19:46:31 +0300 |
commit | a7bf177e6e4aedcaafca186b50e6666788e45f98 (patch) | |
tree | 98b5d4a37a93b5f93eb2399ed38d696dea3c65bd /include | |
parent | 2046bf33c966d9db3fbc98c1e067788408751104 (diff) |
ME_DB_EVENT_MARKED_READ: recursion prevention
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_database.inc | 2 | ||||
-rw-r--r-- | include/m_database.h | 2 | ||||
-rw-r--r-- | include/m_protoint.h | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc index 3da8ce5123..4c41eac938 100644 --- a/include/delphi/m_database.inc +++ b/include/delphi/m_database.inc @@ -141,7 +141,7 @@ is invalid. This is the one database write operation that does not trigger an event.
Modules should not save flags states for any length of time.
}
-function db_event_markRead(hContact:TMCONTACT; hDbEvent:TMEVENT):int; stdcall; external CoreDLL;
+function db_event_markRead(hContact:TMCONTACT; hDbEvent:TMEVENT; flags:integer = 0):int; stdcall; external CoreDLL;
{
Retrieves a handle to the next event in a chain after hDbEvent
diff --git a/include/m_database.h b/include/m_database.h index 9aaffc79eb..1831946c67 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -351,7 +351,7 @@ EXTERN_C MIR_CORE_DLL(MEVENT) db_event_last(MCONTACT hContact); // This is the one database write operation that does not trigger an event.
// Modules should not save flags states for any length of time.
-EXTERN_C MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, MEVENT hDbEvent);
+EXTERN_C MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, MEVENT hDbEvent, bool bFromServer = false);
// Retrieves a handle to the next event in a chain after hDbEvent
// Returns the handle, or NULL if hDbEvent is invalid or is the last event
diff --git a/include/m_protoint.h b/include/m_protoint.h index 06d3267ff3..184d36d4c5 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -264,6 +264,9 @@ public: // called when an account gets physically removed from the database
virtual void OnErase();
+ // called when an event is marked read from Miranda (not from the server)
+ virtual void OnMarkRead(MCONTACT, MEVENT);
+
// the analog of ME_SYSTEM_MODULESLOADED for an account
virtual void OnModulesLoaded(void);
|