/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #include "room_state.h" #include "converters.h" #include using namespace QMatrixClient; static const auto basePath = QStringLiteral("/_matrix/client/r0"); class SetRoomStateWithKeyJob::Private { public: QString eventId; }; static const auto SetRoomStateWithKeyJobName = QStringLiteral("SetRoomStateWithKeyJob"); SetRoomStateWithKeyJob::SetRoomStateWithKeyJob(const QString& roomId, const QString& eventType, const QString& stateKey, const QJsonObject& body) : BaseJob(HttpVerb::Put, SetRoomStateWithKeyJobName, basePath % "/rooms/" % roomId % "/state/" % eventType % "/" % stateKey) , d(new Private) { setRequestData(Data(toJson(body))); } SetRoomStateWithKeyJob::~SetRoomStateWithKeyJob() = default; const QString& SetRoomStateWithKeyJob::eventId() const { return d->eventId; } BaseJob::Status SetRoomStateWithKeyJob::parseJson(const QJsonDocument& data) { auto json = data.object(); d->eventId = fromJson(json.value("event_id"_ls)); return Success; } class SetRoomStateJob::Private { public: QString eventId; }; static const auto SetRoomStateJobName = QStringLiteral("SetRoomStateJob"); SetRoomStateJob::SetRoomStateJob(const QString& roomId, const QString& eventType, const QJsonObject& body) : BaseJob(HttpVerb::Put, SetRoomStateJobName, basePath % "/rooms/" % roomId % "/state/" % eventType) , d(new Private) { setRequestData(Data(toJson(body))); } SetRoomStateJob::~SetRoomStateJob() = default; const QString& SetRoomStateJob::eventId() const { return d->eventId; } BaseJob::Status SetRoomStateJob::parseJson(const QJsonDocument& data) { auto json = data.object(); d->eventId = fromJson(json.value("event_id"_ls)); return Success; } 5522c4d010ec83052cd10ce085e09b4'/>
blob: 79ef769c67aea83cbb42fc8f763d4be36f71adfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19