From ec412621d71b1a7758b15d2b3c5cd5e7b2081ab1 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 25 Feb 2018 18:57:02 +0900 Subject: Room and Connection: support room tags Closes #134. --- connection.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'connection.h') 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, 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> tagsToRooms() const; + + /** Get the list of rooms with the specified tag */ + QVector roomsWithTag(const QString& tagName) const; + QMap users() const; // FIXME: Convert Q_INVOKABLEs to Q_PROPERTIES -- cgit v1.2.3