aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/pusher.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-17 07:42:13 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-17 07:49:41 +0200
commit7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 (patch)
treefa9e37d8874303bf56d5381b0844738bd516a79b /lib/csapi/pusher.cpp
parent906699cc525e9e0be231a58cabffc31ad1f5193c (diff)
downloadlibquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.tar.gz
libquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.zip
Regenerate API files using new GTAD and refreshed templates
No functional changes.
Diffstat (limited to 'lib/csapi/pusher.cpp')
-rw-r--r--lib/csapi/pusher.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/lib/csapi/pusher.cpp b/lib/csapi/pusher.cpp
index 90877a95..ad51b901 100644
--- a/lib/csapi/pusher.cpp
+++ b/lib/csapi/pusher.cpp
@@ -13,12 +13,10 @@ using namespace Quotient;
static const auto basePath = QStringLiteral("/_matrix/client/r0");
// Converters
-namespace Quotient
-{
+namespace Quotient {
template <>
-struct JsonObjectConverter<GetPushersJob::PusherData>
-{
+struct JsonObjectConverter<GetPushersJob::PusherData> {
static void fillFrom(const QJsonObject& jo,
GetPushersJob::PusherData& result)
{
@@ -28,8 +26,7 @@ struct JsonObjectConverter<GetPushersJob::PusherData>
};
template <>
-struct JsonObjectConverter<GetPushersJob::Pusher>
-{
+struct JsonObjectConverter<GetPushersJob::Pusher> {
static void fillFrom(const QJsonObject& jo, GetPushersJob::Pusher& result)
{
fromJson(jo.value("pushkey"_ls), result.pushkey);
@@ -45,8 +42,7 @@ struct JsonObjectConverter<GetPushersJob::Pusher>
} // namespace Quotient
-class GetPushersJob::Private
-{
+class GetPushersJob::Private {
public:
QVector<Pusher> pushers;
};
@@ -56,10 +52,9 @@ QUrl GetPushersJob::makeRequestUrl(QUrl baseUrl)
return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/pushers");
}
-static const auto GetPushersJobName = QStringLiteral("GetPushersJob");
-
GetPushersJob::GetPushersJob()
- : BaseJob(HttpVerb::Get, GetPushersJobName, basePath % "/pushers")
+ : BaseJob(HttpVerb::Get, QStringLiteral("GetPushersJob"),
+ basePath % "/pushers")
, d(new Private)
{}
@@ -79,12 +74,10 @@ BaseJob::Status GetPushersJob::parseJson(const QJsonDocument& data)
}
// Converters
-namespace Quotient
-{
+namespace Quotient {
template <>
-struct JsonObjectConverter<PostPusherJob::PusherData>
-{
+struct JsonObjectConverter<PostPusherJob::PusherData> {
static void dumpTo(QJsonObject& jo, const PostPusherJob::PusherData& pod)
{
addParam<IfNotEmpty>(jo, QStringLiteral("url"), pod.url);
@@ -94,14 +87,13 @@ struct JsonObjectConverter<PostPusherJob::PusherData>
} // namespace Quotient
-static const auto PostPusherJobName = QStringLiteral("PostPusherJob");
-
PostPusherJob::PostPusherJob(const QString& pushkey, const QString& kind,
const QString& appId, const QString& appDisplayName,
const QString& deviceDisplayName,
const QString& lang, const PusherData& data,
const QString& profileTag, Omittable<bool> append)
- : BaseJob(HttpVerb::Post, PostPusherJobName, basePath % "/pushers/set")
+ : BaseJob(HttpVerb::Post, QStringLiteral("PostPusherJob"),
+ basePath % "/pushers/set")
{
QJsonObject _data;
addParam<>(_data, QStringLiteral("pushkey"), pushkey);