diff options
author | George Hazan <ghazan@miranda.im> | 2018-09-19 15:34:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-09-19 15:34:32 +0300 |
commit | 77ea5b95cd68a295068394e9d0c505f0b26221ba (patch) | |
tree | 5b3dca3184ba08a040df418bd638efbe8a9ed7c2 /include | |
parent | 8dd934a1e0e80b1c14194195f4664bc9a6e685cc (diff) |
GetEventById & SetEventId - two new methods to operate with events by their server ids
Diffstat (limited to 'include')
-rw-r--r-- | include/m_database.h | 12 | ||||
-rw-r--r-- | include/m_db_int.h | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/m_database.h b/include/m_database.h index c67ee25475..8edb101dff 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -392,6 +392,18 @@ Events in a chain are sorted chronologically automatically EXTERN_C MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent);
+/*
+Retrieves a handle to the event identified by its module and unique identifier
+*/
+
+EXTERN_C MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char *szId);
+
+/*
+Sets an identifier for an event identified by its module and handle
+*/
+
+EXTERN_C MIR_CORE_DLL(MEVENT) db_event_setId(const char *szModule, MEVENT hDbEvent, const char *szId);
+
/////////////////////////////////////////////////////////////////////////////////////////
// Database settings
diff --git a/include/m_db_int.h b/include/m_db_int.h index 50b8279e23..3c07534ced 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -128,6 +128,9 @@ interface MIR_APP_EXPORT MIDatabase STDMETHOD_(BOOL, Compact)(void) PURE;
STDMETHOD_(BOOL, Backup)(LPCWSTR) PURE;
+
+ STDMETHOD_(MEVENT, GetEventById)(LPCSTR szModule, LPCSTR szId) PURE;
+ STDMETHOD_(BOOL, SetEventId)(LPCSTR szModule, MEVENT, LPCSTR szId) PURE;
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -219,6 +222,10 @@ public: ////////////////////////////////////////////////////////////////////////////////////////
STDMETHODIMP_(BOOL) MetaMergeHistory(DBCachedContact*, DBCachedContact*) override;
STDMETHODIMP_(BOOL) MetaSplitHistory(DBCachedContact*, DBCachedContact*) override;
+
+ ////////////////////////////////////////////////////////////////////////////////////////
+ STDMETHODIMP_(MEVENT) GetEventById(LPCSTR szModule, LPCSTR szId) override;
+ STDMETHODIMP_(BOOL) SetEventId(LPCSTR szModule, MEVENT, LPCSTR szId) override;
};
/////////////////////////////////////////////////////////////////////////////////////////
|