aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/room_upgrades.h
blob: 6f712f10238f5ac8a258156c35f63e2e72c0a9d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "jobs/basejob.h"


namespace QMatrixClient
{
    // Operations

    /// Upgrades a room to a new room version.
    ///
    /// Upgrades the given room to a particular room version, migrating as much
    /// data as possible over to the new room. See the `room_upgrades <#room-upgrades>`_
    /// module for more information on what this entails.
    class UpgradeRoomJob : public BaseJob
    {
        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;

        private:
            class Private;
            QScopedPointer<Private> d;
    };
} // namespace QMatrixClient