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