File indexing completed on 2024-05-12 05:22:10
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "kgapiblogger_export.h" 0010 #include "modifyjob.h" 0011 0012 namespace KGAPI2 0013 { 0014 namespace Blogger 0015 { 0016 0017 class KGAPIBLOGGER_EXPORT CommentApproveJob : public KGAPI2::ModifyJob 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 enum ApprovalAction { Approve, MarkAsSpam }; 0023 explicit CommentApproveJob(const QString &blogId, 0024 const QString &postId, 0025 const QString &commentId, 0026 ApprovalAction action, 0027 const AccountPtr &account, 0028 QObject *parent = nullptr); 0029 explicit CommentApproveJob(const CommentPtr &comment, ApprovalAction action, const AccountPtr &account, QObject *parent = nullptr); 0030 ~CommentApproveJob() override; 0031 0032 protected: 0033 void start() override; 0034 ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override; 0035 0036 private: 0037 class Private; 0038 Private *const d; 0039 friend class Private; 0040 }; 0041 0042 } // namespace Blogger 0043 } // namespace KGAPI2