| 1 | /****************************************************************************** |
| 2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
| 3 | */ |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | #include <Quotient/jobs/basejob.h> |
| 8 | |
| 9 | namespace Quotient { |
| 10 | |
| 11 | /*! \brief Set some account data for the user. |
| 12 | * |
| 13 | * Set some account data for the client. This config is only visible to the user |
| 14 | * that set the account data. The config will be available to clients through |
| 15 | * the top-level `account_data` field in the homeserver response to |
| 16 | * [/sync](#get_matrixclientv3sync). |
| 17 | */ |
| 18 | class QUOTIENT_API SetAccountDataJob : public BaseJob { |
| 19 | public: |
| 20 | /*! \brief Set some account data for the user. |
| 21 | * |
| 22 | * \param userId |
| 23 | * The ID of the user to set account data for. The access token must be |
| 24 | * authorized to make requests for this user ID. |
| 25 | * |
| 26 | * \param type |
| 27 | * The event type of the account data to set. Custom types should be |
| 28 | * namespaced to avoid clashes. |
| 29 | * |
| 30 | * \param content |
| 31 | * The content of the account data. |
| 32 | */ |
| 33 | explicit SetAccountDataJob(const QString& userId, const QString& type, |
| 34 | const QJsonObject& content = {}); |
| 35 | }; |
| 36 | |
| 37 | /*! \brief Get some account data for the user. |
| 38 | * |
| 39 | * Get some account data for the client. This config is only visible to the user |
| 40 | * that set the account data. |
| 41 | */ |
| 42 | class QUOTIENT_API GetAccountDataJob : public BaseJob { |
| 43 | public: |
| 44 | /*! \brief Get some account data for the user. |
| 45 | * |
| 46 | * \param userId |
| 47 | * The ID of the user to get account data for. The access token must be |
| 48 | * authorized to make requests for this user ID. |
| 49 | * |
| 50 | * \param type |
| 51 | * The event type of the account data to get. Custom types should be |
| 52 | * namespaced to avoid clashes. |
| 53 | */ |
| 54 | explicit GetAccountDataJob(const QString& userId, const QString& type); |
| 55 | |
| 56 | /*! \brief Construct a URL without creating a full-fledged job object |
| 57 | * |
| 58 | * This function can be used when a URL for GetAccountDataJob |
| 59 | * is necessary but the job itself isn't. |
| 60 | */ |
| 61 | static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId, |
| 62 | const QString& type); |
| 63 | }; |
| 64 | |
| 65 | /*! \brief Set some account data for the user that is specific to a room. |
| 66 | * |
| 67 | * Set some account data for the client on a given room. This config is only |
| 68 | * visible to the user that set the account data. The config will be delivered |
| 69 | * to clients in the per-room entries via [/sync](#get_matrixclientv3sync). |
| 70 | */ |
| 71 | class QUOTIENT_API SetAccountDataPerRoomJob : public BaseJob { |
| 72 | public: |
| 73 | /*! \brief Set some account data for the user that is specific to a room. |
| 74 | * |
| 75 | * \param userId |
| 76 | * The ID of the user to set account data for. The access token must be |
| 77 | * authorized to make requests for this user ID. |
| 78 | * |
| 79 | * \param roomId |
| 80 | * The ID of the room to set account data on. |
| 81 | * |
| 82 | * \param type |
| 83 | * The event type of the account data to set. Custom types should be |
| 84 | * namespaced to avoid clashes. |
| 85 | * |
| 86 | * \param content |
| 87 | * The content of the account data. |
| 88 | */ |
| 89 | explicit SetAccountDataPerRoomJob(const QString& userId, |
| 90 | const QString& roomId, const QString& type, |
| 91 | const QJsonObject& content = {}); |
| 92 | }; |
| 93 | |
| 94 | /*! \brief Get some account data for the user that is specific to a room. |
| 95 | * |
| 96 | * Get some account data for the client on a given room. This config is only |
| 97 | * visible to the user that set the account data. |
| 98 | */ |
| 99 | class QUOTIENT_API GetAccountDataPerRoomJob : public BaseJob { |
| 100 | public: |
| 101 | /*! \brief Get some account data for the user that is specific to a room. |
| 102 | * |
| 103 | * \param userId |
| 104 | * The ID of the user to get account data for. The access token must be |
| 105 | * authorized to make requests for this user ID. |
| 106 | * |
| 107 | * \param roomId |
| 108 | * The ID of the room to get account data for. |
| 109 | * |
| 110 | * \param type |
| 111 | * The event type of the account data to get. Custom types should be |
| 112 | * namespaced to avoid clashes. |
| 113 | */ |
| 114 | explicit GetAccountDataPerRoomJob(const QString& userId, |
| 115 | const QString& roomId, |
| 116 | const QString& type); |
| 117 | |
| 118 | /*! \brief Construct a URL without creating a full-fledged job object |
| 119 | * |
| 120 | * This function can be used when a URL for GetAccountDataPerRoomJob |
| 121 | * is necessary but the job itself isn't. |
| 122 | */ |
| 123 | static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId, |
| 124 | const QString& roomId, const QString& type); |
| 125 | }; |
| 126 | |
| 127 | } // namespace Quotient |
| 128 | |