aboutsummaryrefslogtreecommitdiff
path: root/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-25 18:57:02 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-26 09:06:37 +0900
commitec412621d71b1a7758b15d2b3c5cd5e7b2081ab1 (patch)
tree7a79286d7c6e5a99644c3f7141e1cdc8e2459416 /connection.h
parent7c10807549b2a73527bd594789d0e5b9ab58c874 (diff)
downloadlibquotient-ec412621d71b1a7758b15d2b3c5cd5e7b2081ab1.tar.gz
libquotient-ec412621d71b1a7758b15d2b3c5cd5e7b2081ab1.zip
Room and Connection: support room tags
Closes #134.
Diffstat (limited to 'connection.h')
-rw-r--r--connection.h15
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