From 22b14860e6b2bda990a05167ae61d8d7f24a2427 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 21 Jul 2018 22:59:17 +0900 Subject: csapi: add definitions/auth_data.* and optimise out trivial files with the latest GTAD --- lib/csapi/definitions/auth_data.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/csapi/definitions/auth_data.cpp (limited to 'lib/csapi/definitions/auth_data.cpp') diff --git a/lib/csapi/definitions/auth_data.cpp b/lib/csapi/definitions/auth_data.cpp new file mode 100644 index 00000000..94e3c05c --- /dev/null +++ b/lib/csapi/definitions/auth_data.cpp @@ -0,0 +1,29 @@ +/****************************************************************************** + * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN + */ + +#include "auth_data.h" + +using namespace QMatrixClient; + +QJsonObject QMatrixClient::toJson(const AuthenticationData& pod) +{ + QJsonObject _json = toJson(pod.authInfo); + addParam<>(_json, QStringLiteral("type"), pod.type); + addParam(_json, QStringLiteral("session"), pod.session); + return _json; +} + +AuthenticationData FromJson::operator()(const QJsonValue& jv) +{ + auto _json = jv.toObject(); + AuthenticationData result; + result.type = + fromJson(_json.take("type"_ls)); + result.session = + fromJson(_json.take("session"_ls)); + + result.authInfo = fromJson>(_json); + return result; +} + -- cgit v1.2.3