summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbintf.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-09-19 14:57:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-09-19 14:57:27 +0300
commit8dd934a1e0e80b1c14194195f4664bc9a6e685cc (patch)
tree0f0264a4d3c9848ea64e2dabb1969bd78d1300eb /plugins/Dbx_mdbx/src/dbintf.h
parentd5c92952533f3e1bfb06ad7f231dacc03e6a260b (diff)
eventids table added for message keys
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbintf.h')
-rw-r--r--plugins/Dbx_mdbx/src/dbintf.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h
index 73fb14e36b..fceabaf5f8 100644
--- a/plugins/Dbx_mdbx/src/dbintf.h
+++ b/plugins/Dbx_mdbx/src/dbintf.h
@@ -39,30 +39,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <pshpack1.h>
-#define DBHEADER_VERSION MAKELONG(1, 4)
-
+#define DBHEADER_VERSION MAKELONG(1, 4)
#define DBHEADER_SIGNATURE 0x40DECADEu
struct DBHeader
{
uint32_t dwSignature;
- uint32_t dwVersion; // database format version
+ uint32_t dwVersion; // database format version
};
struct DBContact
{
- uint32_t dwEventCount; // number of events in the chain for this contact
+ uint32_t dwEventCount; // number of events in the chain for this contact
MEVENT evFirstUnread;
uint64_t tsFirstUnread;
};
struct DBEvent
{
- MCONTACT contactID; // a contact this event belongs to
+ MCONTACT contactID; // a contact this event belongs to
uint32_t iModuleId; // offset to a DBModuleName struct of the name of
- uint64_t timestamp; // seconds since 00:00:00 01/01/1970
- uint32_t flags; // see m_database.h, db/event/add
- uint16_t wEventType; // module-defined event type
- uint16_t cbBlob; // number of bytes in the blob
+ uint64_t timestamp; // seconds since 00:00:00 01/01/1970
+ uint32_t flags; // see m_database.h, db/event/add
+ uint16_t wEventType; // module-defined event type
+ uint16_t cbBlob; // number of bytes in the blob
bool __forceinline markedRead() const
{
@@ -76,7 +75,15 @@ struct DBEventSortingKey
MEVENT hEvent;
uint64_t ts;
- static int Compare(const MDBX_val* a, const MDBX_val* b);
+ static int Compare(const MDBX_val*, const MDBX_val*);
+};
+
+struct DBEventIdKey
+{
+ uint32_t iModuleId; // offset to a DBModuleName struct of the name of
+ char szEventId[256]; // string id
+
+ static int Compare(const MDBX_val*, const MDBX_val*);
};
struct DBSettingKey
@@ -186,8 +193,8 @@ class CDbxMDBX : public MDatabaseCommon, public MZeroedObject
////////////////////////////////////////////////////////////////////////////
// events
- MDBX_dbi m_dbEvents, m_dbEventsSort;
- MDBX_cursor *m_curEvents, *m_curEventsSort;
+ MDBX_dbi m_dbEvents, m_dbEventsSort, m_dbEventIds;
+ MDBX_cursor *m_curEvents, *m_curEventsSort, *m_curEventIds;
MEVENT m_dwMaxEventId;
HANDLE hEventAddedEvent, hEventDeletedEvent, hEventFilterAddedEvent;