aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/presence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/presence.cpp')
0 files changed, 0 insertions, 0 deletions
n74' href='#n74'>74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "jobs/basejob.h"

namespace Quotient {

/*! \brief 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:
    /*! \brief 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 = {});
};

/*! \brief 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:
    /*! \brief 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);

    /*! \brief 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);
};

/*! \brief 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:
    /*! \brief 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 = {});
};

/*! \brief 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:
    /*! \brief 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);

    /*! \brief 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 Quotient