aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-09 19:13:55 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-09 19:13:55 +0900
commitae7a982f03e8e57eab014bcd8dd099d9248e63d8 (patch)
tree34c7a9985052c669e14b65adbb83fd3071ad06bf /lib
parentf438d37b169965ee0a9937b5178560a653f1197b (diff)
downloadlibquotient-ae7a982f03e8e57eab014bcd8dd099d9248e63d8.tar.gz
libquotient-ae7a982f03e8e57eab014bcd8dd099d9248e63d8.zip
csapi: presence lists are no more
Diffstat (limited to 'lib')
-rw-r--r--lib/csapi/presence.cpp46
-rw-r--r--lib/csapi/presence.h53
2 files changed, 0 insertions, 99 deletions
diff --git a/lib/csapi/presence.cpp b/lib/csapi/presence.cpp
index 8a5510b8..024d7a34 100644
--- a/lib/csapi/presence.cpp
+++ b/lib/csapi/presence.cpp
@@ -83,49 +83,3 @@ BaseJob::Status GetPresenceJob::parseJson(const QJsonDocument& data)
return Success;
}
-static const auto ModifyPresenceListJobName = QStringLiteral("ModifyPresenceListJob");
-
-ModifyPresenceListJob::ModifyPresenceListJob(const QString& userId, const QStringList& invite, const QStringList& drop)
- : BaseJob(HttpVerb::Post, ModifyPresenceListJobName,
- basePath % "/presence/list/" % userId)
-{
- QJsonObject _data;
- addParam<IfNotEmpty>(_data, QStringLiteral("invite"), invite);
- addParam<IfNotEmpty>(_data, QStringLiteral("drop"), drop);
- setRequestData(_data);
-}
-
-class GetPresenceForListJob::Private
-{
- public:
- Events data;
-};
-
-QUrl GetPresenceForListJob::makeRequestUrl(QUrl baseUrl, const QString& userId)
-{
- return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/presence/list/" % userId);
-}
-
-static const auto GetPresenceForListJobName = QStringLiteral("GetPresenceForListJob");
-
-GetPresenceForListJob::GetPresenceForListJob(const QString& userId)
- : BaseJob(HttpVerb::Get, GetPresenceForListJobName,
- basePath % "/presence/list/" % userId, false)
- , d(new Private)
-{
-}
-
-GetPresenceForListJob::~GetPresenceForListJob() = default;
-
-Events&& GetPresenceForListJob::data()
-{
- return std::move(d->data);
-}
-
-BaseJob::Status GetPresenceForListJob::parseJson(const QJsonDocument& data)
-{
- fromJson(data, d->data);
- return Success;
-}
-
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<Private> 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<Private> d;
- };
} // namespace QMatrixClient