libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
capabilities.h
Go to the documentation of this file.
1// THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2
3#pragma once
4
5#include <Quotient/jobs/basejob.h>
6
7namespace Quotient {
8
10 //! True if the user can perform the action, false otherwise.
11 bool enabled;
12};
13
14template <>
16 static void dumpTo(QJsonObject& jo, const BooleanCapability& pod)
17 {
18 addParam(jo, "enabled"_L1, pod.enabled);
19 }
20 static void fillFrom(const QJsonObject& jo, BooleanCapability& pod)
21 {
22 fillFromJson(jo.value("enabled"_L1), pod.enabled);
23 }
24};
25
26//! \brief Gets information about the server's capabilities.
27//!
28//! Gets information about the server's supported feature set
29//! and other relevant capabilities.
31public:
32 // Inner data structures
33
34 //! The room versions the server supports.
36 //! The default room version the server is using for new rooms.
38
39 //! A detailed description of the room versions the server supports.
41 };
42
43 //! The custom capabilities the server supports, using the
44 //! Java package naming convention.
46 //! Capability to indicate if the user can change their password.
48
49 //! The room versions the server supports.
51
52 //! Capability to indicate if the user can change their display name.
54
55 //! Capability to indicate if the user can change their avatar.
57
58 //! Capability to indicate if the user can change 3PID associations on their account.
60
61 //! Capability to indicate if the user can generate tokens to log further clients into their
62 //! account.
64
65 //! Application-dependent keys using the
66 //! [Common Namespaced Identifier
67 //! Grammar](/appendices/#common-namespaced-identifier-grammar).
69 };
70
71 // Construction/destruction
72
74
75 //! \brief Construct a URL without creating a full-fledged job object
76 //!
77 //! This function can be used when a URL for GetCapabilitiesJob
78 //! is necessary but the job itself isn't.
80
81 // Result properties
82
83 //! The custom capabilities the server supports, using the
84 //! Java package naming convention.
85 Capabilities capabilities() const { return loadFromJson<Capabilities>("capabilities"_L1); }
86};
87
88inline auto collectResponse(const GetCapabilitiesJob* job) { return job->capabilities(); }
89
90template <>
93 {
95 fillFromJson(jo.value("available"_L1), result.available);
96 }
97};
98
99template <>
102 {
103 fillFromJson(jo.take("m.change_password"_L1), result.changePassword);
104 fillFromJson(jo.take("m.room_versions"_L1), result.roomVersions);
105 fillFromJson(jo.take("m.set_displayname"_L1), result.setDisplayname);
106 fillFromJson(jo.take("m.set_avatar_url"_L1), result.setAvatarUrl);
107 fillFromJson(jo.take("m.3pid_changes"_L1), result.thirdPartyIdChanges);
108 fillFromJson(jo.take("m.get_login_token"_L1), result.getLoginToken);
110 }
111};
112
113} // namespace Quotient
Gets information about the server's capabilities.
auto collectResponse(const GetAccountDataJob *job)
#define QUOTIENT_API