diff options
author | Marc Deop <marc@marcdeop.com> | 2019-03-02 12:26:57 +0100 |
---|---|---|
committer | Marc Deop <marc@marcdeop.com> | 2019-03-02 12:26:57 +0100 |
commit | aacc4bcb4a487871daae6717f77605aaba444341 (patch) | |
tree | 4f50b6874821667ccb6b91c017e5d041e3846112 /lib/csapi/event_context.h | |
parent | c971b924cd62822ed6fb1a0291c483ae73a3ecda (diff) | |
download | libquotient-aacc4bcb4a487871daae6717f77605aaba444341.tar.gz libquotient-aacc4bcb4a487871daae6717f77605aaba444341.zip |
style: apply .clang-format to all .cpp and .h files
Diffstat (limited to 'lib/csapi/event_context.h')
-rw-r--r-- | lib/csapi/event_context.h | 79 |
1 files changed, 41 insertions, 38 deletions
diff --git a/lib/csapi/event_context.h b/lib/csapi/event_context.h index a5fda7ea..cfefc550 100644 --- a/lib/csapi/event_context.h +++ b/lib/csapi/event_context.h @@ -6,11 +6,10 @@ #include "jobs/basejob.h" -#include "events/eventloader.h" #include "converters.h" +#include "events/eventloader.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Operations /// Get events and state around the specified event. @@ -21,48 +20,52 @@ namespace QMatrixClient 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); + /*! 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 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); + /*! 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); - ~GetEventContextJob() override; + ~GetEventContextJob() override; - // Result properties + // 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(); + /// 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: - Status parseJson(const QJsonDocument& data) override; + Status parseJson(const QJsonDocument& data) override; private: - class Private; - QScopedPointer<Private> d; + class Private; + QScopedPointer<Private> d; }; } // namespace QMatrixClient |