1 /* 2 SPDX-FileCopyrightText: 2019-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 "restapiabstractjob.h" 11 namespace RocketChatRestApi 12 { 13 class LIBROCKETCHATRESTAPI_QT5_EXPORT EmojiCustomDeleteJob : public RestApiAbstractJob 14 { 15 Q_OBJECT 16 public: 17 explicit EmojiCustomDeleteJob(QObject *parent = nullptr); 18 ~EmojiCustomDeleteJob() override; 19 20 Q_REQUIRED_RESULT bool start() override; 21 Q_REQUIRED_RESULT bool requireHttpAuthentication() const override; 22 Q_REQUIRED_RESULT bool canStart() const override; 23 24 Q_REQUIRED_RESULT QNetworkRequest request() const override; 25 26 Q_REQUIRED_RESULT QJsonDocument json() const; 27 28 Q_REQUIRED_RESULT QString emojiId() const; 29 void setEmojiId(const QString &emojiId); 30 31 Q_SIGNALS: 32 void emojiCustomDeleteDone(); 33 34 private: 35 Q_DISABLE_COPY(EmojiCustomDeleteJob) 36 void onPostRequestResponse(const QJsonDocument &replyJson) override; 37 QString mEmojiId; 38 }; 39 } 40