diff options
Diffstat (limited to 'lib/identity/definitions')
-rw-r--r-- | lib/identity/definitions/request_email_validation.cpp | 3 | ||||
-rw-r--r-- | lib/identity/definitions/request_email_validation.h | 16 | ||||
-rw-r--r-- | lib/identity/definitions/request_msisdn_validation.cpp | 3 | ||||
-rw-r--r-- | lib/identity/definitions/request_msisdn_validation.h | 16 | ||||
-rw-r--r-- | lib/identity/definitions/sid.cpp | 7 | ||||
-rw-r--r-- | lib/identity/definitions/sid.h | 18 |
6 files changed, 25 insertions, 38 deletions
diff --git a/lib/identity/definitions/request_email_validation.cpp b/lib/identity/definitions/request_email_validation.cpp index 47463a8b..a2d0a707 100644 --- a/lib/identity/definitions/request_email_validation.cpp +++ b/lib/identity/definitions/request_email_validation.cpp @@ -16,11 +16,10 @@ void JsonObjectConverter<RequestEmailValidation>::dumpTo( } void JsonObjectConverter<RequestEmailValidation>::fillFrom( - const QJsonObject& jo, RequestEmailValidation& result) + const QJsonObject& jo, RequestEmailValidation& result) { fromJson(jo.value("client_secret"_ls), result.clientSecret); fromJson(jo.value("email"_ls), result.email); fromJson(jo.value("send_attempt"_ls), result.sendAttempt); fromJson(jo.value("next_link"_ls), result.nextLink); } - diff --git a/lib/identity/definitions/request_email_validation.h b/lib/identity/definitions/request_email_validation.h index eb7d8ed6..51369039 100644 --- a/lib/identity/definitions/request_email_validation.h +++ b/lib/identity/definitions/request_email_validation.h @@ -8,16 +8,14 @@ #include "converters.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct RequestEmailValidation - { + struct RequestEmailValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters - /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it - /// must not be empty. + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and + /// it must not be empty. QString clientSecret; /// The email address to validate. QString email; @@ -33,10 +31,10 @@ namespace QMatrixClient /// server will redirect the user to this URL. QString nextLink; }; - template <> struct JsonObjectConverter<RequestEmailValidation> - { + template <> struct JsonObjectConverter<RequestEmailValidation> { static void dumpTo(QJsonObject& jo, const RequestEmailValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestEmailValidation& pod); + static void fillFrom(const QJsonObject& jo, + RequestEmailValidation& pod); }; } // namespace QMatrixClient diff --git a/lib/identity/definitions/request_msisdn_validation.cpp b/lib/identity/definitions/request_msisdn_validation.cpp index a123d326..9facbf7e 100644 --- a/lib/identity/definitions/request_msisdn_validation.cpp +++ b/lib/identity/definitions/request_msisdn_validation.cpp @@ -17,7 +17,7 @@ void JsonObjectConverter<RequestMsisdnValidation>::dumpTo( } void JsonObjectConverter<RequestMsisdnValidation>::fillFrom( - const QJsonObject& jo, RequestMsisdnValidation& result) + const QJsonObject& jo, RequestMsisdnValidation& result) { fromJson(jo.value("client_secret"_ls), result.clientSecret); fromJson(jo.value("country"_ls), result.country); @@ -25,4 +25,3 @@ void JsonObjectConverter<RequestMsisdnValidation>::fillFrom( fromJson(jo.value("send_attempt"_ls), result.sendAttempt); fromJson(jo.value("next_link"_ls), result.nextLink); } - diff --git a/lib/identity/definitions/request_msisdn_validation.h b/lib/identity/definitions/request_msisdn_validation.h index b48ed6d5..c4fe479e 100644 --- a/lib/identity/definitions/request_msisdn_validation.h +++ b/lib/identity/definitions/request_msisdn_validation.h @@ -8,16 +8,14 @@ #include "converters.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct RequestMsisdnValidation - { + struct RequestMsisdnValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters - /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it - /// must not be empty. + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and + /// it must not be empty. QString clientSecret; /// The two-letter uppercase ISO country code that the number in /// ``phone_number`` should be parsed as if it were dialled from. @@ -36,10 +34,10 @@ namespace QMatrixClient /// server will redirect the user to this URL. QString nextLink; }; - template <> struct JsonObjectConverter<RequestMsisdnValidation> - { + template <> struct JsonObjectConverter<RequestMsisdnValidation> { static void dumpTo(QJsonObject& jo, const RequestMsisdnValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestMsisdnValidation& pod); + static void fillFrom(const QJsonObject& jo, + RequestMsisdnValidation& pod); }; } // namespace QMatrixClient diff --git a/lib/identity/definitions/sid.cpp b/lib/identity/definitions/sid.cpp index 1ba4b3b5..cc6973f2 100644 --- a/lib/identity/definitions/sid.cpp +++ b/lib/identity/definitions/sid.cpp @@ -6,15 +6,12 @@ using namespace QMatrixClient; -void JsonObjectConverter<Sid>::dumpTo( - QJsonObject& jo, const Sid& pod) +void JsonObjectConverter<Sid>::dumpTo(QJsonObject& jo, const Sid& pod) { addParam<>(jo, QStringLiteral("sid"), pod.sid); } -void JsonObjectConverter<Sid>::fillFrom( - const QJsonObject& jo, Sid& result) +void JsonObjectConverter<Sid>::fillFrom(const QJsonObject& jo, Sid& result) { fromJson(jo.value("sid"_ls), result.sid); } - diff --git a/lib/identity/definitions/sid.h b/lib/identity/definitions/sid.h index ac8c4130..85462b46 100644 --- a/lib/identity/definitions/sid.h +++ b/lib/identity/definitions/sid.h @@ -6,21 +6,17 @@ #include "converters.h" - -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct Sid - { - /// The session ID. Session IDs are opaque strings generated by the identity - /// server. They must consist entirely of the characters - /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and they - /// must not be empty. + struct Sid { + /// The session ID. Session IDs are opaque strings generated by the + /// identity server. They must consist entirely of the characters + /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and + /// they must not be empty. QString sid; }; - template <> struct JsonObjectConverter<Sid> - { + template <> struct JsonObjectConverter<Sid> { static void dumpTo(QJsonObject& jo, const Sid& pod); static void fillFrom(const QJsonObject& jo, Sid& pod); }; |