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 <QList>
0014 
0015 #include <QWeakPointer>
0016 
0017 #include <memory>
0018 
0019 namespace Akregator
0020 {
0021 class FeedList;
0022 class ExpireItemsCommandPrivate;
0023 
0024 class ExpireItemsCommand : public Command
0025 {
0026     Q_OBJECT
0027 public:
0028     explicit ExpireItemsCommand(QObject *parent = nullptr);
0029     ~ExpireItemsCommand() override;
0030 
0031     void setFeedList(const QWeakPointer<FeedList> &feedList);
0032     [[nodiscard]] QWeakPointer<FeedList> feedList() const;
0033 
0034     void setFeeds(const QList<uint> &feeds);
0035     [[nodiscard]] QList<uint> feeds() const;
0036 
0037 private:
0038     void doStart() override;
0039     void doAbort() override;
0040 
0041 private:
0042     friend class ExpireItemsCommandPrivate;
0043     std::unique_ptr<ExpireItemsCommandPrivate> const d;
0044 };
0045 }