File indexing completed on 2024-12-22 04:45:16
0001 /* 0002 SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "channelgroupbasejob.h" 0010 #include "librestapi_private_export.h" 0011 0012 class QNetworkRequest; 0013 namespace RocketChatRestApi 0014 { 0015 class LIBROCKETCHATRESTAPI_QT_TESTS_EXPORT GetChannelRolesJob : public ChannelGroupBaseJob 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit GetChannelRolesJob(QObject *parent = nullptr); 0020 ~GetChannelRolesJob() override; 0021 0022 [[nodiscard]] bool start() override; 0023 0024 [[nodiscard]] bool canStart() const override; 0025 0026 [[nodiscard]] QNetworkRequest request() const override; 0027 0028 [[nodiscard]] bool requireHttpAuthentication() const override; 0029 0030 protected: 0031 [[nodiscard]] QString jobName() const override; 0032 0033 Q_SIGNALS: 0034 void channelRolesDone(const QJsonObject &obj, const ChannelGroupBaseJob::ChannelGroupInfo &channelInfo); 0035 0036 private: 0037 Q_DISABLE_COPY(GetChannelRolesJob) 0038 void onGetRequestResponse(const QString &replyErrorString, const QJsonDocument &replyJson) override; 0039 }; 0040 }