diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-04-17 07:42:13 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-04-17 07:49:41 +0200 |
commit | 7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 (patch) | |
tree | fa9e37d8874303bf56d5381b0844738bd516a79b /lib/csapi/joining.cpp | |
parent | 906699cc525e9e0be231a58cabffc31ad1f5193c (diff) | |
download | libquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.tar.gz libquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.zip |
Regenerate API files using new GTAD and refreshed templates
No functional changes.
Diffstat (limited to 'lib/csapi/joining.cpp')
-rw-r--r-- | lib/csapi/joining.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/lib/csapi/joining.cpp b/lib/csapi/joining.cpp index 2dd617bb..cde179e0 100644 --- a/lib/csapi/joining.cpp +++ b/lib/csapi/joining.cpp @@ -13,12 +13,10 @@ using namespace Quotient; static const auto basePath = QStringLiteral("/_matrix/client/r0"); // Converters -namespace Quotient -{ +namespace Quotient { template <> -struct JsonObjectConverter<JoinRoomByIdJob::ThirdPartySigned> -{ +struct JsonObjectConverter<JoinRoomByIdJob::ThirdPartySigned> { static void dumpTo(QJsonObject& jo, const JoinRoomByIdJob::ThirdPartySigned& pod) { @@ -31,17 +29,14 @@ struct JsonObjectConverter<JoinRoomByIdJob::ThirdPartySigned> } // namespace Quotient -class JoinRoomByIdJob::Private -{ +class JoinRoomByIdJob::Private { public: QString roomId; }; -static const auto JoinRoomByIdJobName = QStringLiteral("JoinRoomByIdJob"); - JoinRoomByIdJob::JoinRoomByIdJob( const QString& roomId, const Omittable<ThirdPartySigned>& thirdPartySigned) - : BaseJob(HttpVerb::Post, JoinRoomByIdJobName, + : BaseJob(HttpVerb::Post, QStringLiteral("JoinRoomByIdJob"), basePath % "/rooms/" % roomId % "/join") , d(new Private) { @@ -67,12 +62,10 @@ BaseJob::Status JoinRoomByIdJob::parseJson(const QJsonDocument& data) } // Converters -namespace Quotient -{ +namespace Quotient { template <> -struct JsonObjectConverter<JoinRoomJob::Signed> -{ +struct JsonObjectConverter<JoinRoomJob::Signed> { static void dumpTo(QJsonObject& jo, const JoinRoomJob::Signed& pod) { addParam<>(jo, QStringLiteral("sender"), pod.sender); @@ -83,8 +76,7 @@ struct JsonObjectConverter<JoinRoomJob::Signed> }; template <> -struct JsonObjectConverter<JoinRoomJob::ThirdPartySigned> -{ +struct JsonObjectConverter<JoinRoomJob::ThirdPartySigned> { static void dumpTo(QJsonObject& jo, const JoinRoomJob::ThirdPartySigned& pod) { addParam<>(jo, QStringLiteral("signed"), pod.signedData); @@ -93,8 +85,7 @@ struct JsonObjectConverter<JoinRoomJob::ThirdPartySigned> } // namespace Quotient -class JoinRoomJob::Private -{ +class JoinRoomJob::Private { public: QString roomId; }; @@ -106,12 +97,10 @@ BaseJob::Query queryToJoinRoom(const QStringList& serverName) return _q; } -static const auto JoinRoomJobName = QStringLiteral("JoinRoomJob"); - JoinRoomJob::JoinRoomJob(const QString& roomIdOrAlias, const QStringList& serverName, const Omittable<ThirdPartySigned>& thirdPartySigned) - : BaseJob(HttpVerb::Post, JoinRoomJobName, + : BaseJob(HttpVerb::Post, QStringLiteral("JoinRoomJob"), basePath % "/join/" % roomIdOrAlias, queryToJoinRoom(serverName)) , d(new Private) { |