summary refs log tree commit diff
path: root/src/Cache_p.h
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2020-10-28 14:50:00 +0100
committerGitHub <noreply@github.com>2020-10-28 14:50:00 +0100
commitfd4f173966e1d7d4d6c40d07da2f2efa270afc82 (patch)
tree2770e82ae26157d69c5158e76de39129ddc57864 /src/Cache_p.h
parentTranslated using Weblate (Russian) (diff)
parentDon't pass around empty timeline (diff)
downloadnheko-fd4f173966e1d7d4d6c40d07da2f2efa270afc82.tar.xz
Merge pull request #308 from Nheko-Reborn/build-opt
Optimize build
Diffstat (limited to 'src/Cache_p.h')
-rw-r--r--src/Cache_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Cache_p.h b/src/Cache_p.h

index a32793ea..05e13128 100644 --- a/src/Cache_p.h +++ b/src/Cache_p.h
@@ -33,8 +33,11 @@ #endif #include <nlohmann/json.hpp> -#include <mtx/responses.hpp> +#include <mtx/responses/messages.hpp> +#include <mtx/responses/notifications.hpp> +#include <mtx/responses/sync.hpp> #include <mtxclient/crypto/client.hpp> +#include <mtxclient/http/client.hpp> #include "CacheCryptoStructs.h" #include "CacheStructs.h" @@ -65,6 +68,8 @@ public: void deleteUserKeys(lmdb::txn &txn, lmdb::dbi &db, const std::vector<std::string> &user_ids); + void query_keys(const std::string &user_id, + std::function<void(const UserKeyCache &, mtx::http::RequestErr)> cb); // device & user verification cache VerificationStatus verificationStatus(const std::string &user_id); @@ -113,8 +118,7 @@ public: void setCurrentFormat(); bool runMigrations(); - std::map<QString, mtx::responses::Timeline> roomMessages(); - + std::vector<QString> roomIds(); QMap<QString, mtx::responses::Notifications> getTimelineMentions(); //! Retrieve all the user ids from a room.