1 /* 2 This file is part of Akregator. 3 4 SPDX-FileCopyrightText: 2008 Frank Osterfeld <osterfeld@kde.org> 5 6 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 7 */ 8 9 #pragma once 10 11 #include "command.h" 12 13 #include <QWeakPointer> 14 15 #include <memory> 16 17 namespace Akregator 18 { 19 class FeedList; 20 class DeleteSubscriptionCommandPrivate; 21 22 class DeleteSubscriptionCommand : public Command 23 { 24 Q_OBJECT 25 public: 26 explicit DeleteSubscriptionCommand(QObject *parent = nullptr); 27 ~DeleteSubscriptionCommand() override; 28 29 void setSubscription(const QWeakPointer<FeedList> &feedList, uint subId); 30 31 uint subscriptionId() const; 32 QWeakPointer<FeedList> feedList() const; 33 34 private: 35 void doStart() override; 36 void doAbort() override; 37 38 private: 39 friend class DeleteSubscriptionCommandPrivate; 40 std::unique_ptr<DeleteSubscriptionCommandPrivate> const d; 41 }; 42 } 43 44