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