File indexing completed on 2024-05-12 05:37:17

0001 /*
0002     SPDX-FileCopyrightText: 2007 Tobias Koenig <tokoe@kde.org>
0003     SPDX-FileCopyrightText: 2008 Marco Martin <notmart@gmail.com>
0004     SPDX-FileCopyrightText: 2013 Andrea Scarpino <scarpino@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #pragma once
0010 
0011 #include <Plasma5Support/DataEngine>
0012 
0013 class FaviconProvider;
0014 
0015 /**
0016  * This class provides favicons for websites
0017  *
0018  * the queries are just the url of websites we want to fetch an icon
0019  */
0020 class FaviconsEngine : public Plasma5Support::DataEngine
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     FaviconsEngine(QObject *parent);
0026     ~FaviconsEngine() override;
0027 
0028 protected:
0029     bool sourceRequestEvent(const QString &identifier) override;
0030 
0031 protected Q_SLOTS:
0032     bool updateSourceEvent(const QString &identifier) override;
0033 
0034 private Q_SLOTS:
0035     void finished(FaviconProvider *);
0036     void error(FaviconProvider *);
0037 };