/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #include "voip.h" #include "converters.h" #include using namespace QMatrixClient; static const auto basePath = QStringLiteral("/_matrix/client/r0"); class GetTurnServerJob::Private { public: QJsonObject data; }; QUrl GetTurnServerJob::makeRequestUrl(QUrl baseUrl) { return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/voip/turnServer"); } GetTurnServerJob::GetTurnServerJob() : BaseJob(HttpVerb::Get, "GetTurnServerJob", basePath % "/voip/turnServer") , d(new Private) { } GetTurnServerJob::~GetTurnServerJob() = default; const QJsonObject& GetTurnServerJob::data() const { return d->data; } BaseJob::Status GetTurnServerJob::parseJson(const QJsonDocument& data) { auto json = data.object(); if (!json.contains("data")) return { JsonParseError, "The key 'data' not found in the response" }; d->data = fromJson(json.value("data")); return Success; }