From aacc4bcb4a487871daae6717f77605aaba444341 Mon Sep 17 00:00:00 2001 From: Marc Deop Date: Sat, 2 Mar 2019 12:26:57 +0100 Subject: style: apply .clang-format to all .cpp and .h files --- lib/csapi/definitions/wellknown/full.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'lib/csapi/definitions/wellknown/full.h') diff --git a/lib/csapi/definitions/wellknown/full.h b/lib/csapi/definitions/wellknown/full.h index d9346acb..9b920eda 100644 --- a/lib/csapi/definitions/wellknown/full.h +++ b/lib/csapi/definitions/wellknown/full.h @@ -6,31 +6,28 @@ #include "converters.h" -#include #include "converters.h" #include "csapi/definitions/wellknown/homeserver.h" #include "csapi/definitions/wellknown/identity_server.h" #include +#include -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures /// Used by clients to determine the homeserver, identity server, and other /// optional components they should be interacting with. - struct DiscoveryInformation - { - /// Used by clients to determine the homeserver, identity server, and other - /// optional components they should be interacting with. + struct DiscoveryInformation { + /// Used by clients to determine the homeserver, identity server, and + /// other optional components they should be interacting with. HomeserverInformation homeserver; - /// Used by clients to determine the homeserver, identity server, and other - /// optional components they should be interacting with. + /// Used by clients to determine the homeserver, identity server, and + /// other optional components they should be interacting with. Omittable identityServer; /// Application-dependent keys using Java package naming convention. QHash additionalProperties; }; - template <> struct JsonObjectConverter - { + template <> struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const DiscoveryInformation& pod); static void fillFrom(QJsonObject jo, DiscoveryInformation& pod); }; -- cgit v1.2.3 From 9e96bc9b8dec6613e3e2f2fd564e9f6bee9bbce4 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 24 Jun 2019 07:38:50 +0900 Subject: csapi/*/**: clang-format contents of csapi subdirs as well --- lib/csapi/definitions/wellknown/full.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'lib/csapi/definitions/wellknown/full.h') diff --git a/lib/csapi/definitions/wellknown/full.h b/lib/csapi/definitions/wellknown/full.h index ef975969..ddc06653 100644 --- a/lib/csapi/definitions/wellknown/full.h +++ b/lib/csapi/definitions/wellknown/full.h @@ -4,40 +4,39 @@ #pragma once - - #include "converters.h" -#include -#include "converters.h" #include "csapi/definitions/wellknown/homeserver.h" #include "csapi/definitions/wellknown/identity_server.h" + #include +#include namespace QMatrixClient { // Data structures -/// Used by clients to determine the homeserver, identity server, and other/// optional components they should be interacting with. +/// Used by clients to determine the homeserver, identity server, and other/// +/// optional components they should be interacting with. struct DiscoveryInformation { - /// Used by clients to determine the homeserver, identity server, and otheroptional components they should be interacting with. + /// Used by clients to determine the homeserver, identity server, and + /// otheroptional components they should be interacting with. HomeserverInformation homeserver; - /// Used by clients to determine the homeserver, identity server, and otheroptional components they should be interacting with. + /// Used by clients to determine the homeserver, identity server, and + /// otheroptional components they should be interacting with. Omittable identityServer; - /// Application-dependent keys using Java package naming convention. QHash additionalProperties; - }; -template <> struct JsonObjectConverter +template <> +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const DiscoveryInformation& pod); - static void fillFrom(QJsonObject jo, DiscoveryInformation& pod);}; - - + static void fillFrom(QJsonObject jo, DiscoveryInformation& pod); +}; } // namespace QMatrixClient -- cgit v1.2.3 From 27ca32a1e5a56e09b9cc1d94224d2831004dcf3d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jul 2019 19:32:34 +0900 Subject: Namespace: QMatrixClient -> Quotient (with back comp alias) --- lib/csapi/definitions/wellknown/full.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/csapi/definitions/wellknown/full.h') diff --git a/lib/csapi/definitions/wellknown/full.h b/lib/csapi/definitions/wellknown/full.h index ddc06653..92c8afff 100644 --- a/lib/csapi/definitions/wellknown/full.h +++ b/lib/csapi/definitions/wellknown/full.h @@ -12,7 +12,7 @@ #include #include -namespace QMatrixClient +namespace Quotient { // Data structures @@ -39,4 +39,4 @@ struct JsonObjectConverter static void fillFrom(QJsonObject jo, DiscoveryInformation& pod); }; -} // namespace QMatrixClient +} // namespace Quotient -- cgit v1.2.3 From 7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 17 Apr 2020 07:42:13 +0200 Subject: Regenerate API files using new GTAD and refreshed templates No functional changes. --- lib/csapi/definitions/wellknown/full.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'lib/csapi/definitions/wellknown/full.h') diff --git a/lib/csapi/definitions/wellknown/full.h b/lib/csapi/definitions/wellknown/full.h index 92c8afff..88d7da79 100644 --- a/lib/csapi/definitions/wellknown/full.h +++ b/lib/csapi/definitions/wellknown/full.h @@ -12,20 +12,19 @@ #include #include -namespace Quotient -{ +namespace Quotient { // Data structures -/// Used by clients to determine the homeserver, identity server, and other/// +/// Used by clients to determine the homeserver, identity server, and other /// optional components they should be interacting with. -struct DiscoveryInformation -{ - /// Used by clients to determine the homeserver, identity server, and - /// otheroptional components they should be interacting with. +struct DiscoveryInformation { + /// Used by clients to determine the homeserver, identity server, and other + /// optional components they should be interacting with. HomeserverInformation homeserver; - /// Used by clients to determine the homeserver, identity server, and - /// otheroptional components they should be interacting with. + + /// Used by clients to determine the homeserver, identity server, and other + /// optional components they should be interacting with. Omittable identityServer; /// Application-dependent keys using Java package naming convention. @@ -33,8 +32,7 @@ struct DiscoveryInformation }; template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const DiscoveryInformation& pod); static void fillFrom(QJsonObject jo, DiscoveryInformation& pod); }; -- cgit v1.2.3 From 32729d9a7519cd2c4cddb0174b8329c6fd4a4a83 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jun 2020 19:46:40 +0200 Subject: Update generated files according to gtad/* changes --- lib/csapi/definitions/wellknown/full.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'lib/csapi/definitions/wellknown/full.h') diff --git a/lib/csapi/definitions/wellknown/full.h b/lib/csapi/definitions/wellknown/full.h index 88d7da79..a0ef2076 100644 --- a/lib/csapi/definitions/wellknown/full.h +++ b/lib/csapi/definitions/wellknown/full.h @@ -9,13 +9,7 @@ #include "csapi/definitions/wellknown/homeserver.h" #include "csapi/definitions/wellknown/identity_server.h" -#include -#include - namespace Quotient { - -// Data structures - /// Used by clients to determine the homeserver, identity server, and other /// optional components they should be interacting with. struct DiscoveryInformation { @@ -33,8 +27,19 @@ struct DiscoveryInformation { template <> struct JsonObjectConverter { - static void dumpTo(QJsonObject& jo, const DiscoveryInformation& pod); - static void fillFrom(QJsonObject jo, DiscoveryInformation& pod); + static void dumpTo(QJsonObject& jo, const DiscoveryInformation& pod) + { + fillJson(jo, pod.additionalProperties); + addParam<>(jo, QStringLiteral("m.homeserver"), pod.homeserver); + addParam(jo, QStringLiteral("m.identity_server"), + pod.identityServer); + } + static void fillFrom(QJsonObject jo, DiscoveryInformation& pod) + { + fromJson(jo.take("m.homeserver"_ls), pod.homeserver); + fromJson(jo.take("m.identity_server"_ls), pod.identityServer); + fromJson(jo, pod.additionalProperties); + } }; } // namespace Quotient -- cgit v1.2.3