aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/voip.h
blob: 38904f60ea05a32466939ccecd3fbb317fc410c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "jobs/basejob.h"

namespace Quotient {

/*! \brief Obtain TURN server credentials.
 *
 * This API provides credentials for the client to use when initiating
 * calls.
 */
class QUOTIENT_API GetTurnServerJob : public BaseJob {
public:
    /// Obtain TURN server credentials.
    explicit GetTurnServerJob();

    /*! \brief Construct a URL without creating a full-fledged job object
     *
     * This function can be used when a URL for GetTurnServerJob
     * is necessary but the job itself isn't.
     */
    static QUrl makeRequestUrl(QUrl baseUrl);

    // Result properties

    /// The TURN server credentials.
    QJsonObject data() const { return fromJson<QJsonObject>(jsonData()); }
};

} // namespace Quotient
n class="p">, const QString& roomId) { return BaseJob::makeRequestUrl(std::move(baseUrl), makePath("/_matrix/client/r0", "/directory/list/room/", roomId)); } GetRoomVisibilityOnDirectoryJob::GetRoomVisibilityOnDirectoryJob( const QString& roomId) : BaseJob(HttpVerb::Get, QStringLiteral("GetRoomVisibilityOnDirectoryJob"), makePath("/_matrix/client/r0", "/directory/list/room/", roomId), false) {} SetRoomVisibilityOnDirectoryJob::SetRoomVisibilityOnDirectoryJob( const QString& roomId, const QString& visibility) : BaseJob(HttpVerb::Put, QStringLiteral("SetRoomVisibilityOnDirectoryJob"), makePath("/_matrix/client/r0", "/directory/list/room/", roomId)) { QJsonObject _data; addParam<IfNotEmpty>(_data, QStringLiteral("visibility"), visibility); setRequestData(std::move(_data)); } auto queryToGetPublicRooms(Omittable<int> limit, const QString& since, const QString& server) { QUrlQuery _q; addParam<IfNotEmpty>(_q, QStringLiteral("limit"), limit); addParam<IfNotEmpty>(_q, QStringLiteral("since"), since); addParam<IfNotEmpty>(_q, QStringLiteral("server"), server); return _q; } QUrl GetPublicRoomsJob::makeRequestUrl(QUrl baseUrl, Omittable<int> limit, const QString& since, const QString& server) { return BaseJob::makeRequestUrl(std::move(baseUrl), makePath("/_matrix/client/r0", "/publicRooms"), queryToGetPublicRooms(limit, since, server)); } GetPublicRoomsJob::GetPublicRoomsJob(Omittable<int> limit, const QString& since, const QString& server) : BaseJob(HttpVerb::Get, QStringLiteral("GetPublicRoomsJob"), makePath("/_matrix/client/r0", "/publicRooms"), queryToGetPublicRooms(limit, since, server), {}, false) { addExpectedKey("chunk"); } auto queryToQueryPublicRooms(const QString& server) { QUrlQuery _q; addParam<IfNotEmpty>(_q, QStringLiteral("server"), server); return _q; } QueryPublicRoomsJob::QueryPublicRoomsJob(const QString& server, Omittable<int> limit, const QString& since, const Omittable<Filter>& filter, Omittable<bool> includeAllNetworks, const QString& thirdPartyInstanceId) : BaseJob(HttpVerb::Post, QStringLiteral("QueryPublicRoomsJob"), makePath("/_matrix/client/r0", "/publicRooms"), queryToQueryPublicRooms(server)) { QJsonObject _data; addParam<IfNotEmpty>(_data, QStringLiteral("limit"), limit); addParam<IfNotEmpty>(_data, QStringLiteral("since"), since); addParam<IfNotEmpty>(_data, QStringLiteral("filter"), filter); addParam<IfNotEmpty>(_data, QStringLiteral("include_all_networks"), includeAllNetworks); addParam<IfNotEmpty>(_data, QStringLiteral("third_party_instance_id"), thirdPartyInstanceId); setRequestData(std::move(_data)); addExpectedKey("chunk"); }