aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/report_content.h
blob: c86a4301eeb2ff35cb9c31fe6331b2a773e38647 (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
35
36
37
38
39
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "converters.h"

#include "jobs/basejob.h"

namespace Quotient
{

// Operations

/// Reports an event as inappropriate.
/*!
 * Reports an event as inappropriate to the server, which may then notify
 * the appropriate people.
 */
class ReportContentJob : public BaseJob
{
public:
    /*! Reports an event as inappropriate.
     * \param roomId
     *   The room in which the event being reported is located.
     * \param eventId
     *   The event to report.
     * \param score
     *   The score to rate this content as where -100 is most offensive
     *   and 0 is inoffensive.
     * \param reason
     *   The reason the content is being reported. May be blank.
     */
    explicit ReportContentJob(const QString& roomId, const QString& eventId,
                              int score, const QString& reason);
};

} // namespace Quotient
n> namespace QMatrixClient { // Operations /// Set some account_data for the user. /// /// Set some account_data for the client. This config is only visible to the user /// that set the account_data. The config will be synced to clients in the /// top-level ``account_data``. class SetAccountDataJob : public BaseJob { public: /*! Set some account_data for the user. * \param userId * The ID of the user to set account_data for. The access token must be * authorized to make requests for this user ID. * \param type * The event type of the account_data to set. Custom types should be * namespaced to avoid clashes. * \param content * The content of the account_data */ explicit SetAccountDataJob(const QString& userId, const QString& type, const QJsonObject& content = {}); }; /// Get some account_data for the user. /// /// Get some account_data for the client. This config is only visible to the user /// that set the account_data. class GetAccountDataJob : public BaseJob { public: /*! Get some account_data for the user. * \param userId * The ID of the user to get account_data for. The access token must be * authorized to make requests for this user ID. * \param type * The event type of the account_data to get. Custom types should be * namespaced to avoid clashes. */ explicit GetAccountDataJob(const QString& userId, const QString& type); /*! Construct a URL without creating a full-fledged job object * * This function can be used when a URL for * GetAccountDataJob is necessary but the job * itself isn't. */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId, const QString& type); }; /// Set some account_data for the user. /// /// Set some account_data for the client on a given room. This config is only /// visible to the user that set the account_data. The config will be synced to /// clients in the per-room ``account_data``. class SetAccountDataPerRoomJob : public BaseJob { public: /*! Set some account_data for the user. * \param userId * The ID of the user to set account_data for. The access token must be * authorized to make requests for this user ID. * \param roomId * The ID of the room to set account_data on. * \param type * The event type of the account_data to set. Custom types should be * namespaced to avoid clashes. * \param content * The content of the account_data */ explicit SetAccountDataPerRoomJob(const QString& userId, const QString& roomId, const QString& type, const QJsonObject& content = {}); }; /// Get some account_data for the user. /// /// Get some account_data for the client on a given room. This config is only /// visible to the user that set the account_data. class GetAccountDataPerRoomJob : public BaseJob { public: /*! Get some account_data for the user. * \param userId * The ID of the user to set account_data for. The access token must be * authorized to make requests for this user ID. * \param roomId * The ID of the room to get account_data for. * \param type * The event type of the account_data to get. Custom types should be * namespaced to avoid clashes. */ explicit GetAccountDataPerRoomJob(const QString& userId, const QString& roomId, const QString& type); /*! Construct a URL without creating a full-fledged job object * * This function can be used when a URL for * GetAccountDataPerRoomJob is necessary but the job * itself isn't. */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId, const QString& roomId, const QString& type); }; } // namespace QMatrixClient