summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src/dbintf.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbintf.h')
-rw-r--r--plugins/Dbx_sqlite/src/dbintf.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h
index 196242a4d1..3d780073e9 100644
--- a/plugins/Dbx_sqlite/src/dbintf.h
+++ b/plugins/Dbx_sqlite/src/dbintf.h
@@ -6,12 +6,24 @@
struct DBCachedContact : public DBCachedContactBase
{
- uint32_t count;
- MEVENT first;
- MEVENT unread;
- MEVENT last;
+ uint32_t m_count;
+ MEVENT m_first;
+ uint32_t m_firstTimestamp;
+ MEVENT m_unread;
+ uint32_t m_unreadTimestamp;
+ MEVENT m_last;
+ uint32_t m_lastTimestamp;
- DBCachedContact() { count = first = unread = last = 0; }
+ DBCachedContact()
+ : m_count(-1), m_first(0), m_unread(0), m_last(0) { }
+
+ bool HasCount() const;
+
+ void AddEvent(MEVENT hDbEvent, uint32_t timestamp, bool unread);
+ void EditEvent(MEVENT hDbEvent, uint32_t timestamp, bool unread);
+ void DeleteEvent(MEVENT hDbEvent);
+
+ void MarkRead(MEVENT hDbEvent);
};
struct CDbxSQLite : public MDatabaseCommon, public MZeroedObject