aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/capabilities.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/capabilities.h')
-rw-r--r--lib/csapi/capabilities.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/csapi/capabilities.h b/lib/csapi/capabilities.h
index 40a2e6f7..39e2f4d1 100644
--- a/lib/csapi/capabilities.h
+++ b/lib/csapi/capabilities.h
@@ -6,6 +6,7 @@
#include "jobs/basejob.h"
+#include <QtCore/QJsonObject>
#include "converters.h"
#include <QtCore/QHash>
@@ -38,6 +39,19 @@ namespace QMatrixClient
QHash<QString, QString> available;
};
+ /// Gets information about the server's supported feature set
+ /// and other relevant capabilities.
+ struct Capabilities
+ {
+ /// Capability to indicate if the user can change their password.
+ Omittable<ChangePasswordCapability> changePassword;
+ /// The room versions the server supports.
+ Omittable<RoomVersionsCapability> roomVersions;
+ /// The custom capabilities the server supports, using the
+ /// Java package naming convention.
+ QHash<QString, QJsonObject> additionalProperties;
+ };
+
// Construction/destruction
explicit GetCapabilitiesJob();
@@ -54,10 +68,9 @@ namespace QMatrixClient
// Result properties
- /// Capability to indicate if the user can change their password.
- const Omittable<ChangePasswordCapability>& changePassword() const;
- /// The room versions the server supports.
- const Omittable<RoomVersionsCapability>& roomVersions() const;
+ /// Gets information about the server's supported feature set
+ /// and other relevant capabilities.
+ const Capabilities& capabilities() const;
protected:
Status parseJson(const QJsonDocument& data) override;