1 files changed, 19 insertions, 0 deletions
diff --git a/src/Cache_p.h b/src/Cache_p.h
index 61d91b0c..cf4416ce 100644
--- a/src/Cache_p.h
+++ b/src/Cache_p.h
@@ -54,6 +54,15 @@ public:
mtx::presence::PresenceState presenceState(const std::string &user_id);
std::string statusMessage(const std::string &user_id);
+ // user cache stores user keys
+ UserCache getUserCache(const std::string &user_id);
+ int setUserCache(const std::string &user_id, const UserCache &body);
+ int deleteUserCache(const std::string &user_id);
+
+ // device verified cache
+ DeviceVerifiedCache getVerifiedCache(const std::string &user_id);
+ int setVerifiedCache(const std::string &user_id, const DeviceVerifiedCache &body);
+
static void removeDisplayName(const QString &room_id, const QString &user_id);
static void removeAvatarUrl(const QString &room_id, const QString &user_id);
@@ -510,6 +519,16 @@ private:
return lmdb::dbi::open(txn, "presence", MDB_CREATE);
}
+ lmdb::dbi getUserCacheDb(lmdb::txn &txn)
+ {
+ return lmdb::dbi::open(txn, std::string("user_cache").c_str(), MDB_CREATE);
+ }
+
+ lmdb::dbi getDeviceVerifiedDb(lmdb::txn &txn)
+ {
+ return lmdb::dbi::open(txn, std::string("verified").c_str(), MDB_CREATE);
+ }
+
//! Retrieves or creates the database that stores the open OLM sessions between our device
//! and the given curve25519 key which represents another device.
//!
|