81 , std::string _accessToken
103 using namespace Kazv;
110 if (! jo.is_object()) { jo = json::object(); }
120 if (jo.contains(
"enabled"s)) {
121 result.
enabled = jo.at(
"enabled"s);
132 if (! jo.is_object()) { jo = json::object(); }
144 if (jo.contains(
"default"s)) {
147 if (jo.contains(
"available"s)) {
159 if (! jo.is_object()) { jo = json::object(); }
171 if (jo.contains(
"m.change_password"s)) {
174 if (jo.contains(
"m.room_versions"s)) {
Definition: capabilities.hpp:55
JobResponse(Response r)
Definition: capabilities.cpp:67
bool success() const
Definition: capabilities.cpp:70
Capabilities capabilities() const
The custom capabilities the server supports, using the Java package naming convention.
Definition: capabilities.cpp:81
Gets information about the server's capabilities.
Definition: capabilities.hpp:17
GetCapabilitiesJob withData(JsonWrap j) &&
Definition: capabilities.cpp:53
GetCapabilitiesJob(std::string serverUrl, std::string _accessToken)
Gets information about the server's capabilities.
Definition: capabilities.cpp:33
static BaseJob::Body buildBody()
Definition: capabilities.cpp:21
static constexpr auto needsAuth()
Definition: capabilities.hpp:71
static BaseJob::Query buildQuery()
Definition: capabilities.cpp:13
Definition: basejob.hpp:91
Definition: basejob.hpp:77
::Kazv::Body Body
Definition: basejob.hpp:100
Definition: jsonwrap.hpp:23
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
void addPropertyMapToJson(json &j, MapT &&arg)
Definition: types.hpp:91
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
The custom capabilities the server supports, using the Java package naming convention.
Definition: capabilities.hpp:42
immer::map< std::string, JsonWrap > additionalProperties
The custom capabilities the server supports, using the Java package naming convention.
Definition: capabilities.hpp:49
std::optional< ChangePasswordCapability > changePassword
Capability to indicate if the user can change their password.
Definition: capabilities.hpp:44
std::optional< RoomVersionsCapability > roomVersions
The room versions the server supports.
Definition: capabilities.hpp:46
Capability to indicate if the user can change their password.
Definition: capabilities.hpp:23
bool enabled
True if the user can change their password, false otherwise.
Definition: capabilities.hpp:25
The room versions the server supports.
Definition: capabilities.hpp:31
immer::map< std::string, std::string > available
A detailed description of the room versions the server supports.
Definition: capabilities.hpp:35
std::string defaultVersion
The default room version the server is using for new rooms.
Definition: capabilities.hpp:33
Definition: basejob.hpp:50
static void from_json(const json &jo, GetCapabilitiesJob::Capabilities &result)
Definition: capabilities.hpp:168
static void to_json(json &jo, const GetCapabilitiesJob::Capabilities &pod)
Definition: capabilities.hpp:157
static void to_json(json &jo, const GetCapabilitiesJob::ChangePasswordCapability &pod)
Definition: capabilities.hpp:108
static void from_json(const json &jo, GetCapabilitiesJob::ChangePasswordCapability &result)
Definition: capabilities.hpp:117
static void to_json(json &jo, const GetCapabilitiesJob::RoomVersionsCapability &pod)
Definition: capabilities.hpp:130
static void from_json(const json &jo, GetCapabilitiesJob::RoomVersionsCapability &result)
Definition: capabilities.hpp:141