diff options
Diffstat (limited to 'include/Sync.h')
-rw-r--r-- | include/Sync.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/Sync.h b/include/Sync.h index 420c9b6c..a9caf473 100644 --- a/include/Sync.h +++ b/include/Sync.h @@ -171,15 +171,42 @@ JoinedRoom::timeline() const return timeline_; } +class LeftRoom : public Deserializable +{ +public: + inline State state() const; + inline Timeline timeline() const; + + void deserialize(const QJsonValue &data) override; + +private: + State state_; + Timeline timeline_; +}; + +inline State +LeftRoom::state() const +{ + return state_; +} + +inline Timeline +LeftRoom::timeline() const +{ + return timeline_; +} + // TODO: Add support for invited and left rooms. class Rooms : public Deserializable { public: inline QMap<QString, JoinedRoom> join() const; + inline QMap<QString, LeftRoom> leave() const; void deserialize(const QJsonValue &data) override; private: QMap<QString, JoinedRoom> join_; + QMap<QString, LeftRoom> leave_; }; inline QMap<QString, JoinedRoom> @@ -188,6 +215,12 @@ Rooms::join() const return join_; } +inline QMap<QString, LeftRoom> +Rooms::leave() const +{ + return leave_; +} + class SyncResponse : public Deserializable { public: |