File indexing completed on 2024-05-05 05:13:00

0001 /*
0002     This file is part of Akregator.
0003 
0004     SPDX-FileCopyrightText: 2008 Frank Osterfeld <osterfeld@kde.org>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
0007 */
0008 
0009 #pragma once
0010 
0011 #include "command.h"
0012 
0013 #include <QWeakPointer>
0014 
0015 #include <memory>
0016 
0017 namespace Akregator
0018 {
0019 class FeedList;
0020 class DeleteSubscriptionCommandPrivate;
0021 
0022 class DeleteSubscriptionCommand : public Command
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit DeleteSubscriptionCommand(QObject *parent = nullptr);
0027     ~DeleteSubscriptionCommand() override;
0028 
0029     void setSubscription(const QWeakPointer<FeedList> &feedList, uint subId);
0030 
0031     uint subscriptionId() const;
0032     QWeakPointer<FeedList> feedList() const;
0033 
0034 private:
0035     void doStart() override;
0036     void doAbort() override;
0037 
0038 private:
0039     friend class DeleteSubscriptionCommandPrivate;
0040     std::unique_ptr<DeleteSubscriptionCommandPrivate> const d;
0041 };
0042 }