aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-04 23:04:04 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-04 23:04:04 +0900
commit49022915fde72b83d9f18944c268110b01fa3469 (patch)
tree1b465b553a2e341486cd6051530a63faba17288e /lib
parentf70ec41accd6da9f223bc41b446ad1d2d77de3f4 (diff)
downloadlibquotient-49022915fde72b83d9f18944c268110b01fa3469.tar.gz
libquotient-49022915fde72b83d9f18944c268110b01fa3469.zip
New home for the generated code - lib/csapi
Diffstat (limited to 'lib')
-rw-r--r--lib/connection.cpp12
-rw-r--r--lib/connection.h2
-rw-r--r--lib/csapi/account-data.cpp (renamed from lib/jobs/generated/account-data.cpp)0
-rw-r--r--lib/csapi/account-data.h (renamed from lib/jobs/generated/account-data.h)2
-rw-r--r--lib/csapi/admin.cpp100
-rw-r--r--lib/csapi/admin.h65
-rw-r--r--lib/csapi/administrative_contact.cpp (renamed from lib/jobs/generated/administrative_contact.cpp)0
-rw-r--r--lib/csapi/administrative_contact.h (renamed from lib/jobs/generated/administrative_contact.h)2
-rw-r--r--lib/csapi/banning.cpp (renamed from lib/jobs/generated/banning.cpp)0
-rw-r--r--lib/csapi/banning.h (renamed from lib/jobs/generated/banning.h)2
-rw-r--r--lib/csapi/content-repo.cpp (renamed from lib/jobs/generated/content-repo.cpp)0
-rw-r--r--lib/csapi/content-repo.h (renamed from lib/jobs/generated/content-repo.h)2
-rw-r--r--lib/csapi/create_room.cpp (renamed from lib/jobs/generated/create_room.cpp)0
-rw-r--r--lib/csapi/create_room.h (renamed from lib/jobs/generated/create_room.h)2
-rw-r--r--lib/csapi/directory.cpp (renamed from lib/jobs/generated/directory.cpp)0
-rw-r--r--lib/csapi/directory.h (renamed from lib/jobs/generated/directory.h)2
-rw-r--r--lib/csapi/event_context.cpp91
-rw-r--r--lib/csapi/event_context.h46
-rw-r--r--lib/csapi/gtad.yaml (renamed from lib/jobs/gtad.yaml)0
-rw-r--r--lib/csapi/inviting.cpp (renamed from lib/jobs/generated/inviting.cpp)0
-rw-r--r--lib/csapi/inviting.h (renamed from lib/jobs/generated/inviting.h)2
-rw-r--r--lib/csapi/joining.cpp (renamed from lib/jobs/generated/joining.cpp)0
-rw-r--r--lib/csapi/joining.h (renamed from lib/jobs/generated/joining.h)2
-rw-r--r--lib/csapi/kicking.cpp (renamed from lib/jobs/generated/kicking.cpp)0
-rw-r--r--lib/csapi/kicking.h (renamed from lib/jobs/generated/kicking.h)2
-rw-r--r--lib/csapi/leaving.cpp (renamed from lib/jobs/generated/leaving.cpp)0
-rw-r--r--lib/csapi/leaving.h (renamed from lib/jobs/generated/leaving.h)2
-rw-r--r--lib/csapi/list_joined_rooms.cpp (renamed from lib/jobs/generated/list_joined_rooms.cpp)0
-rw-r--r--lib/csapi/list_joined_rooms.h (renamed from lib/jobs/generated/list_joined_rooms.h)2
-rw-r--r--lib/csapi/list_public_rooms.cpp (renamed from lib/jobs/generated/list_public_rooms.cpp)0
-rw-r--r--lib/csapi/list_public_rooms.h (renamed from lib/jobs/generated/list_public_rooms.h)2
-rw-r--r--lib/csapi/login.cpp (renamed from lib/jobs/generated/login.cpp)0
-rw-r--r--lib/csapi/login.h (renamed from lib/jobs/generated/login.h)2
-rw-r--r--lib/csapi/logout.cpp (renamed from lib/jobs/generated/logout.cpp)0
-rw-r--r--lib/csapi/logout.h (renamed from lib/jobs/generated/logout.h)2
-rw-r--r--lib/csapi/message_pagination.cpp (renamed from lib/jobs/generated/message_pagination.cpp)0
-rw-r--r--lib/csapi/message_pagination.h (renamed from lib/jobs/generated/message_pagination.h)2
-rw-r--r--lib/csapi/notifications.cpp (renamed from lib/jobs/generated/notifications.cpp)0
-rw-r--r--lib/csapi/notifications.h (renamed from lib/jobs/generated/notifications.h)2
-rw-r--r--lib/csapi/preamble.mustache (renamed from lib/jobs/preamble.mustache)0
-rw-r--r--lib/csapi/profile.cpp (renamed from lib/jobs/generated/profile.cpp)0
-rw-r--r--lib/csapi/profile.h (renamed from lib/jobs/generated/profile.h)2
-rw-r--r--lib/csapi/pusher.cpp (renamed from lib/jobs/generated/pusher.cpp)0
-rw-r--r--lib/csapi/pusher.h (renamed from lib/jobs/generated/pusher.h)2
-rw-r--r--lib/csapi/receipts.cpp (renamed from lib/jobs/generated/receipts.cpp)0
-rw-r--r--lib/csapi/receipts.h (renamed from lib/jobs/generated/receipts.h)2
-rw-r--r--lib/csapi/redaction.cpp (renamed from lib/jobs/generated/redaction.cpp)0
-rw-r--r--lib/csapi/redaction.h (renamed from lib/jobs/generated/redaction.h)2
-rw-r--r--lib/csapi/room_send.cpp (renamed from lib/jobs/generated/room_send.cpp)0
-rw-r--r--lib/csapi/room_send.h (renamed from lib/jobs/generated/room_send.h)2
-rw-r--r--lib/csapi/room_state.cpp (renamed from lib/jobs/generated/room_state.cpp)0
-rw-r--r--lib/csapi/room_state.h (renamed from lib/jobs/generated/room_state.h)2
-rw-r--r--lib/csapi/tags.cpp (renamed from lib/jobs/generated/tags.cpp)0
-rw-r--r--lib/csapi/tags.h (renamed from lib/jobs/generated/tags.h)2
-rw-r--r--lib/csapi/third_party_membership.cpp (renamed from lib/jobs/generated/third_party_membership.cpp)0
-rw-r--r--lib/csapi/third_party_membership.h (renamed from lib/jobs/generated/third_party_membership.h)2
-rw-r--r--lib/csapi/to_device.cpp (renamed from lib/jobs/generated/to_device.cpp)0
-rw-r--r--lib/csapi/to_device.h (renamed from lib/jobs/generated/to_device.h)2
-rw-r--r--lib/csapi/typing.cpp (renamed from lib/jobs/generated/typing.cpp)0
-rw-r--r--lib/csapi/typing.h (renamed from lib/jobs/generated/typing.h)2
-rw-r--r--lib/csapi/users.cpp (renamed from lib/jobs/generated/users.cpp)0
-rw-r--r--lib/csapi/users.h (renamed from lib/jobs/generated/users.h)2
-rw-r--r--lib/csapi/versions.cpp (renamed from lib/jobs/generated/versions.cpp)0
-rw-r--r--lib/csapi/versions.h (renamed from lib/jobs/generated/versions.h)2
-rw-r--r--lib/csapi/whoami.cpp (renamed from lib/jobs/generated/whoami.cpp)0
-rw-r--r--lib/csapi/whoami.h (renamed from lib/jobs/generated/whoami.h)2
-rw-r--r--lib/csapi/{{base}}.cpp.mustache (renamed from lib/jobs/{{base}}.cpp.mustache)0
-rw-r--r--lib/csapi/{{base}}.h.mustache (renamed from lib/jobs/{{base}}.h.mustache)2
-rw-r--r--lib/jobs/downloadfilejob.h2
-rw-r--r--lib/jobs/mediathumbnailjob.h2
-rw-r--r--lib/room.cpp18
-rw-r--r--lib/user.cpp6
72 files changed, 353 insertions, 51 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 78ce4777..24bf1af9 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -23,12 +23,12 @@
#include "events/directchatevent.h"
#include "room.h"
#include "settings.h"
-#include "jobs/generated/login.h"
-#include "jobs/generated/logout.h"
-#include "jobs/generated/receipts.h"
-#include "jobs/generated/leaving.h"
-#include "jobs/generated/account-data.h"
-#include "jobs/generated/joining.h"
+#include "csapi/login.h"
+#include "csapi/logout.h"
+#include "csapi/receipts.h"
+#include "csapi/leaving.h"
+#include "csapi/account-data.h"
+#include "csapi/joining.h"
#include "jobs/sendeventjob.h"
#include "jobs/syncjob.h"
#include "jobs/mediathumbnailjob.h"
diff --git a/lib/connection.h b/lib/connection.h
index 3364739b..6dd0db1d 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -18,7 +18,7 @@
#pragma once
-#include "jobs/generated/create_room.h"
+#include "csapi/create_room.h"
#include "joinstate.h"
#include <QtCore/QObject>
diff --git a/lib/jobs/generated/account-data.cpp b/lib/csapi/account-data.cpp
index ac45cb85..ac45cb85 100644
--- a/lib/jobs/generated/account-data.cpp
+++ b/lib/csapi/account-data.cpp
diff --git a/lib/jobs/generated/account-data.h b/lib/csapi/account-data.h
index 69ad9fb4..784b8b4b 100644
--- a/lib/jobs/generated/account-data.h
+++ b/lib/csapi/account-data.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QJsonObject>
diff --git a/lib/csapi/admin.cpp b/lib/csapi/admin.cpp
new file mode 100644
index 00000000..b325d746
--- /dev/null
+++ b/lib/csapi/admin.cpp
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#include "admin.h"
+
+#include <QtCore/QStringBuilder>
+
+using namespace QMatrixClient;
+
+static const auto basePath = QStringLiteral("/_matrix/client/r0");
+
+namespace QMatrixClient
+{
+ // Converters
+
+ template <> struct FromJson<GetWhoIsJob::ConnectionInfo>
+ {
+ GetWhoIsJob::ConnectionInfo operator()(const QJsonValue& jv)
+ {
+ const auto& o = jv.toObject();
+ GetWhoIsJob::ConnectionInfo result;
+ result.ip =
+ fromJson<QString>(o.value("ip"));
+ result.lastSeen =
+ fromJson<qint64>(o.value("last_seen"));
+ result.userAgent =
+ fromJson<QString>(o.value("user_agent"));
+
+ return result;
+ }
+ };
+
+ template <> struct FromJson<GetWhoIsJob::SessionInfo>
+ {
+ GetWhoIsJob::SessionInfo operator()(const QJsonValue& jv)
+ {
+ const auto& o = jv.toObject();
+ GetWhoIsJob::SessionInfo result;
+ result.connections =
+ fromJson<QVector<GetWhoIsJob::ConnectionInfo>>(o.value("connections"));
+
+ return result;
+ }
+ };
+
+ template <> struct FromJson<GetWhoIsJob::DeviceInfo>
+ {
+ GetWhoIsJob::DeviceInfo operator()(const QJsonValue& jv)
+ {
+ const auto& o = jv.toObject();
+ GetWhoIsJob::DeviceInfo result;
+ result.sessions =
+ fromJson<QVector<GetWhoIsJob::SessionInfo>>(o.value("sessions"));
+
+ return result;
+ }
+ };
+} // namespace QMatrixClient
+
+class GetWhoIsJob::Private
+{
+ public:
+ QString userId;
+ QHash<QString, DeviceInfo> devices;
+};
+
+QUrl GetWhoIsJob::makeRequestUrl(QUrl baseUrl, const QString& userId)
+{
+ return BaseJob::makeRequestUrl(std::move(baseUrl),
+ basePath % "/admin/whois/" % userId);
+}
+
+GetWhoIsJob::GetWhoIsJob(const QString& userId)
+ : BaseJob(HttpVerb::Get, "GetWhoIsJob",
+ basePath % "/admin/whois/" % userId)
+ , d(new Private)
+{
+}
+
+GetWhoIsJob::~GetWhoIsJob() = default;
+
+const QString& GetWhoIsJob::userId() const
+{
+ return d->userId;
+}
+
+const QHash<QString, GetWhoIsJob::DeviceInfo>& GetWhoIsJob::devices() const
+{
+ return d->devices;
+}
+
+BaseJob::Status GetWhoIsJob::parseJson(const QJsonDocument& data)
+{
+ auto json = data.object();
+ d->userId = fromJson<QString>(json.value("user_id"));
+ d->devices = fromJson<QHash<QString, DeviceInfo>>(json.value("devices"));
+ return Success;
+}
+
diff --git a/lib/csapi/admin.h b/lib/csapi/admin.h
new file mode 100644
index 00000000..ada5a8ca
--- /dev/null
+++ b/lib/csapi/admin.h
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#pragma once
+
+#include "jobs/basejob.h"
+
+#include <QtCore/QHash>
+#include <QtCore/QVector>
+
+#include "converters.h"
+
+namespace QMatrixClient
+{
+ // Operations
+
+ class GetWhoIsJob : public BaseJob
+ {
+ public:
+ // Inner data structures
+
+ struct ConnectionInfo
+ {
+ QString ip;
+ qint64 lastSeen;
+ QString userAgent;
+ };
+
+ struct SessionInfo
+ {
+ QVector<ConnectionInfo> connections;
+ };
+
+ struct DeviceInfo
+ {
+ QVector<SessionInfo> sessions;
+ };
+
+ // Construction/destruction
+
+ explicit GetWhoIsJob(const QString& userId);
+
+ /** Construct a URL out of baseUrl and usual parameters passed to
+ * GetWhoIsJob. This function can be used when
+ * a URL for GetWhoIsJob is necessary but the job
+ * itself isn't.
+ */
+ static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId);
+
+ ~GetWhoIsJob() override;
+
+ // Result properties
+
+ const QString& userId() const;
+ const QHash<QString, DeviceInfo>& devices() const;
+
+ protected:
+ Status parseJson(const QJsonDocument& data) override;
+
+ private:
+ class Private;
+ QScopedPointer<Private> d;
+ };
+} // namespace QMatrixClient
diff --git a/lib/jobs/generated/administrative_contact.cpp b/lib/csapi/administrative_contact.cpp
index ec7c77c3..ec7c77c3 100644
--- a/lib/jobs/generated/administrative_contact.cpp
+++ b/lib/csapi/administrative_contact.cpp
diff --git a/lib/jobs/generated/administrative_contact.h b/lib/csapi/administrative_contact.h
index 4afd068f..0d1ace3d 100644
--- a/lib/jobs/generated/administrative_contact.h
+++ b/lib/csapi/administrative_contact.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QVector>
diff --git a/lib/jobs/generated/banning.cpp b/lib/csapi/banning.cpp
index f66b27b6..f66b27b6 100644
--- a/lib/jobs/generated/banning.cpp
+++ b/lib/csapi/banning.cpp
diff --git a/lib/jobs/generated/banning.h b/lib/csapi/banning.h
index 2d6fbd9b..5d9bae2b 100644
--- a/lib/jobs/generated/banning.h
+++ b/lib/csapi/banning.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/content-repo.cpp b/lib/csapi/content-repo.cpp
index 95fc5aed..95fc5aed 100644
--- a/lib/jobs/generated/content-repo.cpp
+++ b/lib/csapi/content-repo.cpp
diff --git a/lib/jobs/generated/content-repo.h b/lib/csapi/content-repo.h
index cae8e588..4c799b2d 100644
--- a/lib/jobs/generated/content-repo.h
+++ b/lib/csapi/content-repo.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QIODevice>
diff --git a/lib/jobs/generated/create_room.cpp b/lib/csapi/create_room.cpp
index 0a7eb208..0a7eb208 100644
--- a/lib/jobs/generated/create_room.cpp
+++ b/lib/csapi/create_room.cpp
diff --git a/lib/jobs/generated/create_room.h b/lib/csapi/create_room.h
index 88ad7895..8ade7a9c 100644
--- a/lib/jobs/generated/create_room.h
+++ b/lib/csapi/create_room.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QVector>
#include <QtCore/QJsonObject>
diff --git a/lib/jobs/generated/directory.cpp b/lib/csapi/directory.cpp
index 3066ebe2..3066ebe2 100644
--- a/lib/jobs/generated/directory.cpp
+++ b/lib/csapi/directory.cpp
diff --git a/lib/jobs/generated/directory.h b/lib/csapi/directory.h
index 861040b6..b6e62b6a 100644
--- a/lib/jobs/generated/directory.h
+++ b/lib/csapi/directory.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QStringList>
diff --git a/lib/csapi/event_context.cpp b/lib/csapi/event_context.cpp
new file mode 100644
index 00000000..d9ab45ca
--- /dev/null
+++ b/lib/csapi/event_context.cpp
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#include "event_context.h"
+
+#include "converters.h"
+
+#include <QtCore/QStringBuilder>
+
+using namespace QMatrixClient;
+
+static const auto basePath = QStringLiteral("/_matrix/client/r0");
+
+class GetEventContextJob::Private
+{
+ public:
+ QString begin;
+ QString end;
+ RoomEvents eventsBefore;
+ RoomEventPtr event;
+ RoomEvents eventsAfter;
+ StateEvents state;
+};
+
+BaseJob::Query queryToGetEventContext(int limit)
+{
+ BaseJob::Query _q;
+ _q.addQueryItem("limit", QString("%1").arg(limit));
+ return _q;
+}
+
+QUrl GetEventContextJob::makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventId, int limit)
+{
+ return BaseJob::makeRequestUrl(std::move(baseUrl),
+ basePath % "/rooms/" % roomId % "/context/" % eventId,
+ queryToGetEventContext(limit));
+}
+
+GetEventContextJob::GetEventContextJob(const QString& roomId, const QString& eventId, int limit)
+ : BaseJob(HttpVerb::Get, "GetEventContextJob",
+ basePath % "/rooms/" % roomId % "/context/" % eventId,
+ queryToGetEventContext(limit))
+ , d(new Private)
+{
+}
+
+GetEventContextJob::~GetEventContextJob() = default;
+
+const QString& GetEventContextJob::begin() const
+{
+ return d->begin;
+}
+
+const QString& GetEventContextJob::end() const
+{
+ return d->end;
+}
+
+RoomEvents&& GetEventContextJob::eventsBefore()
+{
+ return std::move(d->eventsBefore);
+}
+
+RoomEventPtr&& GetEventContextJob::event()
+{
+ return std::move(d->event);
+}
+
+RoomEvents&& GetEventContextJob::eventsAfter()
+{
+ return std::move(d->eventsAfter);
+}
+
+StateEvents&& GetEventContextJob::state()
+{
+ return std::move(d->state);
+}
+
+BaseJob::Status GetEventContextJob::parseJson(const QJsonDocument& data)
+{
+ auto json = data.object();
+ d->begin = fromJson<QString>(json.value("start"));
+ d->end = fromJson<QString>(json.value("end"));
+ d->eventsBefore = fromJson<RoomEvents>(json.value("events_before"));
+ d->event = fromJson<RoomEventPtr>(json.value("event"));
+ d->eventsAfter = fromJson<RoomEvents>(json.value("events_after"));
+ d->state = fromJson<StateEvents>(json.value("state"));
+ return Success;
+}
+
diff --git a/lib/csapi/event_context.h b/lib/csapi/event_context.h
new file mode 100644
index 00000000..caf1dfd4
--- /dev/null
+++ b/lib/csapi/event_context.h
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#pragma once
+
+#include "jobs/basejob.h"
+
+#include "events/event.h"
+
+
+namespace QMatrixClient
+{
+ // Operations
+
+ class GetEventContextJob : public BaseJob
+ {
+ public:
+ explicit GetEventContextJob(const QString& roomId, const QString& eventId, int limit = {});
+
+ /** Construct a URL out of baseUrl and usual parameters passed to
+ * GetEventContextJob. This function can be used when
+ * a URL for GetEventContextJob is necessary but the job
+ * itself isn't.
+ */
+ static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventId, int limit = {});
+
+ ~GetEventContextJob() override;
+
+ // Result properties
+
+ const QString& begin() const;
+ const QString& end() const;
+ RoomEvents&& eventsBefore();
+ RoomEventPtr&& event();
+ RoomEvents&& eventsAfter();
+ StateEvents&& state();
+
+ protected:
+ Status parseJson(const QJsonDocument& data) override;
+
+ private:
+ class Private;
+ QScopedPointer<Private> d;
+ };
+} // namespace QMatrixClient
diff --git a/lib/jobs/gtad.yaml b/lib/csapi/gtad.yaml
index 7f6a97e0..7f6a97e0 100644
--- a/lib/jobs/gtad.yaml
+++ b/lib/csapi/gtad.yaml
diff --git a/lib/jobs/generated/inviting.cpp b/lib/csapi/inviting.cpp
index d2ee2107..d2ee2107 100644
--- a/lib/jobs/generated/inviting.cpp
+++ b/lib/csapi/inviting.cpp
diff --git a/lib/jobs/generated/inviting.h b/lib/csapi/inviting.h
index eaa884df..3119de6a 100644
--- a/lib/jobs/generated/inviting.h
+++ b/lib/csapi/inviting.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/joining.cpp b/lib/csapi/joining.cpp
index 705e8f83..705e8f83 100644
--- a/lib/jobs/generated/joining.cpp
+++ b/lib/csapi/joining.cpp
diff --git a/lib/jobs/generated/joining.h b/lib/csapi/joining.h
index 7aa3e3a2..ccaed04e 100644
--- a/lib/jobs/generated/joining.h
+++ b/lib/csapi/joining.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QJsonObject>
diff --git a/lib/jobs/generated/kicking.cpp b/lib/csapi/kicking.cpp
index bf2490b7..bf2490b7 100644
--- a/lib/jobs/generated/kicking.cpp
+++ b/lib/csapi/kicking.cpp
diff --git a/lib/jobs/generated/kicking.h b/lib/csapi/kicking.h
index 3814bef7..030dff88 100644
--- a/lib/jobs/generated/kicking.h
+++ b/lib/csapi/kicking.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/leaving.cpp b/lib/csapi/leaving.cpp
index afc4adbd..afc4adbd 100644
--- a/lib/jobs/generated/leaving.cpp
+++ b/lib/csapi/leaving.cpp
diff --git a/lib/jobs/generated/leaving.h b/lib/csapi/leaving.h
index 7e914dd1..f6711c32 100644
--- a/lib/jobs/generated/leaving.h
+++ b/lib/csapi/leaving.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/list_joined_rooms.cpp b/lib/csapi/list_joined_rooms.cpp
index 82ec8849..82ec8849 100644
--- a/lib/jobs/generated/list_joined_rooms.cpp
+++ b/lib/csapi/list_joined_rooms.cpp
diff --git a/lib/jobs/generated/list_joined_rooms.h b/lib/csapi/list_joined_rooms.h
index 442e2cf9..e590fa18 100644
--- a/lib/jobs/generated/list_joined_rooms.h
+++ b/lib/csapi/list_joined_rooms.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QStringList>
diff --git a/lib/jobs/generated/list_public_rooms.cpp b/lib/csapi/list_public_rooms.cpp
index b27bdd58..b27bdd58 100644
--- a/lib/jobs/generated/list_public_rooms.cpp
+++ b/lib/csapi/list_public_rooms.cpp
diff --git a/lib/jobs/generated/list_public_rooms.h b/lib/csapi/list_public_rooms.h
index 46c055b5..76d78577 100644
--- a/lib/jobs/generated/list_public_rooms.h
+++ b/lib/csapi/list_public_rooms.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QVector>
#include <QtCore/QStringList>
diff --git a/lib/jobs/generated/login.cpp b/lib/csapi/login.cpp
index a4dab428..a4dab428 100644
--- a/lib/jobs/generated/login.cpp
+++ b/lib/csapi/login.cpp
diff --git a/lib/jobs/generated/login.h b/lib/csapi/login.h
index 8bf52d6b..2adbdb4d 100644
--- a/lib/jobs/generated/login.h
+++ b/lib/csapi/login.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/logout.cpp b/lib/csapi/logout.cpp
index b943dcd3..b943dcd3 100644
--- a/lib/jobs/generated/logout.cpp
+++ b/lib/csapi/logout.cpp
diff --git a/lib/jobs/generated/logout.h b/lib/csapi/logout.h
index 1f60bd75..7993335f 100644
--- a/lib/jobs/generated/logout.h
+++ b/lib/csapi/logout.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/message_pagination.cpp b/lib/csapi/message_pagination.cpp
index f89ccd03..f89ccd03 100644
--- a/lib/jobs/generated/message_pagination.cpp
+++ b/lib/csapi/message_pagination.cpp
diff --git a/lib/jobs/generated/message_pagination.h b/lib/csapi/message_pagination.h
index 284895fd..61e7323f 100644
--- a/lib/jobs/generated/message_pagination.h
+++ b/lib/csapi/message_pagination.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include "events/event.h"
diff --git a/lib/jobs/generated/notifications.cpp b/lib/csapi/notifications.cpp
index 04ad0175..04ad0175 100644
--- a/lib/jobs/generated/notifications.cpp
+++ b/lib/csapi/notifications.cpp
diff --git a/lib/jobs/generated/notifications.h b/lib/csapi/notifications.h
index 428995ae..61da518b 100644
--- a/lib/jobs/generated/notifications.h
+++ b/lib/csapi/notifications.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include "events/event.h"
#include <QtCore/QJsonObject>
diff --git a/lib/jobs/preamble.mustache b/lib/csapi/preamble.mustache
index 3ba87d61..3ba87d61 100644
--- a/lib/jobs/preamble.mustache
+++ b/lib/csapi/preamble.mustache
diff --git a/lib/jobs/generated/profile.cpp b/lib/csapi/profile.cpp
index d8ddbc14..d8ddbc14 100644
--- a/lib/jobs/generated/profile.cpp
+++ b/lib/csapi/profile.cpp
diff --git a/lib/jobs/generated/profile.h b/lib/csapi/profile.h
index 9afc037b..604291b4 100644
--- a/lib/jobs/generated/profile.h
+++ b/lib/csapi/profile.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/pusher.cpp b/lib/csapi/pusher.cpp
index dea7cf8b..dea7cf8b 100644
--- a/lib/jobs/generated/pusher.cpp
+++ b/lib/csapi/pusher.cpp
diff --git a/lib/jobs/generated/pusher.h b/lib/csapi/pusher.h
index 4d99d4d0..97e3ba38 100644
--- a/lib/jobs/generated/pusher.h
+++ b/lib/csapi/pusher.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QVector>
diff --git a/lib/jobs/generated/receipts.cpp b/lib/csapi/receipts.cpp
index 945e8673..945e8673 100644
--- a/lib/jobs/generated/receipts.cpp
+++ b/lib/csapi/receipts.cpp
diff --git a/lib/jobs/generated/receipts.h b/lib/csapi/receipts.h
index 9eb7a489..b109282e 100644
--- a/lib/jobs/generated/receipts.h
+++ b/lib/csapi/receipts.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QJsonObject>
diff --git a/lib/jobs/generated/redaction.cpp b/lib/csapi/redaction.cpp
index 0da35dfc..0da35dfc 100644
--- a/lib/jobs/generated/redaction.cpp
+++ b/lib/csapi/redaction.cpp
diff --git a/lib/jobs/generated/redaction.h b/lib/csapi/redaction.h
index 974dfde5..56645ee5 100644
--- a/lib/jobs/generated/redaction.h
+++ b/lib/csapi/redaction.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/room_send.cpp b/lib/csapi/room_send.cpp
index 9637a205..9637a205 100644
--- a/lib/jobs/generated/room_send.cpp
+++ b/lib/csapi/room_send.cpp
diff --git a/lib/jobs/generated/room_send.h b/lib/csapi/room_send.h
index 370f2865..3bfb48c4 100644
--- a/lib/jobs/generated/room_send.h
+++ b/lib/csapi/room_send.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QJsonObject>
diff --git a/lib/jobs/generated/room_state.cpp b/lib/csapi/room_state.cpp
index 39f36afb..39f36afb 100644
--- a/lib/jobs/generated/room_state.cpp
+++ b/lib/csapi/room_state.cpp
diff --git a/lib/jobs/generated/room_state.h b/lib/csapi/room_state.h
index aea32263..5c42b868 100644
--- a/lib/jobs/generated/room_state.h
+++ b/lib/csapi/room_state.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QJsonObject>
diff --git a/lib/jobs/generated/tags.cpp b/lib/csapi/tags.cpp
index 9cd78aec..9cd78aec 100644
--- a/lib/jobs/generated/tags.cpp
+++ b/lib/csapi/tags.cpp
diff --git a/lib/jobs/generated/tags.h b/lib/csapi/tags.h
index f62bd7ad..e437cee8 100644
--- a/lib/jobs/generated/tags.h
+++ b/lib/csapi/tags.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QJsonObject>
diff --git a/lib/jobs/generated/third_party_membership.cpp b/lib/csapi/third_party_membership.cpp
index b637d481..b637d481 100644
--- a/lib/jobs/generated/third_party_membership.cpp
+++ b/lib/csapi/third_party_membership.cpp
diff --git a/lib/jobs/generated/third_party_membership.h b/lib/csapi/third_party_membership.h
index c7b5214e..9cf6e6f6 100644
--- a/lib/jobs/generated/third_party_membership.h
+++ b/lib/csapi/third_party_membership.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/to_device.cpp b/lib/csapi/to_device.cpp
index e893fa44..e893fa44 100644
--- a/lib/jobs/generated/to_device.cpp
+++ b/lib/csapi/to_device.cpp
diff --git a/lib/jobs/generated/to_device.h b/lib/csapi/to_device.h
index f5910e44..7743b883 100644
--- a/lib/jobs/generated/to_device.h
+++ b/lib/csapi/to_device.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QJsonObject>
#include <QtCore/QHash>
diff --git a/lib/jobs/generated/typing.cpp b/lib/csapi/typing.cpp
index fa700290..fa700290 100644
--- a/lib/jobs/generated/typing.cpp
+++ b/lib/csapi/typing.cpp
diff --git a/lib/jobs/generated/typing.h b/lib/csapi/typing.h
index 0495ed0a..0506c77b 100644
--- a/lib/jobs/generated/typing.h
+++ b/lib/csapi/typing.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/generated/users.cpp b/lib/csapi/users.cpp
index fd2944e4..fd2944e4 100644
--- a/lib/jobs/generated/users.cpp
+++ b/lib/csapi/users.cpp
diff --git a/lib/jobs/generated/users.h b/lib/csapi/users.h
index fa0d4335..85ebd47c 100644
--- a/lib/jobs/generated/users.h
+++ b/lib/csapi/users.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QVector>
diff --git a/lib/jobs/generated/versions.cpp b/lib/csapi/versions.cpp
index 7b55b94f..7b55b94f 100644
--- a/lib/jobs/generated/versions.cpp
+++ b/lib/csapi/versions.cpp
diff --git a/lib/jobs/generated/versions.h b/lib/csapi/versions.h
index 4fe8d9d0..c386f0af 100644
--- a/lib/jobs/generated/versions.h
+++ b/lib/csapi/versions.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
#include <QtCore/QStringList>
diff --git a/lib/jobs/generated/whoami.cpp b/lib/csapi/whoami.cpp
index 4c231b5f..4c231b5f 100644
--- a/lib/jobs/generated/whoami.cpp
+++ b/lib/csapi/whoami.cpp
diff --git a/lib/jobs/generated/whoami.h b/lib/csapi/whoami.h
index 2b0e7375..08fcb5a3 100644
--- a/lib/jobs/generated/whoami.h
+++ b/lib/csapi/whoami.h
@@ -4,7 +4,7 @@
#pragma once
-#include "../basejob.h"
+#include "jobs/basejob.h"
diff --git a/lib/jobs/{{base}}.cpp.mustache b/lib/csapi/{{base}}.cpp.mustache
index d3726f1e..d3726f1e 100644
--- a/lib/jobs/{{base}}.cpp.mustache
+++ b/lib/csapi/{{base}}.cpp.mustache
diff --git a/lib/jobs/{{base}}.h.mustache b/lib/csapi/{{base}}.h.mustache
index e4f45d85..a9bed527 100644
--- a/lib/jobs/{{base}}.h.mustache
+++ b/lib/csapi/{{base}}.h.mustache
@@ -1,7 +1,7 @@
{{#@filePartial}}preamble{{/@filePartial}}
#pragma once
-{{#operations}}#include "../basejob.h"
+{{#operations}}#include "jobs/basejob.h"
{{/operations}}
{{#imports}}#include {{_}}
{{/imports}}
diff --git a/lib/jobs/downloadfilejob.h b/lib/jobs/downloadfilejob.h
index 1815a7c8..ce47ab1c 100644
--- a/lib/jobs/downloadfilejob.h
+++ b/lib/jobs/downloadfilejob.h
@@ -1,6 +1,6 @@
#pragma once
-#include "generated/content-repo.h"
+#include "csapi/content-repo.h"
namespace QMatrixClient
{
diff --git a/lib/jobs/mediathumbnailjob.h b/lib/jobs/mediathumbnailjob.h
index 6e0b94f3..7963796e 100644
--- a/lib/jobs/mediathumbnailjob.h
+++ b/lib/jobs/mediathumbnailjob.h
@@ -18,7 +18,7 @@
#pragma once
-#include "generated/content-repo.h"
+#include "csapi/content-repo.h"
#include <QtGui/QPixmap>
diff --git a/lib/room.cpp b/lib/room.cpp
index 2ec5a591..5f2e3088 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -18,15 +18,15 @@
#include "room.h"
-#include "jobs/generated/kicking.h"
-#include "jobs/generated/inviting.h"
-#include "jobs/generated/banning.h"
-#include "jobs/generated/leaving.h"
-#include "jobs/generated/receipts.h"
-#include "jobs/generated/redaction.h"
-#include "jobs/generated/account-data.h"
-#include "jobs/generated/message_pagination.h"
-#include "jobs/generated/room_state.h"
+#include "csapi/kicking.h"
+#include "csapi/inviting.h"
+#include "csapi/banning.h"
+#include "csapi/leaving.h"
+#include "csapi/receipts.h"
+#include "csapi/redaction.h"
+#include "csapi/account-data.h"
+#include "csapi/message_pagination.h"
+#include "csapi/room_state.h"
#include "events/simplestateevents.h"
#include "events/roomavatarevent.h"
#include "events/roommemberevent.h"
diff --git a/lib/user.cpp b/lib/user.cpp
index 5c380424..025d669c 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -23,9 +23,9 @@
#include "avatar.h"
#include "events/event.h"
#include "events/roommemberevent.h"
-#include "jobs/generated/room_state.h"
-#include "jobs/generated/profile.h"
-#include "jobs/generated/content-repo.h"
+#include "csapi/room_state.h"
+#include "csapi/profile.h"
+#include "csapi/content-repo.h"
#include <QtCore/QTimer>
#include <QtCore/QRegularExpression>