aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/wellknown/identity_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/wellknown/identity_server.h')
-rw-r--r--lib/csapi/definitions/wellknown/identity_server.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h
index cb8ffcee..885e3d34 100644
--- a/lib/csapi/definitions/wellknown/identity_server.h
+++ b/lib/csapi/definitions/wellknown/identity_server.h
@@ -6,23 +6,23 @@
#include "converters.h"
-
-namespace QMatrixClient
-{
- // Data structures
-
- /// Used by clients to discover identity server information.
- struct IdentityServerInformation
+namespace Quotient {
+/// Used by clients to discover identity server information.
+struct IdentityServerInformation {
+ /// The base URL for the identity server for client-server connections.
+ QUrl baseUrl;
+};
+
+template <>
+struct JsonObjectConverter<IdentityServerInformation> {
+ static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod)
{
- /// The base URL for the identity server for client-server connections.
- QString baseUrl;
- };
-
- QJsonObject toJson(const IdentityServerInformation& pod);
-
- template <> struct FromJsonObject<IdentityServerInformation>
+ addParam<>(jo, QStringLiteral("base_url"), pod.baseUrl);
+ }
+ static void fillFrom(const QJsonObject& jo, IdentityServerInformation& pod)
{
- IdentityServerInformation operator()(const QJsonObject& jo) const;
- };
+ fromJson(jo.value("base_url"_ls), pod.baseUrl);
+ }
+};
-} // namespace QMatrixClient
+} // namespace Quotient