diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-27 19:51:08 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-27 19:51:08 +0900 |
commit | 375bea5ee67a90c6419acf50c06c05ed0435c772 (patch) | |
tree | 76f0a1c830797fe1b17b3bea67ddaf7fb53cbd6a /connection.h | |
parent | e80bfd2fc710d4780a2c22bde9d605a41bd4aaa4 (diff) | |
parent | efeeca097a3c69991683615366f07625855ba2ac (diff) | |
download | libquotient-375bea5ee67a90c6419acf50c06c05ed0435c772.tar.gz libquotient-375bea5ee67a90c6419acf50c06c05ed0435c772.zip |
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'connection.h')
-rw-r--r-- | connection.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/connection.h b/connection.h index 3ec4fd9d..b45a171d 100644 --- a/connection.h +++ b/connection.h @@ -70,7 +70,22 @@ namespace QMatrixClient explicit Connection(const QUrl& server, QObject* parent = nullptr); virtual ~Connection(); + /** Get all Invited and Joined rooms + * \return a hashmap from a composite key - room name and whether + * it's an Invite rather than Join - to room pointers + */ QHash<QPair<QString, bool>, Room*> roomMap() const; + + /** Get all Invited and Joined rooms grouped by tag + * \return a hashmap from tag name to a vector of room pointers, + * sorted by their order in the tag - details are at + * https://matrix.org/speculator/spec/drafts%2Fe2e/client_server/unstable.html#id95 + */ + QHash<QString, QVector<Room*>> tagsToRooms() const; + + /** Get the list of rooms with the specified tag */ + QVector<Room*> roomsWithTag(const QString& tagName) const; + QMap<QString, User*> users() const; // FIXME: Convert Q_INVOKABLEs to Q_PROPERTIES |