aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/relations.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-10-03 21:02:22 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-10-03 21:02:22 +0200
commitbcae903921b81f578b0717e7376a45f9cafa16ad (patch)
treed5a2df68c4f2e8208c4f62142edbf7241fb198b9 /lib/csapi/relations.cpp
parent40b29069f55b551a67f4244c2b803b16e8287cd2 (diff)
downloadlibquotient-bcae903921b81f578b0717e7376a45f9cafa16ad.tar.gz
libquotient-bcae903921b81f578b0717e7376a45f9cafa16ad.zip
Regenerate API files from spec v1.4
Diffstat (limited to 'lib/csapi/relations.cpp')
-rw-r--r--lib/csapi/relations.cpp45
1 files changed, 26 insertions, 19 deletions
diff --git a/lib/csapi/relations.cpp b/lib/csapi/relations.cpp
index 8bcecee4..1d8febcc 100644
--- a/lib/csapi/relations.cpp
+++ b/lib/csapi/relations.cpp
@@ -7,105 +7,112 @@
using namespace Quotient;
auto queryToGetRelatingEvents(const QString& from, const QString& to,
- Omittable<int> limit)
+ Omittable<int> limit, const QString& dir)
{
QUrlQuery _q;
addParam<IfNotEmpty>(_q, QStringLiteral("from"), from);
addParam<IfNotEmpty>(_q, QStringLiteral("to"), to);
addParam<IfNotEmpty>(_q, QStringLiteral("limit"), limit);
+ addParam<IfNotEmpty>(_q, QStringLiteral("dir"), dir);
return _q;
}
QUrl GetRelatingEventsJob::makeRequestUrl(QUrl baseUrl, const QString& roomId,
const QString& eventId,
const QString& from, const QString& to,
- Omittable<int> limit)
+ Omittable<int> limit,
+ const QString& dir)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
makePath("/_matrix/client/v1", "/rooms/",
roomId, "/relations/", eventId),
- queryToGetRelatingEvents(from, to, limit));
+ queryToGetRelatingEvents(from, to, limit,
+ dir));
}
-GetRelatingEventsJob::GetRelatingEventsJob(const QString& roomId,
- const QString& eventId,
- const QString& from,
- const QString& to,
- Omittable<int> limit)
+GetRelatingEventsJob::GetRelatingEventsJob(
+ const QString& roomId, const QString& eventId, const QString& from,
+ const QString& to, Omittable<int> limit, const QString& dir)
: BaseJob(HttpVerb::Get, QStringLiteral("GetRelatingEventsJob"),
makePath("/_matrix/client/v1", "/rooms/", roomId, "/relations/",
eventId),
- queryToGetRelatingEvents(from, to, limit))
+ queryToGetRelatingEvents(from, to, limit, dir))
{
addExpectedKey("chunk");
}
auto queryToGetRelatingEventsWithRelType(const QString& from, const QString& to,
- Omittable<int> limit)
+ Omittable<int> limit,
+ const QString& dir)
{
QUrlQuery _q;
addParam<IfNotEmpty>(_q, QStringLiteral("from"), from);
addParam<IfNotEmpty>(_q, QStringLiteral("to"), to);
addParam<IfNotEmpty>(_q, QStringLiteral("limit"), limit);
+ addParam<IfNotEmpty>(_q, QStringLiteral("dir"), dir);
return _q;
}
QUrl GetRelatingEventsWithRelTypeJob::makeRequestUrl(
QUrl baseUrl, const QString& roomId, const QString& eventId,
const QString& relType, const QString& from, const QString& to,
- Omittable<int> limit)
+ Omittable<int> limit, const QString& dir)
{
return BaseJob::makeRequestUrl(
std::move(baseUrl),
makePath("/_matrix/client/v1", "/rooms/", roomId, "/relations/",
eventId, "/", relType),
- queryToGetRelatingEventsWithRelType(from, to, limit));
+ queryToGetRelatingEventsWithRelType(from, to, limit, dir));
}
GetRelatingEventsWithRelTypeJob::GetRelatingEventsWithRelTypeJob(
const QString& roomId, const QString& eventId, const QString& relType,
- const QString& from, const QString& to, Omittable<int> limit)
+ const QString& from, const QString& to, Omittable<int> limit,
+ const QString& dir)
: BaseJob(HttpVerb::Get, QStringLiteral("GetRelatingEventsWithRelTypeJob"),
makePath("/_matrix/client/v1", "/rooms/", roomId, "/relations/",
eventId, "/", relType),
- queryToGetRelatingEventsWithRelType(from, to, limit))
+ queryToGetRelatingEventsWithRelType(from, to, limit, dir))
{
addExpectedKey("chunk");
}
auto queryToGetRelatingEventsWithRelTypeAndEventType(const QString& from,
const QString& to,
- Omittable<int> limit)
+ Omittable<int> limit,
+ const QString& dir)
{
QUrlQuery _q;
addParam<IfNotEmpty>(_q, QStringLiteral("from"), from);
addParam<IfNotEmpty>(_q, QStringLiteral("to"), to);
addParam<IfNotEmpty>(_q, QStringLiteral("limit"), limit);
+ addParam<IfNotEmpty>(_q, QStringLiteral("dir"), dir);
return _q;
}
QUrl GetRelatingEventsWithRelTypeAndEventTypeJob::makeRequestUrl(
QUrl baseUrl, const QString& roomId, const QString& eventId,
const QString& relType, const QString& eventType, const QString& from,
- const QString& to, Omittable<int> limit)
+ const QString& to, Omittable<int> limit, const QString& dir)
{
return BaseJob::makeRequestUrl(
std::move(baseUrl),
makePath("/_matrix/client/v1", "/rooms/", roomId, "/relations/",
eventId, "/", relType, "/", eventType),
- queryToGetRelatingEventsWithRelTypeAndEventType(from, to, limit));
+ queryToGetRelatingEventsWithRelTypeAndEventType(from, to, limit, dir));
}
GetRelatingEventsWithRelTypeAndEventTypeJob::
GetRelatingEventsWithRelTypeAndEventTypeJob(
const QString& roomId, const QString& eventId, const QString& relType,
const QString& eventType, const QString& from, const QString& to,
- Omittable<int> limit)
+ Omittable<int> limit, const QString& dir)
: BaseJob(HttpVerb::Get,
QStringLiteral("GetRelatingEventsWithRelTypeAndEventTypeJob"),
makePath("/_matrix/client/v1", "/rooms/", roomId, "/relations/",
eventId, "/", relType, "/", eventType),
- queryToGetRelatingEventsWithRelTypeAndEventType(from, to, limit))
+ queryToGetRelatingEventsWithRelTypeAndEventType(from, to, limit,
+ dir))
{
addExpectedKey("chunk");
}