aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/wellknown/full.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-11 21:07:21 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-11 21:07:21 +0900
commit63e2c0338e07cbc1939a5ad0f8047a9edab9b97c (patch)
treeb34779450d848ad431f1c82f50df77c38e37b56a /lib/csapi/definitions/wellknown/full.cpp
parente98ec84ab31b2dc656597ac5c87a8299b6c8aed8 (diff)
parent7337876aac42552da6d926b38d7466cf2e51b7d8 (diff)
downloadlibquotient-63e2c0338e07cbc1939a5ad0f8047a9edab9b97c.tar.gz
libquotient-63e2c0338e07cbc1939a5ad0f8047a9edab9b97c.zip
Merge branch 'kitsune-update-matrix-api'
Diffstat (limited to 'lib/csapi/definitions/wellknown/full.cpp')
-rw-r--r--lib/csapi/definitions/wellknown/full.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/csapi/definitions/wellknown/full.cpp b/lib/csapi/definitions/wellknown/full.cpp
new file mode 100644
index 00000000..5ecef34f
--- /dev/null
+++ b/lib/csapi/definitions/wellknown/full.cpp
@@ -0,0 +1,25 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#include "full.h"
+
+using namespace QMatrixClient;
+
+void JsonObjectConverter<DiscoveryInformation>::dumpTo(
+ QJsonObject& jo, const DiscoveryInformation& pod)
+{
+ fillJson(jo, pod.additionalProperties);
+ addParam<>(jo, QStringLiteral("m.homeserver"), pod.homeserver);
+ addParam<IfNotEmpty>(jo, QStringLiteral("m.identity_server"), pod.identityServer);
+}
+
+void JsonObjectConverter<DiscoveryInformation>::fillFrom(
+ QJsonObject jo, DiscoveryInformation& result)
+{
+ fromJson(jo.take("m.homeserver"_ls), result.homeserver);
+ fromJson(jo.take("m.identity_server"_ls), result.identityServer);
+
+ fromJson(jo, result.additionalProperties);
+}
+