libQuotient
A Qt library for building matrix clients
room_upgrades.h
Go to the documentation of this file.
1 // THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2 
3 #pragma once
4 
5 #include <Quotient/jobs/basejob.h>
6 
7 namespace Quotient {
8 
9 //! \brief Upgrades a room to a new room version.
10 //!
11 //! Upgrades the given room to a particular room version.
12 class QUOTIENT_API UpgradeRoomJob : public BaseJob {
13 public:
14  //! \param roomId
15  //! The ID of the room to upgrade.
16  //!
17  //! \param newVersion
18  //! The new version for the room.
19  explicit UpgradeRoomJob(const QString& roomId, const QString& newVersion);
20 
21  // Result properties
22 
23  //! The ID of the new room.
24  QString replacementRoom() const { return loadFromJson<QString>("replacement_room"_L1); }
25 };
26 
27 inline auto collectResponse(const UpgradeRoomJob* job) { return job->replacementRoom(); }
28 
29 } // namespace Quotient