aboutsummaryrefslogtreecommitdiff
path: root/jobs/generated
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/generated')
-rw-r--r--jobs/generated/leaving.cpp30
-rw-r--r--jobs/generated/leaving.h31
-rw-r--r--jobs/generated/logout.cpp22
-rw-r--r--jobs/generated/logout.h24
-rw-r--r--jobs/generated/profile.cpp144
-rw-r--r--jobs/generated/profile.h80
6 files changed, 331 insertions, 0 deletions
diff --git a/jobs/generated/leaving.cpp b/jobs/generated/leaving.cpp
new file mode 100644
index 00000000..7fed347b
--- /dev/null
+++ b/jobs/generated/leaving.cpp
@@ -0,0 +1,30 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+
+#include "leaving.h"
+
+#include "jobs/converters.h"
+#include <QtCore/QStringBuilder>
+
+using namespace QMatrixClient;
+
+static const auto basePath = QStringLiteral("/_matrix/client/r0");
+
+LeaveRoomJob::LeaveRoomJob(QString roomId)
+ : BaseJob(HttpVerb::Post, "LeaveRoomJob",
+ basePath % "/rooms/" % roomId % "/leave",
+ Query { },
+ Data { }
+ )
+{ }
+
+ForgetRoomJob::ForgetRoomJob(QString roomId)
+ : BaseJob(HttpVerb::Post, "ForgetRoomJob",
+ basePath % "/rooms/" % roomId % "/forget",
+ Query { },
+ Data { }
+ )
+{ }
+
diff --git a/jobs/generated/leaving.h b/jobs/generated/leaving.h
new file mode 100644
index 00000000..96304084
--- /dev/null
+++ b/jobs/generated/leaving.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 LeaveRoomJob : public BaseJob
+ {
+ public:
+ explicit LeaveRoomJob(QString roomId);
+
+ };
+ class ForgetRoomJob : public BaseJob
+ {
+ public:
+ explicit ForgetRoomJob(QString roomId);
+
+ };
+
+} // namespace QMatrixClient
diff --git a/jobs/generated/logout.cpp b/jobs/generated/logout.cpp
new file mode 100644
index 00000000..b750efe2
--- /dev/null
+++ b/jobs/generated/logout.cpp
@@ -0,0 +1,22 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+
+#include "logout.h"
+
+#include "jobs/converters.h"
+#include <QtCore/QStringBuilder>
+
+using namespace QMatrixClient;
+
+static const auto basePath = QStringLiteral("/_matrix/client/r0");
+
+LogoutJob::LogoutJob()
+ : BaseJob(HttpVerb::Post, "LogoutJob",
+ basePath % "/logout",
+ Query { },
+ Data { }
+ )
+{ }
+
diff --git a/jobs/generated/logout.h b/jobs/generated/logout.h
new file mode 100644
index 00000000..28e85d8f
--- /dev/null
+++ b/jobs/generated/logout.h
@@ -0,0 +1,24 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+
+#pragma once
+
+#include "../basejob.h"
+
+
+
+namespace QMatrixClient
+{
+
+ // Operations
+
+ class LogoutJob : public BaseJob
+ {
+ public:
+ explicit LogoutJob();
+
+ };
+
+} // namespace QMatrixClient
diff --git a/jobs/generated/profile.cpp b/jobs/generated/profile.cpp
new file mode 100644
index 00000000..9d20a480
--- /dev/null
+++ b/jobs/generated/profile.cpp
@@ -0,0 +1,144 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+
+#include "profile.h"
+
+#include "jobs/converters.h"
+#include <QtCore/QStringBuilder>
+
+using namespace QMatrixClient;
+
+static const auto basePath = QStringLiteral("/_matrix/client/r0");
+
+SetDisplayNameJob::SetDisplayNameJob(QString userId, QString displayname)
+ : BaseJob(HttpVerb::Put, "SetDisplayNameJob",
+ basePath % "/profile/" % userId % "/displayname",
+ Query { },
+ Data {
+ { "displayname", toJson(displayname) }
+ }
+ )
+{ }
+
+class GetDisplayNameJob::Private
+{
+ public:
+ QString displayname;
+
+};
+
+GetDisplayNameJob::GetDisplayNameJob(QString userId)
+ : BaseJob(HttpVerb::Get, "GetDisplayNameJob",
+ basePath % "/profile/" % userId % "/displayname",
+ Query { },
+ Data { }
+ ), d(new Private)
+{ }
+
+GetDisplayNameJob::~GetDisplayNameJob()
+{
+ delete d;
+}
+
+const QString& GetDisplayNameJob::displayname() const
+{
+ return d->displayname;
+}
+
+BaseJob::Status GetDisplayNameJob::parseJson(const QJsonDocument& data)
+{
+ auto json = data.object();
+
+ d->displayname = fromJson<QString>(json.value("displayname"));
+
+ return Success;
+}
+
+SetAvatarUrlJob::SetAvatarUrlJob(QString userId, QString avatar_url)
+ : BaseJob(HttpVerb::Put, "SetAvatarUrlJob",
+ basePath % "/profile/" % userId % "/avatar_url",
+ Query { },
+ Data {
+ { "avatar_url", toJson(avatar_url) }
+ }
+ )
+{ }
+
+class GetAvatarUrlJob::Private
+{
+ public:
+ QString avatar_url;
+
+};
+
+GetAvatarUrlJob::GetAvatarUrlJob(QString userId)
+ : BaseJob(HttpVerb::Get, "GetAvatarUrlJob",
+ basePath % "/profile/" % userId % "/avatar_url",
+ Query { },
+ Data { }
+ ), d(new Private)
+{ }
+
+GetAvatarUrlJob::~GetAvatarUrlJob()
+{
+ delete d;
+}
+
+const QString& GetAvatarUrlJob::avatar_url() const
+{
+ return d->avatar_url;
+}
+
+BaseJob::Status GetAvatarUrlJob::parseJson(const QJsonDocument& data)
+{
+ auto json = data.object();
+
+ d->avatar_url = fromJson<QString>(json.value("avatar_url"));
+
+ return Success;
+}
+
+class GetUserProfileJob::Private
+{
+ public:
+ QString avatar_url;
+ QString displayname;
+
+};
+
+GetUserProfileJob::GetUserProfileJob(QString userId)
+ : BaseJob(HttpVerb::Get, "GetUserProfileJob",
+ basePath % "/profile/" % userId,
+ Query { },
+ Data { }
+ ), d(new Private)
+{ }
+
+GetUserProfileJob::~GetUserProfileJob()
+{
+ delete d;
+}
+
+const QString& GetUserProfileJob::avatar_url() const
+{
+ return d->avatar_url;
+}
+
+const QString& GetUserProfileJob::displayname() const
+{
+ return d->displayname;
+}
+
+BaseJob::Status GetUserProfileJob::parseJson(const QJsonDocument& data)
+{
+ auto json = data.object();
+
+ d->avatar_url = fromJson<QString>(json.value("avatar_url"));
+
+ d->displayname = fromJson<QString>(json.value("displayname"));
+
+ return Success;
+}
+
diff --git a/jobs/generated/profile.h b/jobs/generated/profile.h
new file mode 100644
index 00000000..8e2b195b
--- /dev/null
+++ b/jobs/generated/profile.h
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+
+#pragma once
+
+#include "../basejob.h"
+
+#include <QtCore/QString>
+
+
+namespace QMatrixClient
+{
+
+ // Operations
+
+ class SetDisplayNameJob : public BaseJob
+ {
+ public:
+ explicit SetDisplayNameJob(QString userId, QString displayname = {});
+
+ };
+ class GetDisplayNameJob : public BaseJob
+ {
+ public:
+ explicit GetDisplayNameJob(QString userId);
+
+ ~GetDisplayNameJob() override;
+
+ const QString& displayname() const;
+
+ protected:
+ Status parseJson(const QJsonDocument& data) override;
+
+ private:
+ class Private;
+ Private* d;
+ };
+ class SetAvatarUrlJob : public BaseJob
+ {
+ public:
+ explicit SetAvatarUrlJob(QString userId, QString avatar_url = {});
+
+ };
+ class GetAvatarUrlJob : public BaseJob
+ {
+ public:
+ explicit GetAvatarUrlJob(QString userId);
+
+ ~GetAvatarUrlJob() override;
+
+ const QString& avatar_url() const;
+
+ protected:
+ Status parseJson(const QJsonDocument& data) override;
+
+ private:
+ class Private;
+ Private* d;
+ };
+ class GetUserProfileJob : public BaseJob
+ {
+ public:
+ explicit GetUserProfileJob(QString userId);
+
+ ~GetUserProfileJob() override;
+
+ const QString& avatar_url() const;
+ const QString& displayname() const;
+
+ protected:
+ Status parseJson(const QJsonDocument& data) override;
+
+ private:
+ class Private;
+ Private* d;
+ };
+
+} // namespace QMatrixClient