diff options
Diffstat (limited to 'jobs')
-rw-r--r-- | jobs/generated/banning.cpp | 35 | ||||
-rw-r--r-- | jobs/generated/banning.h | 31 |
2 files changed, 66 insertions, 0 deletions
diff --git a/jobs/generated/banning.cpp b/jobs/generated/banning.cpp new file mode 100644 index 00000000..9fc5810a --- /dev/null +++ b/jobs/generated/banning.cpp @@ -0,0 +1,35 @@ +/****************************************************************************** + * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN + */ + + +#include "banning.h" + +#include "jobs/converters.h" +#include <QtCore/QStringBuilder> + +using namespace QMatrixClient; + +static const auto basePath = QStringLiteral("/_matrix/client/r0"); + +BanJob::BanJob(QString roomId, QString user_id, QString reason) + : BaseJob(HttpVerb::Post, "BanJob", + basePath % "/rooms/" % roomId % "/ban", + Query { }, + Data { + { "user_id", toJson(user_id) }, + { "reason", toJson(reason) } + } + ) +{ } + +UnbanJob::UnbanJob(QString roomId, QString user_id) + : BaseJob(HttpVerb::Post, "UnbanJob", + basePath % "/rooms/" % roomId % "/unban", + Query { }, + Data { + { "user_id", toJson(user_id) } + } + ) +{ } + diff --git a/jobs/generated/banning.h b/jobs/generated/banning.h new file mode 100644 index 00000000..b9d5b8db --- /dev/null +++ b/jobs/generated/banning.h @@ -0,0 +1,31 @@ +/****************************************************************************** + * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN + */ + + +#pragma once + +#include "../basejob.h" + +#include <QtCore/QString> + + +namespace QMatrixClient +{ + + // Operations + + class BanJob : public BaseJob + { + public: + explicit BanJob(QString roomId, QString user_id, QString reason = {}); + + }; + class UnbanJob : public BaseJob + { + public: + explicit UnbanJob(QString roomId, QString user_id); + + }; + +} // namespace QMatrixClient |