aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/voip.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-09 08:52:25 +0200
committerGitHub <noreply@github.com>2020-06-09 08:52:25 +0200
commit370d9b3e46332d38df8798cda208c534c58be808 (patch)
treef3db0cd7463468ff52c74446acd608356f8b8ab6 /lib/csapi/voip.cpp
parente1f5d0aa2c33e6da6c3a609c8bc7e0b5867e748d (diff)
parent10d9ac4673e374a9ac17ff492591136520337c4c (diff)
downloadlibquotient-370d9b3e46332d38df8798cda208c534c58be808.tar.gz
libquotient-370d9b3e46332d38df8798cda208c534c58be808.zip
Merge pull request #405 from quotient-im/kitsune-basejob-store-json-response
Store JSON response in BaseJob + tweaks to the generated code
Diffstat (limited to 'lib/csapi/voip.cpp')
-rw-r--r--lib/csapi/voip.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/lib/csapi/voip.cpp b/lib/csapi/voip.cpp
index c98824b3..43170057 100644
--- a/lib/csapi/voip.cpp
+++ b/lib/csapi/voip.cpp
@@ -4,38 +4,18 @@
#include "voip.h"
-#include "converters.h"
-
#include <QtCore/QStringBuilder>
using namespace Quotient;
-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");
+ QStringLiteral("/_matrix/client/r0")
+ % "/voip/turnServer");
}
GetTurnServerJob::GetTurnServerJob()
: BaseJob(HttpVerb::Get, QStringLiteral("GetTurnServerJob"),
- basePath % "/voip/turnServer")
- , d(new Private)
+ QStringLiteral("/_matrix/client/r0") % "/voip/turnServer")
{}
-
-GetTurnServerJob::~GetTurnServerJob() = default;
-
-const QJsonObject& GetTurnServerJob::data() const { return d->data; }
-
-BaseJob::Status GetTurnServerJob::parseJson(const QJsonDocument& data)
-{
- fromJson(data, d->data);
-
- return Success;
-}