aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/presence.h
AgeCommit message (Expand)Author
2021-06-23Re-generate API filesAlexey Rusakov
2020-06-19csapi/: generated using the latest GTAD and matrix-docKitsune Ral
2020-06-07Update generated files according to gtad/* changesKitsune Ral
2020-04-17Regenerate API files using new GTAD and refreshed templatesKitsune Ral
2019-08-09Namespace: QMatrixClient -> Quotient (with back comp alias)Kitsune Ral
2019-06-24Merge branch 'master' into clang-formatKitsune Ral
2019-03-02style: apply .clang-format to all .cpp and .h filesMarc Deop
2019-02-09csapi: presence lists are no moreKitsune Ral
2018-12-13Regenerate csapi/Kitsune Ral
2018-09-29Prepare for CS API 0.4.0Kitsune Ral
2018-07-18csapi: Doxy-comments thanks to the latest GTADKitsune Ral
2018-07-04Break down event.* into smaller filesKitsune Ral
2018-06-03csapi: PeekEventsJob, ReportContentJob, presence jobsKitsune Ral
lor: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "jobs/basejob.h"

namespace Quotient {

/*! \brief Invite a user to participate in a particular room.
 *
 * *Note that there are two forms of this API, which are documented separately.
 * This version of the API does not require that the inviter know the Matrix
 * identifier of the invitee, and instead relies on third party identifiers.
 * The homeserver uses an identity server to perform the mapping from
 * third party identifier to a Matrix identifier. The other is documented in
 * the* [joining rooms
 * section](/client-server-api/#post_matrixclientr0roomsroomidinvite).
 *
 * This API invites a user to participate in a particular room.
 * They do not start participating in the room until they actually join the
 * room.
 *
 * Only users currently in a particular room can invite other users to
 * join that room.
 *
 * If the identity server did know the Matrix user identifier for the
 * third party identifier, the homeserver will append a `m.room.member`
 * event to the room.
 *
 * If the identity server does not know a Matrix user identifier for the
 * passed third party identifier, the homeserver will issue an invitation
 * which can be accepted upon providing proof of ownership of the third
 * party identifier. This is achieved by the identity server generating a
 * token, which it gives to the inviting homeserver. The homeserver will
 * add an `m.room.third_party_invite` event into the graph for the room,
 * containing that token.
 *
 * When the invitee binds the invited third party identifier to a Matrix
 * user ID, the identity server will give the user a list of pending
 * invitations, each containing:
 *
 * - The room ID to which they were invited
 *
 * - The token given to the homeserver
 *
 * - A signature of the token, signed with the identity server's private key
 *
 * - The matrix user ID who invited them to the room
 *
 * If a token is requested from the identity server, the homeserver will
 * append a `m.room.third_party_invite` event to the room.
 */
class QUOTIENT_API InviteBy3PIDJob : public BaseJob {
public:
    /*! \brief Invite a user to participate in a particular room.
     *
     * \param roomId
     *   The room identifier (not alias) to which to invite the user.
     *
     * \param idServer
     *   The hostname+port of the identity server which should be used for third
     * party identifier lookups.
     *
     * \param idAccessToken
     *   An access token previously registered with the identity server. Servers
     *   can treat this as optional to distinguish between r0.5-compatible
     * clients and this specification version.
     *
     * \param medium
     *   The kind of address being passed in the address field, for example
     * `email`.
     *
     * \param address
     *   The invitee's third party identifier.
     */
    explicit InviteBy3PIDJob(const QString& roomId, const QString& idServer,
                             const QString& idAccessToken,
                             const QString& medium, const QString& address);
};

} // namespace Quotient