1 /* 2 SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org> 3 4 SPDX-License-Identifier: LGPL-2.0-or-later 5 */ 6 7 #pragma once 8 9 #include "librocketchatrestapi-qt5_export.h" 10 #include "userbasejob.h" 11 12 #include <QNetworkRequest> 13 namespace RocketChatRestApi 14 { 15 class LIBROCKETCHATRESTAPI_QT5_EXPORT UsersListJob : public UserBaseJob 16 { 17 Q_OBJECT 18 public: 19 explicit UsersListJob(QObject *parent = nullptr); 20 ~UsersListJob() override; 21 22 Q_REQUIRED_RESULT bool requireHttpAuthentication() const override; 23 24 Q_REQUIRED_RESULT bool start() override; 25 26 Q_REQUIRED_RESULT bool canStart() const override; 27 28 Q_REQUIRED_RESULT QNetworkRequest request() const override; 29 30 Q_REQUIRED_RESULT bool hasQueryParameterSupport() const override; 31 32 Q_SIGNALS: 33 void userListDone(const QJsonObject &obj); 34 35 private: 36 Q_DISABLE_COPY(UsersListJob) 37 void onGetRequestResponse(const QJsonDocument &replyJson) override; 38 }; 39 } 40