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/identity_server.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'lib/csapi/definitions/wellknown/identity_server.h') diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h index 67d8b08d..fd53dfc1 100644 --- a/lib/csapi/definitions/wellknown/identity_server.h +++ b/lib/csapi/definitions/wellknown/identity_server.h @@ -6,21 +6,19 @@ #include "converters.h" - -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures /// Used by clients to discover identity server information. - struct IdentityServerInformation - { + struct IdentityServerInformation { /// The base URL for the identity server for client-server connections. QString baseUrl; }; - template <> struct JsonObjectConverter - { - static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod); - static void fillFrom(const QJsonObject& jo, IdentityServerInformation& pod); + template <> struct JsonObjectConverter { + static void dumpTo(QJsonObject& jo, + const IdentityServerInformation& pod); + static void fillFrom(const QJsonObject& jo, + IdentityServerInformation& pod); }; } // namespace QMatrixClient -- 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/identity_server.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lib/csapi/definitions/wellknown/identity_server.h') diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h index 4462f86e..a35644fc 100644 --- a/lib/csapi/definitions/wellknown/identity_server.h +++ b/lib/csapi/definitions/wellknown/identity_server.h @@ -4,11 +4,8 @@ #pragma once - - #include "converters.h" - namespace QMatrixClient { @@ -19,15 +16,13 @@ struct IdentityServerInformation { /// The base URL for the identity server for client-server connections. QString baseUrl; - - }; -template <> struct JsonObjectConverter +template <> +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod); - static void fillFrom(const QJsonObject& jo, IdentityServerInformation& pod);}; - - + static void fillFrom(const QJsonObject& jo, IdentityServerInformation& 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/identity_server.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/csapi/definitions/wellknown/identity_server.h') diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h index a35644fc..b4304ef7 100644 --- a/lib/csapi/definitions/wellknown/identity_server.h +++ b/lib/csapi/definitions/wellknown/identity_server.h @@ -6,7 +6,7 @@ #include "converters.h" -namespace QMatrixClient +namespace Quotient { // Data structures @@ -25,4 +25,4 @@ struct JsonObjectConverter static void fillFrom(const QJsonObject& jo, IdentityServerInformation& 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/identity_server.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/csapi/definitions/wellknown/identity_server.h') diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h index b4304ef7..d272e527 100644 --- a/lib/csapi/definitions/wellknown/identity_server.h +++ b/lib/csapi/definitions/wellknown/identity_server.h @@ -6,21 +6,18 @@ #include "converters.h" -namespace Quotient -{ +namespace Quotient { // Data structures /// Used by clients to discover identity server information. -struct IdentityServerInformation -{ +struct IdentityServerInformation { /// The base URL for the identity server for client-server connections. QString baseUrl; }; template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod); static void fillFrom(const QJsonObject& jo, IdentityServerInformation& 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/identity_server.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lib/csapi/definitions/wellknown/identity_server.h') diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h index d272e527..3bd07bd1 100644 --- a/lib/csapi/definitions/wellknown/identity_server.h +++ b/lib/csapi/definitions/wellknown/identity_server.h @@ -7,9 +7,6 @@ #include "converters.h" namespace Quotient { - -// Data structures - /// Used by clients to discover identity server information. struct IdentityServerInformation { /// The base URL for the identity server for client-server connections. @@ -18,8 +15,14 @@ struct IdentityServerInformation { template <> struct JsonObjectConverter { - static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod); - static void fillFrom(const QJsonObject& jo, IdentityServerInformation& pod); + static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod) + { + addParam<>(jo, QStringLiteral("base_url"), pod.baseUrl); + } + static void fillFrom(const QJsonObject& jo, IdentityServerInformation& pod) + { + fromJson(jo.value("base_url"_ls), pod.baseUrl); + } }; } // namespace Quotient -- cgit v1.2.3