File indexing completed on 2024-05-12 05:12:55

0001 /*
0002    SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QObject>
0010 #include <QUrl>
0011 
0012 #include "akregator_export.h"
0013 namespace Akregator
0014 {
0015 class AKREGATOR_EXPORT DownloadFeedIconJob : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit DownloadFeedIconJob(QObject *parent = nullptr);
0020     ~DownloadFeedIconJob() override;
0021     [[nodiscard]] bool start();
0022     [[nodiscard]] bool canStart() const;
0023 
0024     [[nodiscard]] QUrl feedIconUrl() const;
0025     void setFeedIconUrl(const QUrl &feedIconUrl);
0026 
0027     [[nodiscard]] bool downloadFavicon() const;
0028     void setDownloadFavicon(bool downloadFavicon);
0029 
0030 Q_SIGNALS:
0031     void result(const QString &fileName);
0032 
0033 private:
0034     QUrl mFeedIconUrl;
0035     bool mDownloadFavicon = true;
0036 };
0037 }