File indexing completed on 2025-01-26 04:57:24

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "webengineviewer_export.h"
0010 #include <PimCommon/PluginUtil>
0011 #include <QList>
0012 #include <QObject>
0013 namespace WebEngineViewer
0014 {
0015 class NetworkUrlInterceptorPluginManagerPrivate;
0016 class NetworkPluginUrlInterceptor;
0017 /**
0018  * @brief The NetworkUrlInterceptorPluginManager class
0019  * @author Laurent Montel <montel@kde.org>
0020  */
0021 class WEBENGINEVIEWER_EXPORT NetworkUrlInterceptorPluginManager : public QObject
0022 {
0023     Q_OBJECT
0024 public:
0025     static NetworkUrlInterceptorPluginManager *self();
0026     explicit NetworkUrlInterceptorPluginManager(QObject *parent = nullptr);
0027     ~NetworkUrlInterceptorPluginManager() override;
0028 
0029     [[nodiscard]] QList<WebEngineViewer::NetworkPluginUrlInterceptor *> pluginsList() const;
0030     [[nodiscard]] QString configGroupName() const;
0031     [[nodiscard]] QString configPrefixSettingKey() const;
0032     [[nodiscard]] QList<PimCommon::PluginUtilData> pluginsDataList() const;
0033     [[nodiscard]] WebEngineViewer::NetworkPluginUrlInterceptor *pluginFromIdentifier(const QString &id);
0034 
0035 private:
0036     std::unique_ptr<NetworkUrlInterceptorPluginManagerPrivate> const d;
0037 };
0038 }