aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/voip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/voip.cpp')
-rw-r--r--lib/csapi/voip.cpp39
1 files changed, 6 insertions, 33 deletions
diff --git a/lib/csapi/voip.cpp b/lib/csapi/voip.cpp
index e8158723..43170057 100644
--- a/lib/csapi/voip.cpp
+++ b/lib/csapi/voip.cpp
@@ -4,45 +4,18 @@
#include "voip.h"
-#include "converters.h"
-
#include <QtCore/QStringBuilder>
-using namespace QMatrixClient;
-
-static const auto basePath = QStringLiteral("/_matrix/client/r0");
-
-class GetTurnServerJob::Private
-{
- public:
- QJsonObject data;
-};
+using namespace Quotient;
QUrl GetTurnServerJob::makeRequestUrl(QUrl baseUrl)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/voip/turnServer");
+ QStringLiteral("/_matrix/client/r0")
+ % "/voip/turnServer");
}
-static const auto GetTurnServerJobName = QStringLiteral("GetTurnServerJob");
-
GetTurnServerJob::GetTurnServerJob()
- : BaseJob(HttpVerb::Get, GetTurnServerJobName,
- basePath % "/voip/turnServer")
- , d(new Private)
-{
-}
-
-GetTurnServerJob::~GetTurnServerJob() = default;
-
-const QJsonObject& GetTurnServerJob::data() const
-{
- return d->data;
-}
-
-BaseJob::Status GetTurnServerJob::parseJson(const QJsonDocument& data)
-{
- fromJson(data, d->data);
- return Success;
-}
-
+ : BaseJob(HttpVerb::Get, QStringLiteral("GetTurnServerJob"),
+ QStringLiteral("/_matrix/client/r0") % "/voip/turnServer")
+{}