diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/m_database.h | 11 | ||||
| -rw-r--r-- | include/m_db_int.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/m_database.h b/include/m_database.h index d0bc296bd9..fda99b4b2f 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -308,12 +308,6 @@ EXTERN_C MIR_CORE_DLL(MEVENT) db_event_first(MCONTACT hContact); // Retrieves a handle to the first unread event in the chain for hContact // Returns the handle, or NULL if hContact is invalid or all its events have been read -// -// Events in a chain are sorted chronologically automatically, but this does not -// necessarily mean that all events after the first unread are unread too. They -// should be checked individually with db_event_next() and db_event_get() -// This service is designed for startup, reloading all the events that remained -// unread from last time EXTERN_C MIR_CORE_DLL(MEVENT) db_event_firstUnread(MCONTACT hContact); @@ -374,6 +368,11 @@ EXTERN_C MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent); EXTERN_C MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char *szId); +// Updates the server ID associated with an event +// Returns 0 on success or a failure otherwise + +EXTERN_C MIR_CORE_DLL(int) db_event_updateId(MEVENT hDbEvent, const char *szId); + ///////////////////////////////////////////////////////////////////////////////////////// // Database settings diff --git a/include/m_db_int.h b/include/m_db_int.h index 74a1cfc955..2516208764 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -161,6 +161,7 @@ interface MIR_APP_EXPORT MIDatabase STDMETHOD_(DATABASELINK*, GetDriver)(void) PURE; STDMETHOD_(MEVENT, GetEventById)(LPCSTR szModule, LPCSTR szId) PURE; + STDMETHOD_(int, UpdateEventId)(MEVENT hDbEvent, const char *szId) PURE; STDMETHOD_(DB::EventCursor*, EventCursor)(MCONTACT hContact, MEVENT hDbEvent) PURE; STDMETHOD_(DB::EventCursor*, EventCursorRev)(MCONTACT hContact, MEVENT hDbEvent) PURE; @@ -302,6 +303,7 @@ public: //////////////////////////////////////////////////////////////////////////////////////// STDMETHODIMP_(MEVENT) GetEventById(LPCSTR szModule, LPCSTR szId) override; + STDMETHODIMP_(int) UpdateEventId(MEVENT hDbEvent, const char *szId) override; }; ///////////////////////////////////////////////////////////////////////////////////////// |
