summary refs log tree commit diff
path: root/include/Cache.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-01 19:35:28 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-01 19:35:28 +0300
commit763330fd3c259b7a877eb05944783e92c0afcb80 (patch)
treecf6810cba9aded346ecf8c3dbede7ed0e7d8d68f /include/Cache.h
parentAdd prototype room settings menu (diff)
downloadnheko-763330fd3c259b7a877eb05944783e92c0afcb80.tar.xz
Add member list
Diffstat (limited to 'include/Cache.h')
-rw-r--r--include/Cache.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/Cache.h b/include/Cache.h

index db5dba00..e0b68549 100644 --- a/include/Cache.h +++ b/include/Cache.h
@@ -24,6 +24,13 @@ #include <lmdb++.h> #include <mtx/responses.hpp> +struct RoomMember +{ + QString user_id; + QString display_name; + QImage avatar; +}; + struct SearchResult { QString user_id; @@ -32,6 +39,7 @@ struct SearchResult Q_DECLARE_METATYPE(SearchResult) Q_DECLARE_METATYPE(QVector<SearchResult>) +Q_DECLARE_METATYPE(RoomMember); //! Used to uniquely identify a list of read receipts. struct ReadReceiptKey @@ -164,6 +172,11 @@ public: lmdb::dbi &membersdb, const QString &room_id); + //! Retrieve member info from a room. + std::vector<RoomMember> getMembers(const std::string &room_id, + std::size_t startIndex = 0, + std::size_t len = 30); + void saveState(const mtx::responses::Sync &res); bool isInitialized() const;