File indexing completed on 2025-01-19 03:55:36

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2018-07-30
0007  * Description : manager to load external plugins at run-time: private container
0008  *
0009  * SPDX-FileCopyrightText: 2018-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_DPLUGIN_LOADER_P_H
0016 #define DIGIKAM_DPLUGIN_LOADER_P_H
0017 
0018 #include "dpluginloader.h"
0019 
0020 // Qt includes
0021 
0022 #include <QDir>
0023 #include <QPluginLoader>
0024 
0025 namespace Digikam
0026 {
0027 
0028 class Q_DECL_HIDDEN DPluginLoader::Private
0029 {
0030 public:
0031 
0032     explicit Private();
0033     ~Private();
0034 
0035     /**
0036      * Try to find plugin files from Qt5 plugins install dir:
0037      */
0038     QFileInfoList pluginEntriesList() const;
0039 
0040     /**
0041      * Stage to load plugins in memory
0042      */
0043     void loadPlugins();
0044 
0045     /**
0046      * Append object to the given plugins list.
0047      */
0048     bool appendPlugin(QObject* const obj,
0049                       QPluginLoader* const loader);
0050 
0051 public:
0052 
0053     bool                  pluginsLoaded;
0054     QList<DPlugin*>       allPlugins;
0055     QStringList           blacklist;
0056     QStringList           whitelist;
0057     QStringList           DKBlacklist;      ///< Showfoto specific plugins to ignore in digiKam.
0058 };
0059 
0060 } // namespace Digikam
0061 
0062 #endif // DIGIKAM_DPLUGIN_LOADER_P_H