diff options
Diffstat (limited to 'lib/csapi/room_upgrades.h')
-rw-r--r-- | lib/csapi/room_upgrades.h | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/lib/csapi/room_upgrades.h b/lib/csapi/room_upgrades.h index 4da5941a..58327587 100644 --- a/lib/csapi/room_upgrades.h +++ b/lib/csapi/room_upgrades.h @@ -6,36 +6,31 @@ #include "jobs/basejob.h" +namespace Quotient { -namespace QMatrixClient -{ - // Operations - - /// Upgrades a room to a new room version. - /// - /// Upgrades the given room to a particular room version. - class UpgradeRoomJob : public BaseJob +/*! \brief Upgrades a room to a new room version. + * + * Upgrades the given room to a particular room version. + */ +class UpgradeRoomJob : public BaseJob { +public: + /*! \brief Upgrades a room to a new room version. + * + * \param roomId + * The ID of the room to upgrade. + * + * \param newVersion + * The new version for the room. + */ + explicit UpgradeRoomJob(const QString& roomId, const QString& newVersion); + + // Result properties + + /// The ID of the new room. + QString replacementRoom() const { - public: - /*! Upgrades a room to a new room version. - * \param roomId - * The ID of the room to upgrade. - * \param newVersion - * The new version for the room. - */ - explicit UpgradeRoomJob(const QString& roomId, const QString& newVersion); - ~UpgradeRoomJob() override; - - // Result properties - - /// The ID of the new room. - const QString& replacementRoom() const; - - protected: - Status parseJson(const QJsonDocument& data) override; + return loadFromJson<QString>("replacement_room"_ls); + } +}; - private: - class Private; - QScopedPointer<Private> d; - }; -} // namespace QMatrixClient +} // namespace Quotient |