From 8dcda23ed210151904c9137067626eddae683822 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 13 Dec 2018 07:47:58 +0900 Subject: Regenerate csapi/ --- lib/csapi/presence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index 86b9d395..c8f80357 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -65,7 +65,7 @@ namespace QMatrixClient /// The state message for this user if one was set. const QString& statusMsg() const; /// Whether the user is currently active - bool currentlyActive() const; + Omittable currentlyActive() const; protected: Status parseJson(const QJsonDocument& data) override; -- cgit v1.2.3 From ae7a982f03e8e57eab014bcd8dd099d9248e63d8 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 9 Feb 2019 19:13:55 +0900 Subject: csapi: presence lists are no more --- lib/csapi/presence.h | 53 ---------------------------------------------------- 1 file changed, 53 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index c8f80357..5e132d24 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -6,7 +6,6 @@ #include "jobs/basejob.h" -#include "events/eventloader.h" #include "converters.h" namespace QMatrixClient @@ -74,56 +73,4 @@ namespace QMatrixClient class Private; QScopedPointer d; }; - - /// Add or remove users from this presence list. - /// - /// Adds or removes users from this presence list. - class ModifyPresenceListJob : public BaseJob - { - public: - /*! Add or remove users from this presence list. - * \param userId - * The user whose presence list is being modified. - * \param invite - * A list of user IDs to add to the list. - * \param drop - * A list of user IDs to remove from the list. - */ - explicit ModifyPresenceListJob(const QString& userId, const QStringList& invite = {}, const QStringList& drop = {}); - }; - - /// Get presence events for this presence list. - /// - /// Retrieve a list of presence events for every user on this list. - class GetPresenceForListJob : public BaseJob - { - public: - /*! Get presence events for this presence list. - * \param userId - * The user whose presence list should be retrieved. - */ - explicit GetPresenceForListJob(const QString& userId); - - /*! Construct a URL without creating a full-fledged job object - * - * This function can be used when a URL for - * GetPresenceForListJob is necessary but the job - * itself isn't. - */ - static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId); - - ~GetPresenceForListJob() override; - - // Result properties - - /// A list of presence events for this list. - Events&& data(); - - protected: - Status parseJson(const QJsonDocument& data) override; - - private: - class Private; - QScopedPointer d; - }; } // namespace QMatrixClient -- cgit v1.2.3 From aacc4bcb4a487871daae6717f77605aaba444341 Mon Sep 17 00:00:00 2001 From: Marc Deop Date: Sat, 2 Mar 2019 12:26:57 +0100 Subject: style: apply .clang-format to all .cpp and .h files --- lib/csapi/presence.h | 74 ++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index 5e132d24..881d9d5e 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -8,8 +8,7 @@ #include "converters.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Operations /// Update this user's presence state. @@ -21,15 +20,16 @@ namespace QMatrixClient class SetPresenceJob : public BaseJob { public: - /*! Update this user's presence state. - * \param userId - * The user whose presence state to update. - * \param presence - * The new presence state. - * \param statusMsg - * The status message to attach to this state. - */ - explicit SetPresenceJob(const QString& userId, const QString& presence, const QString& statusMsg = {}); + /*! Update this user's presence state. + * \param userId + * The user whose presence state to update. + * \param presence + * The new presence state. + * \param statusMsg + * The status message to attach to this state. + */ + explicit SetPresenceJob(const QString& userId, const QString& presence, + const QString& statusMsg = {}); }; /// Get this user's presence state. @@ -38,39 +38,39 @@ namespace QMatrixClient class GetPresenceJob : public BaseJob { public: - /*! Get this user's presence state. - * \param userId - * The user whose presence state to get. - */ - explicit GetPresenceJob(const QString& userId); + /*! Get this user's presence state. + * \param userId + * The user whose presence state to get. + */ + explicit GetPresenceJob(const QString& userId); - /*! Construct a URL without creating a full-fledged job object - * - * This function can be used when a URL for - * GetPresenceJob is necessary but the job - * itself isn't. - */ - static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId); + /*! Construct a URL without creating a full-fledged job object + * + * This function can be used when a URL for + * GetPresenceJob is necessary but the job + * itself isn't. + */ + static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId); - ~GetPresenceJob() override; + ~GetPresenceJob() override; - // Result properties + // Result properties - /// This user's presence. - const QString& presence() const; - /// The length of time in milliseconds since an action was performed - /// by this user. - Omittable lastActiveAgo() const; - /// The state message for this user if one was set. - const QString& statusMsg() const; - /// Whether the user is currently active - Omittable currentlyActive() const; + /// This user's presence. + const QString& presence() const; + /// The length of time in milliseconds since an action was performed + /// by this user. + Omittable lastActiveAgo() const; + /// The state message for this user if one was set. + const QString& statusMsg() const; + /// Whether the user is currently active + Omittable currentlyActive() const; protected: - Status parseJson(const QJsonDocument& data) override; + Status parseJson(const QJsonDocument& data) override; private: - class Private; - QScopedPointer d; + class Private; + QScopedPointer d; }; } // namespace QMatrixClient -- cgit v1.2.3 From 27ca32a1e5a56e09b9cc1d94224d2831004dcf3d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jul 2019 19:32:34 +0900 Subject: Namespace: QMatrixClient -> Quotient (with back comp alias) --- lib/csapi/presence.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index 82c3a300..c5ecb987 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -8,7 +8,7 @@ #include "jobs/basejob.h" -namespace QMatrixClient +namespace Quotient { // Operations @@ -78,4 +78,4 @@ private: QScopedPointer d; }; -} // namespace QMatrixClient +} // namespace Quotient -- cgit v1.2.3 From 7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 17 Apr 2020 07:42:13 +0200 Subject: Regenerate API files using new GTAD and refreshed templates No functional changes. --- lib/csapi/presence.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index c5ecb987..21e57603 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -8,22 +8,21 @@ #include "jobs/basejob.h" -namespace Quotient -{ +namespace Quotient { // Operations -/// Update this user's presence state. -/*! +/*! \brief Update this user's presence state. + * * This API sets the given user's presence state. When setting the status, * the activity time is updated to reflect that activity; the client does * not need to specify the ``last_active_ago`` field. You cannot set the * presence state of another user. */ -class SetPresenceJob : public BaseJob -{ +class SetPresenceJob : public BaseJob { public: - /*! Update this user's presence state. + /*! \brief Update this user's presence state. + * * \param userId * The user whose presence state to update. * \param presence @@ -35,38 +34,39 @@ public: const QString& statusMsg = {}); }; -/// Get this user's presence state. -/*! +/*! \brief Get this user's presence state. + * * Get the given user's presence state. */ -class GetPresenceJob : public BaseJob -{ +class GetPresenceJob : public BaseJob { public: - /*! Get this user's presence state. + /*! \brief Get this user's presence state. + * * \param userId * The user whose presence state to get. */ explicit GetPresenceJob(const QString& userId); - /*! Construct a URL without creating a full-fledged job object + /*! \brief Construct a URL without creating a full-fledged job object * - * This function can be used when a URL for - * GetPresenceJob is necessary but the job - * itself isn't. + * This function can be used when a URL for GetPresenceJob + * is necessary but the job itself isn't. */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId); - ~GetPresenceJob() override; // Result properties /// This user's presence. const QString& presence() const; + /// The length of time in milliseconds since an action was performed /// by this user. Omittable lastActiveAgo() const; + /// The state message for this user if one was set. const QString& statusMsg() const; + /// Whether the user is currently active Omittable currentlyActive() const; -- cgit v1.2.3 From 32729d9a7519cd2c4cddb0174b8329c6fd4a4a83 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jun 2020 19:46:40 +0200 Subject: Update generated files according to gtad/* changes --- lib/csapi/presence.h | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index 21e57603..b34028e7 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -4,14 +4,10 @@ #pragma once -#include "converters.h" - #include "jobs/basejob.h" namespace Quotient { -// Operations - /*! \brief Update this user's presence state. * * This API sets the given user's presence state. When setting the status, @@ -22,11 +18,14 @@ namespace Quotient { class SetPresenceJob : public BaseJob { public: /*! \brief Update this user's presence state. + * * * \param userId * The user whose presence state to update. + * * \param presence * The new presence state. + * * \param statusMsg * The status message to attach to this state. */ @@ -41,6 +40,7 @@ public: class GetPresenceJob : public BaseJob { public: /*! \brief Get this user's presence state. + * * * \param userId * The user whose presence state to get. @@ -53,29 +53,27 @@ public: * is necessary but the job itself isn't. */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& userId); - ~GetPresenceJob() override; // Result properties /// This user's presence. - const QString& presence() const; + QString presence() const { return loadFromJson("presence"_ls); } /// The length of time in milliseconds since an action was performed /// by this user. - Omittable lastActiveAgo() const; + Omittable lastActiveAgo() const + { + return loadFromJson>("last_active_ago"_ls); + } /// The state message for this user if one was set. - const QString& statusMsg() const; + QString statusMsg() const { return loadFromJson("status_msg"_ls); } /// Whether the user is currently active - Omittable currentlyActive() const; - -protected: - Status parseJson(const QJsonDocument& data) override; - -private: - class Private; - QScopedPointer d; + Omittable currentlyActive() const + { + return loadFromJson>("currently_active"_ls); + } }; } // namespace Quotient -- cgit v1.2.3 From e17764a1ae81393968dfb747c7b67353c109bc71 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 19 Jun 2020 15:01:33 +0200 Subject: csapi/: generated using the latest GTAD and matrix-doc For matrix-doc, specifically, it is master (5cb4b086) merged with https://github.com/matrix-org/matrix-doc/pull/2518. --- lib/csapi/presence.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index b34028e7..a885bf4f 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -18,7 +18,6 @@ namespace Quotient { class SetPresenceJob : public BaseJob { public: /*! \brief Update this user's presence state. - * * * \param userId * The user whose presence state to update. @@ -40,7 +39,6 @@ public: class GetPresenceJob : public BaseJob { public: /*! \brief Get this user's presence state. - * * * \param userId * The user whose presence state to get. -- cgit v1.2.3 From 0d4315008374d9a4dfb11f934875b1a16670ec74 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 23 Jun 2021 19:12:38 +0200 Subject: Re-generate API files --- lib/csapi/presence.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index a885bf4f..c817ad9f 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -12,7 +12,7 @@ namespace Quotient { * * This API sets the given user's presence state. When setting the status, * the activity time is updated to reflect that activity; the client does - * not need to specify the ``last_active_ago`` field. You cannot set the + * not need to specify the `last_active_ago` field. You cannot set the * presence state of another user. */ class SetPresenceJob : public BaseJob { @@ -55,7 +55,10 @@ public: // Result properties /// This user's presence. - QString presence() const { return loadFromJson("presence"_ls); } + QString presence() const + { + return loadFromJson("presence"_ls); + } /// The length of time in milliseconds since an action was performed /// by this user. @@ -65,7 +68,10 @@ public: } /// The state message for this user if one was set. - QString statusMsg() const { return loadFromJson("status_msg"_ls); } + QString statusMsg() const + { + return loadFromJson("status_msg"_ls); + } /// Whether the user is currently active Omittable currentlyActive() const -- cgit v1.2.3 From f7cbefe5ad626ae1798a5d7bb7546e89ad336acd Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 7 Aug 2021 16:55:06 +0200 Subject: API files: reformat after .clang-format change See 000b5730. --- lib/csapi/presence.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index c817ad9f..4ab50e25 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -55,10 +55,7 @@ public: // Result properties /// This user's presence. - QString presence() const - { - return loadFromJson("presence"_ls); - } + QString presence() const { return loadFromJson("presence"_ls); } /// The length of time in milliseconds since an action was performed /// by this user. @@ -68,10 +65,7 @@ public: } /// The state message for this user if one was set. - QString statusMsg() const - { - return loadFromJson("status_msg"_ls); - } + QString statusMsg() const { return loadFromJson("status_msg"_ls); } /// Whether the user is currently active Omittable currentlyActive() const -- cgit v1.2.3 From 952f8aa8ad19348b50a3b3545d98f7889bfdae76 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 29 Dec 2021 15:57:33 +0100 Subject: Regenerate CS API files --- lib/csapi/presence.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/csapi/presence.h') diff --git a/lib/csapi/presence.h b/lib/csapi/presence.h index 4ab50e25..52445205 100644 --- a/lib/csapi/presence.h +++ b/lib/csapi/presence.h @@ -15,7 +15,7 @@ namespace Quotient { * not need to specify the `last_active_ago` field. You cannot set the * presence state of another user. */ -class SetPresenceJob : public BaseJob { +class QUOTIENT_API SetPresenceJob : public BaseJob { public: /*! \brief Update this user's presence state. * @@ -36,7 +36,7 @@ public: * * Get the given user's presence state. */ -class GetPresenceJob : public BaseJob { +class QUOTIENT_API GetPresenceJob : public BaseJob { public: /*! \brief Get this user's presence state. * -- cgit v1.2.3