aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/event_context.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-18 18:39:56 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-18 18:39:56 +0900
commit5e6b4bb975fa9697a6aca001629c65db506a437f (patch)
treedeeb501bd6b534dc1ce454fb03e2d91e09597770 /lib/csapi/event_context.h
parent56480bc96b28356c44547cc3d9ea1afbda9f04f9 (diff)
downloadlibquotient-5e6b4bb975fa9697a6aca001629c65db506a437f.tar.gz
libquotient-5e6b4bb975fa9697a6aca001629c65db506a437f.zip
csapi: Doxy-comments thanks to the latest GTAD
Diffstat (limited to 'lib/csapi/event_context.h')
-rw-r--r--lib/csapi/event_context.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/lib/csapi/event_context.h b/lib/csapi/event_context.h
index 22c9cbc3..41ee202c 100644
--- a/lib/csapi/event_context.h
+++ b/lib/csapi/event_context.h
@@ -13,14 +13,28 @@ namespace QMatrixClient
{
// Operations
+ /// Get events and state around the specified event.
+ ///
+ /// This API returns a number of events that happened just before and
+ /// after the specified event. This allows clients to get the context
+ /// surrounding an event.
class GetEventContextJob : public BaseJob
{
public:
+ /*! Get events and state around the specified event.
+ * \param roomId
+ * The room to get events from.
+ * \param eventId
+ * The event to get context around.
+ * \param limit
+ * The maximum number of events to return. Default: 10.
+ */
explicit GetEventContextJob(const QString& roomId, const QString& eventId, Omittable<int> limit = none);
- /** 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
+ /*! Construct a URL without creating a full-fledged job object
+ *
+ * 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, Omittable<int> limit = none);
@@ -29,11 +43,19 @@ namespace QMatrixClient
// Result properties
+ /// A token that can be used to paginate backwards with.
const QString& begin() const;
+ /// A token that can be used to paginate forwards with.
const QString& end() const;
+ /// A list of room events that happened just before the
+ /// requested event, in reverse-chronological order.
RoomEvents&& eventsBefore();
+ /// Details of the requested event.
RoomEventPtr&& event();
+ /// A list of room events that happened just after the
+ /// requested event, in chronological order.
RoomEvents&& eventsAfter();
+ /// The state of the room at the last event returned.
StateEvents&& state();
protected: