1 | /****************************************************************************** |
2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
3 | */ |
4 | |
5 | #pragma once |
6 | |
7 | #include <Quotient/jobs/basejob.h> |
8 | |
9 | namespace Quotient { |
10 | |
11 | /*! \brief Stop the requesting user participating in a particular room. |
12 | * |
13 | * This API stops a user participating in a particular room. |
14 | * |
15 | * If the user was already in the room, they will no longer be able to see |
16 | * new events in the room. If the room requires an invite to join, they |
17 | * will need to be re-invited before they can re-join. |
18 | * |
19 | * If the user was invited to the room, but had not joined, this call |
20 | * serves to reject the invite. |
21 | * |
22 | * The user will still be allowed to retrieve history from the room which |
23 | * they were previously allowed to see. |
24 | */ |
25 | class QUOTIENT_API LeaveRoomJob : public BaseJob { |
26 | public: |
27 | /*! \brief Stop the requesting user participating in a particular room. |
28 | * |
29 | * \param roomId |
30 | * The room identifier to leave. |
31 | * |
32 | * \param reason |
33 | * Optional reason to be included as the `reason` on the subsequent |
34 | * membership event. |
35 | */ |
36 | explicit LeaveRoomJob(const QString& roomId, const QString& reason = {}); |
37 | }; |
38 | |
39 | /*! \brief Stop the requesting user remembering about a particular room. |
40 | * |
41 | * This API stops a user remembering about a particular room. |
42 | * |
43 | * In general, history is a first class citizen in Matrix. After this API |
44 | * is called, however, a user will no longer be able to retrieve history |
45 | * for this room. If all users on a homeserver forget a room, the room is |
46 | * eligible for deletion from that homeserver. |
47 | * |
48 | * If the user is currently joined to the room, they must leave the room |
49 | * before calling this API. |
50 | */ |
51 | class QUOTIENT_API ForgetRoomJob : public BaseJob { |
52 | public: |
53 | /*! \brief Stop the requesting user remembering about a particular room. |
54 | * |
55 | * \param roomId |
56 | * The room identifier to forget. |
57 | */ |
58 | explicit ForgetRoomJob(const QString& roomId); |
59 | |
60 | /*! \brief Construct a URL without creating a full-fledged job object |
61 | * |
62 | * This function can be used when a URL for ForgetRoomJob |
63 | * is necessary but the job itself isn't. |
64 | */ |
65 | static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId); |
66 | }; |
67 | |
68 | } // namespace Quotient |
69 | |