diff options
| author | George Hazan <ghazan@miranda.im> | 2022-12-25 21:01:26 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2022-12-25 21:01:26 +0300 |
| commit | 0c66b748a7b6b223d34374994e4d7d207e3d2c71 (patch) | |
| tree | bb960016c02b7ba6a57f342c829b65b00b6d2476 /include | |
| parent | 97e9f52c99a41612fcfef3cae099519c46d55710 (diff) | |
db_event_replace: new helper to eliminate duplicate events
Diffstat (limited to 'include')
| -rw-r--r-- | include/m_database.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/m_database.h b/include/m_database.h index 47916a2c40..5f124cbf3b 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -295,6 +295,11 @@ EXTERN_C MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent); EXTERN_C MIR_CORE_DLL(int) db_event_edit(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei); +// Tries to find an event by its id if present +// if an event is found, it's edited, otherwise a new event is added + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_replace(MCONTACT hContact, const DBEVENTINFO *dbei); + // Retrieves a handle to the first event in the chain for hContact // Returns the handle, or NULL if hContact is invalid or has no events // Events in a chain are sorted chronologically automatically |
