aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/wellknown
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/wellknown')
-rw-r--r--lib/csapi/definitions/wellknown/homeserver.cpp24
-rw-r--r--lib/csapi/definitions/wellknown/homeserver.h28
-rw-r--r--lib/csapi/definitions/wellknown/identity_server.cpp24
-rw-r--r--lib/csapi/definitions/wellknown/identity_server.h28
4 files changed, 104 insertions, 0 deletions
diff --git a/lib/csapi/definitions/wellknown/homeserver.cpp b/lib/csapi/definitions/wellknown/homeserver.cpp
new file mode 100644
index 00000000..f1482ee4
--- /dev/null
+++ b/lib/csapi/definitions/wellknown/homeserver.cpp
@@ -0,0 +1,24 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#include "homeserver.h"
+
+using namespace QMatrixClient;
+
+QJsonObject QMatrixClient::toJson(const HomeserverInformation& pod)
+{
+ QJsonObject jo;
+ addParam<>(jo, QStringLiteral("base_url"), pod.baseUrl);
+ return jo;
+}
+
+HomeserverInformation FromJsonObject<HomeserverInformation>::operator()(const QJsonObject& jo) const
+{
+ HomeserverInformation result;
+ result.baseUrl =
+ fromJson<QString>(jo.value("base_url"_ls));
+
+ return result;
+}
+
diff --git a/lib/csapi/definitions/wellknown/homeserver.h b/lib/csapi/definitions/wellknown/homeserver.h
new file mode 100644
index 00000000..09d6ba63
--- /dev/null
+++ b/lib/csapi/definitions/wellknown/homeserver.h
@@ -0,0 +1,28 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#pragma once
+
+#include "converters.h"
+
+
+namespace QMatrixClient
+{
+ // Data structures
+
+ /// Used by clients to discover homeserver information.
+ struct HomeserverInformation
+ {
+ /// The base URL for the homeserver for client-server connections.
+ QString baseUrl;
+ };
+
+ QJsonObject toJson(const HomeserverInformation& pod);
+
+ template <> struct FromJsonObject<HomeserverInformation>
+ {
+ HomeserverInformation operator()(const QJsonObject& jo) const;
+ };
+
+} // namespace QMatrixClient
diff --git a/lib/csapi/definitions/wellknown/identity_server.cpp b/lib/csapi/definitions/wellknown/identity_server.cpp
new file mode 100644
index 00000000..f9d7bc37
--- /dev/null
+++ b/lib/csapi/definitions/wellknown/identity_server.cpp
@@ -0,0 +1,24 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#include "identity_server.h"
+
+using namespace QMatrixClient;
+
+QJsonObject QMatrixClient::toJson(const IdentityServerInformation& pod)
+{
+ QJsonObject jo;
+ addParam<>(jo, QStringLiteral("base_url"), pod.baseUrl);
+ return jo;
+}
+
+IdentityServerInformation FromJsonObject<IdentityServerInformation>::operator()(const QJsonObject& jo) const
+{
+ IdentityServerInformation result;
+ result.baseUrl =
+ fromJson<QString>(jo.value("base_url"_ls));
+
+ return result;
+}
+
diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h
new file mode 100644
index 00000000..cb8ffcee
--- /dev/null
+++ b/lib/csapi/definitions/wellknown/identity_server.h
@@ -0,0 +1,28 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#pragma once
+
+#include "converters.h"
+
+
+namespace QMatrixClient
+{
+ // Data structures
+
+ /// Used by clients to discover identity server information.
+ struct IdentityServerInformation
+ {
+ /// The base URL for the identity server for client-server connections.
+ QString baseUrl;
+ };
+
+ QJsonObject toJson(const IdentityServerInformation& pod);
+
+ template <> struct FromJsonObject<IdentityServerInformation>
+ {
+ IdentityServerInformation operator()(const QJsonObject& jo) const;
+ };
+
+} // namespace QMatrixClient