File indexing completed on 2023-09-24 04:14:57

0001 /*
0002     SPDX-FileCopyrightText: 2010 Ryan Rix <ry@n.rix.si>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef PLUGIN_LOADER_H
0008 #define PLUGIN_LOADER_H
0009 
0010 #include <plasma/plasma_export.h>
0011 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 94)
0012 #include <KPluginInfo>
0013 #include <plasma/package.h>
0014 #else
0015 class KPluginInfo;
0016 #endif
0017 
0018 #include <plasma/plasma.h>
0019 
0020 #include <QVariant>
0021 
0022 class KPluginMetaData;
0023 namespace Plasma
0024 {
0025 class Applet;
0026 class Containment;
0027 class ContainmentActions;
0028 class DataEngine;
0029 class Service;
0030 
0031 #if PLASMA_BUILD_DEPRECATED_SINCE(5, 86)
0032 class Package; // FWD class so that excluding deprecated API does not cause an unknown type
0033 #endif
0034 
0035 class PluginLoaderPrivate;
0036 
0037 // TODO:
0038 // * add loadWallpaper
0039 // * add KPluginInfo listing support for Containments (already loaded via the applet loading code)
0040 
0041 /**
0042  * @class PluginLoader plasma/pluginloader.h <Plasma/PluginLoader>
0043  *
0044  * This is an abstract base class which defines an interface to which Plasma's
0045  * Applet Loading logic can communicate with a parent application. The plugin loader
0046  * must be set before any plugins are loaded, otherwise (for safety reasons), the
0047  * default PluginLoader implementation will be used. The reimplemented version should
0048  * not do more than simply returning a loaded plugin. It should not init() it, and it should not
0049  * hang on to it. The associated methods will be called only when a component of Plasma
0050  * needs to load a _new_ plugin. (e.g. DataEngine does its own caching).
0051  *
0052  * @author Ryan Rix <ry@n.rix.si>
0053  * @since 4.6
0054  **/
0055 class PLASMA_EXPORT PluginLoader
0056 {
0057 public:
0058     /**
0059      * Load an Applet plugin.
0060      *
0061      * @param name the plugin name, as returned by KPluginInfo::pluginName()
0062      * @param appletId unique ID to assign the applet, or zero to have one
0063      *        assigned automatically.
0064      * @param args to send the applet extra arguments
0065      * @return a pointer to the loaded applet, or 0 on load failure
0066      **/
0067     Applet *loadApplet(const QString &name, uint appletId = 0, const QVariantList &args = QVariantList());
0068 
0069 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 94)
0070     /**
0071      * Load a dataengine plugin.
0072      *
0073      * @param name the name of the engine
0074      * @return the dataengine that was loaded, or the NullEngine on failure.
0075      * @deprecated Since 5.94, Dataengines are being phased out, please port away from them if possible
0076      * or load the plugin from the "plasma/dataengine" namespace manually using KPluginMetaData/KPluginFactory
0077      */
0078     PLASMA_DEPRECATED_VERSION(
0079         5,
0080         94,
0081         "Dataengines are being phased out, please port away from them if possible or load the plugin from the \"plasma/dataengine\" namespace manually")
0082     DataEngine *loadDataEngine(const QString &name);
0083 #endif
0084 
0085 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 94)
0086     /**
0087      * @return a listing of all known dataengines by name
0088      *
0089      * @param parentApp the application to filter dataengines on. Uses the
0090      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0091      *                  The default value of QString() will result in a
0092      *                  list of all dataengines.
0093      * @deprecated Since 5.94, Dataengines are being phased out, please port away from them if possible
0094      * or query the plugins in the "plasma/dataengine" namespace manually using KPluginMetaData
0095      */
0096     PLASMA_DEPRECATED_VERSION(
0097         5,
0098         94,
0099         "Dataengines are being phased out, please port away from them if possible or query the plugins in the \"plasma/dataengine\" namespace manually")
0100     static QStringList listAllEngines(const QString &parentApp = QString());
0101 #endif
0102 
0103 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 77)
0104     /**
0105      * Returns a list of all known dataengines.
0106      *
0107      * @param parentApp the application to filter dataengines on. Uses the
0108      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0109      *                  The default value of QString() will result in a
0110      *                  list of all dataengines.
0111      * @return list of dataengines
0112      * @deprecated since 5.77, use listDataEngineMetaData instead.
0113      **/
0114     PLASMA_DEPRECATED_VERSION(5, 77, "Use listDataEngineMetaData instead")
0115     static KPluginInfo::List listEngineInfo(const QString &parentApp = QString());
0116 #endif
0117 
0118 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 81)
0119     /**
0120      * Returns a list of all known dataengines filtering by category.
0121      *
0122      * @param category the category to filter dataengines on. Uses the
0123      *                  X-KDE-PluginInfo-Category entry (if any) in the
0124      *                  plugin info. The value of QString() will
0125      *                  result in a list of dataengines with an empty category.
0126      *
0127      * @param parentApp the application to filter dataengines on. Uses the
0128      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0129      *                  The default value of QString() will result in a
0130      *                  list of all dataengines in specified categories.
0131      * @return list of dataengines
0132      * @deprecated since 5.81, use listDataEngineMetaData() instead.
0133      * @since 4.3
0134      **/
0135     PLASMA_DEPRECATED_VERSION(5, 81, "Use listDataEngineMetaData instead")
0136     static KPluginInfo::List listEngineInfoByCategory(const QString &category, const QString &parentApp = QString());
0137 #endif
0138 
0139     /**
0140      * Load a Service plugin.
0141      *
0142      * @param name the plugin name of the service to load
0143      * @param args a list of arguments to supply to the service plugin when loading it
0144      * @param parent the parent object, if any, for the service
0145      *
0146      * @return a Service object, unlike Plasma::Service::loadService, this can return null.
0147      **/
0148     Service *loadService(const QString &name, const QVariantList &args, QObject *parent = nullptr);
0149 
0150     /**
0151      * Load a ContainmentActions plugin.
0152      *
0153      * Returns a pointer to the containmentactions if successful.
0154      * The caller takes responsibility for the containmentactions, including
0155      * deleting it when no longer needed.
0156      *
0157      * @param parent the parent containment. @since 4.6 null is allowed.
0158      * @param name the plugin name, as returned by KPluginInfo::pluginName()
0159      * @param args to send the containmentactions extra arguments
0160      * @return a ContainmentActions object
0161      **/
0162     ContainmentActions *loadContainmentActions(Containment *parent, const QString &containmentActionsName, const QVariantList &args = QVariantList());
0163 
0164 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 30)
0165     /**
0166      * Load a Package plugin.
0167      *
0168      * @param name the plugin name of the package to load
0169      * @param specialization used to find script extensions for the given format, e.g. "QML" for "Plasma/Applet"
0170      *
0171      * @return a Package object matching name, or an invalid package on failure
0172      * @deprecated Since 5.30, use KPackage::PackageLoader::loadPackage(const QString& packageFormat, const QString& packagePath) instead.
0173      **/
0174     PLASMA_DEPRECATED_VERSION(5, 30, "Use KPackage::PackageLoader::loadPackage(const QString&, const QString&")
0175     Package loadPackage(const QString &packageFormat, const QString &specialization = QString());
0176 #endif
0177 
0178 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 28)
0179     /**
0180      * Returns a list of all known applets.
0181      * This may skip applets based on security settings and ExcludeCategories in the application's config.
0182      *
0183      * @param category Only applets matching this category will be returned.
0184      *                 If "Misc" is passed in, then applets without a
0185      *                 Categories= entry are also returned.
0186      *                 If an empty string is passed in, all applets are
0187      *                 returned.
0188      * @param parentApp the application to filter applets on. Uses the
0189      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0190      *                  The default value of QString() will result in a
0191      *                  list of all applets in specified category.
0192      * @return list of applets
0193      *
0194      * @deprecated Since 5.28. Doesn't support metadata.json packages.
0195      * Use listAppletMetaData(const QString &category, const QString &parentApp) instead.
0196      **/
0197     PLASMA_DEPRECATED_VERSION(5, 28, "Use PluginLoader::listAppletMetaData(const QString &, const QString &)")
0198     KPluginInfo::List listAppletInfo(const QString &category, const QString &parentApp = QString());
0199 #endif
0200 
0201     /**
0202      * Returns a list of all known applets.
0203      * This may skip applets based on security settings and ExcludeCategories in the application's config.
0204      *
0205      * @param category Only applets matching this category will be returned.
0206      *                 If "Misc" is passed in, then applets without a
0207      *                 Categories= entry are also returned.
0208      *                 If an empty string is passed in, all applets are
0209      *                 returned.
0210      * @return list of applets
0211      *
0212      * @since 5.28
0213      **/
0214     QList<KPluginMetaData> listAppletMetaData(const QString &category);
0215 
0216 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 88)
0217     /**
0218      * @overload
0219      * @param parentApp the application to filter applets on. Uses the
0220      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0221      *                  The default value of QString() will result in a
0222      *                  list of all applets in specified categories.
0223      * @deprecated Since 5.88, use PluginLoader::listAppletMetaData(const QString &category)
0224      * @since 5.28
0225      */
0226     PLASMA_DEPRECATED_VERSION(5, 88, "Use PluginLoader::listAppletMetaData(const QString &category)")
0227     QList<KPluginMetaData> listAppletMetaData(const QString &category, const QString &parentApp);
0228 #endif
0229 
0230 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 36)
0231     /**
0232      * Returns a list of all known applets associated with a certain mimetype.
0233      *
0234      * @return list of applets
0235      *
0236      * @deprecated Since 5.36, use listAppletMetaDataForMimeType(const QString &mimetype) instead.
0237      **/
0238     PLASMA_DEPRECATED_VERSION(5, 36, "Use PluginLoader::listAppletMetaDataForMimeType(const QString &)")
0239     KPluginInfo::List listAppletInfoForMimeType(const QString &mimetype);
0240 #endif
0241 
0242     /**
0243      * Returns a list of all known applets associated with a certain mimetype.
0244      *
0245      * @return list of applets
0246      * @since 5.36
0247      **/
0248     QList<KPluginMetaData> listAppletMetaDataForMimeType(const QString &mimetype);
0249 
0250 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 36)
0251     /**
0252      * Returns a list of all known applets associated with a certain URL.
0253      *
0254      * @return list of applets
0255      *
0256      * @deprecated Since 5.36, use listAppletMetaDataForUrl(const QUrl &url) instead.
0257      **/
0258     PLASMA_DEPRECATED_VERSION(5, 36, "Use PluginLoader::listAppletMetaDataForUrl(const QUrl &)")
0259     KPluginInfo::List listAppletInfoForUrl(const QUrl &url);
0260 #endif
0261 
0262     /**
0263      * Returns a list of all known applets associated with a certain URL.
0264      *
0265      * @return list of applets
0266      * @since 5.36
0267      **/
0268     QList<KPluginMetaData> listAppletMetaDataForUrl(const QUrl &url);
0269 
0270     /**
0271      * Returns a list of all the categories used by installed applets.
0272      *
0273      * @param parentApp the application to filter applets on. Uses the
0274      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0275      *                  The default value of QString() will result in a
0276      *                  list of all Applets.
0277      * @return list of categories
0278      * @param visibleOnly true if it should only return applets that are marked as visible
0279      */
0280     QStringList listAppletCategories(const QString &parentApp = QString(), bool visibleOnly = true);
0281 
0282     /**
0283      * Sets the list of custom categories that are used in addition to the default
0284      * set of categories known to libplasma for applets.
0285      * @param categories a list of categories
0286      * @since 4.3
0287      */
0288     void setCustomAppletCategories(const QStringList &categories);
0289 
0290     /**
0291      * @return the list of custom categories known to libplasma
0292      * @since 4.3
0293      */
0294     QStringList customAppletCategories() const;
0295 
0296     /**
0297      * Get the category of the given applet
0298      *
0299      * @param appletName the name of the applet
0300      */
0301     QString appletCategory(const QString &appletName);
0302 
0303 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
0304     /**
0305      * Returns a list of all known containments.
0306      *
0307      * @param category Only containments matching this category will be returned.
0308      *                 If "Miscellaneous" is passed in, then containments without a
0309      *                 Categories= entry are also returned.
0310      *                 If an empty string is passed in, all containments are
0311      *                 returned.
0312      * @param parentApp the application to filter containments on. Uses the
0313      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0314      *                  The default value of QString() will result in a
0315      *                  list of all containments.
0316      * @deprecated since 5.83, use PluginLoader::listContainmentsMetaData
0317      * @return list of containments
0318      **/
0319     PLASMA_DEPRECATED_VERSION(5, 83, "Use PluginLoader::listContainmentsMetaData")
0320     static KPluginInfo::List listContainments(const QString &category = QString(), const QString &parentApp = QString());
0321 #endif
0322 
0323     /**
0324      * Returns a list of all known containments.
0325      *
0326      * @param filter An optional predicate that can be used for filtering.
0327      *
0328      * @return list of containments
0329      */
0330     static QList<KPluginMetaData> listContainmentsMetaData(std::function<bool(const KPluginMetaData &)> filter = {});
0331 
0332     /**
0333      * Returns a list of containments of the specified type.
0334      *
0335      * @param type The target containment type
0336      *
0337      * @return list of containments
0338      */
0339     static QList<KPluginMetaData> listContainmentsMetaDataOfType(const QString &type);
0340 
0341 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
0342     /**
0343      * Returns a list of all known containments that match the parameters.
0344      *
0345      * @param type Only containments with this string in X-Plasma-ContainmentType
0346      *             in their .desktop files will be returned. Common values are panel and
0347      *             desktop
0348      * @param category Only containments matching this category will be returned.
0349      *                 If "Miscellaneous" is passed in, then containments without a
0350      *                 Categories= entry are also returned.
0351      *                 If an empty string is passed in, all containments are
0352      *                 returned.
0353      * @param parentApp the application to filter containments on. Uses the
0354      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0355      *                  The default value of QString() will result in a
0356      *                  list of all containments, matching categories/type.
0357      * @deprecated since 5.83, use PluginLoader::listContainmentsMetaDataOfType
0358      * @return list of containments
0359      **/
0360     PLASMA_DEPRECATED_VERSION(5, 83, "Use PluginLoader::listContainmentsMetaDataOfType")
0361     static KPluginInfo::List listContainmentsOfType(const QString &type, const QString &category = QString(), const QString &parentApp = QString());
0362 #endif
0363 
0364 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
0365     /**
0366      * @return a list of all known types of containments on this system
0367      */
0368     PLASMA_DEPRECATED_VERSION(5,
0369                               83,
0370                               "Use PluginLoader::listContainmentsMetaDataOfType and aggregate the values of the X-Plasma-ContainmentType property instead")
0371     static QStringList listContainmentTypes();
0372 #endif
0373 
0374 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
0375     /**
0376      * Returns a list of all known containments associated with a certain MimeType
0377      *
0378      * @return list of containments
0379      * @deprecated since 5.83, use listAppletMetaData() with custom filtering instead.
0380      **/
0381     PLASMA_DEPRECATED_VERSION(5, 83, "Use listAppletMetaData() with custom filtering")
0382     static KPluginInfo::List listContainmentsForMimeType(const QString &mimeType);
0383 #endif
0384 
0385 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 77)
0386     /**
0387      * Returns a list of all known dataengines.
0388      *
0389      * @param parentApp the application to filter dataengines on. Uses the
0390      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0391      *                  The default value of QString() will result in a
0392      *                  list of all dataengines
0393      * @return list of dataengines
0394      * @deprecated since 5.77, use listDataEngineMetaData()
0395      **/
0396     PLASMA_DEPRECATED_VERSION(5, 77, "Use listDataEngineMetaData()")
0397     KPluginInfo::List listDataEngineInfo(const QString &parentApp = QString());
0398 #endif
0399 
0400     /**
0401      * Returns a list of all known dataengines.
0402      *
0403      * @param parentApp the application to filter dataengines on. Uses the
0404      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0405      *                  The default value of QString() will result in a
0406      *                  list of all dataengines
0407      * @return list of dataengines
0408      * @since 5.77
0409      **/
0410     QVector<KPluginMetaData> listDataEngineMetaData(const QString &parentApp = QString());
0411 
0412 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 77)
0413     /**
0414      * Returns a list of all known ContainmentActions.
0415      *
0416      * @param parentApp the application to filter ContainmentActions on. Uses the
0417      *                  X-KDE-ParentApp entry (if any) in the plugin info.
0418      *                  The default value of QString() will result in a
0419      *                  list of all ContainmentActions.
0420      * @return list of ContainmentActions
0421      * @deprecated since 5.77, use listContainmentActionsMetaData()
0422      **/
0423     PLASMA_DEPRECATED_VERSION(5, 77, "Use listContainmentActionsMetaData()")
0424     KPluginInfo::List listContainmentActionsInfo(const QString &parentApp);
0425 #endif
0426 
0427     /**
0428      * Returns a list of all known ContainmentActions.
0429      *
0430      * @param parentApp the application to filter ContainmentActions on. Uses the
0431      *                  X-KDE-ParentApp entry (if any) in the plugin metadata.
0432      *                  The default value of QString() will result in a
0433      *                  list of all ContainmentActions.
0434      * @return list of ContainmentActions
0435      * @since 5.77
0436      **/
0437     QVector<KPluginMetaData> listContainmentActionsMetaData(const QString &parentApp);
0438 
0439 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 86)
0440     /**
0441      * Set the plugin loader which will be queried for all loads.
0442      *
0443      * @param loader A subclass of PluginLoader which will be supplied
0444      * by the application
0445      * @deprecated Since 5.86, method is obsolete with the deprecation of the virtual methods
0446      **/
0447     PLASMA_DEPRECATED_VERSION(5, 86, "Method is obsolete with the deprecation of the virtual methods")
0448     static void setPluginLoader(PluginLoader *loader);
0449 #endif
0450 
0451     /**
0452      * Return the active plugin loader
0453      **/
0454     static PluginLoader *self();
0455 
0456 #if PLASMA_BUILD_DEPRECATED_SINCE(5, 86)
0457 protected:
0458     /**
0459      * A re-implementable method that allows subclasses to override
0460      * the default behaviour of loadApplet. If the applet requested is not recognized,
0461      * then the implementation should return a NULL pointer. This method is called
0462      * by loadApplet prior to attempting to load an applet using the standard Plasma
0463      * plugin mechanisms.
0464      *
0465      * @param name the plugin name, as returned by KPluginInfo::pluginName()
0466      * @param appletId unique ID to assign the applet, or zero to have one
0467      *        assigned automatically.
0468      * @param args to send the applet extra arguments
0469      * @return a pointer to the loaded applet, or 0 on load failure
0470      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0471      **/
0472     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0473     virtual Applet *internalLoadApplet(const QString &name, uint appletId = 0, const QVariantList &args = QVariantList());
0474 
0475     /**
0476      * A re-implementable method that allows subclasses to override
0477      * the default behaviour of loadDataEngine. If the engine requested is not recognized,
0478      * then the implementation should return a NULL pointer. This method is called
0479      * by loadDataEngine prior to attempting to load a DataEgine using the standard Plasma
0480      * plugin mechanisms.
0481      *
0482      * @param name the name of the engine
0483      * @return the data engine that was loaded, or the NullEngine on failure.
0484      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0485      **/
0486     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0487     virtual DataEngine *internalLoadDataEngine(const QString &name);
0488 
0489     /**
0490      * A re-implementable method that allows subclasses to override
0491      * the default behaviour of loadService. If the service requested is not recognized,
0492      * then the implementation should return a NULL pointer. This method is called
0493      * by loadService prior to attempting to load a Service using the standard Plasma
0494      * plugin mechanisms.
0495      *
0496      * @param name the plugin name of the service to load
0497      * @param args a list of arguments to supply to the service plugin when loading it
0498      * @param parent the parent object, if any, for the service
0499      *
0500      * @return a Service object, unlike Plasma::Service::loadService, this can return null.
0501      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0502      **/
0503     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0504     virtual Service *internalLoadService(const QString &name, const QVariantList &args, QObject *parent = nullptr);
0505 
0506     /**
0507      * A re-implementable method that allows subclasses to override
0508      * the default behaviour of loadContainmentActions. If the ContainmentActions requested is not recognized,
0509      * then the implementation should return a NULL pointer. This method is called
0510      * by loadService prior to attempting to load a Service using the standard Plasma
0511      * plugin mechanisms.
0512      *
0513      * Returns a pointer to the containmentactions if successful.
0514      * The caller takes responsibility for the containmentactions, including
0515      * deleting it when no longer needed.
0516      *
0517      * @param parent the parent containment. @since 4.6 null is allowed.
0518      * @param name the plugin name, as returned by KPluginInfo::pluginName()
0519      * @param args to send the containmentactions extra arguments
0520      * @return a ContainmentActions object
0521      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0522      **/
0523     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0524     virtual ContainmentActions *internalLoadContainmentActions(Containment *parent, const QString &containmentActionsName, const QVariantList &args);
0525 
0526 #if PLASMA_BUILD_DEPRECATED_SINCE(5, 86)
0527     /**
0528      * A re-implementable method that allows subclasses to override
0529      * the default behaviour of loadPackage. If the service requested is not recognized,
0530      * then the implementation should return a NULL pointer. This method is called
0531      * by loadService prior to attempting to load a Service using the standard Plasma
0532      * plugin mechanisms.
0533      *
0534      * @param name the plugin name of the service to load
0535      * @param args a list of arguments to supply to the service plugin when loading it
0536      * @param parent the parent object, if any, for the service
0537      *
0538      * @return a Service object, unlike Plasma::Service::loadService, this can return null.
0539      * @deprecated since 5.30, use KPackage API
0540      **/
0541     PLASMA_DEPRECATED_VERSION(5, 30, "Use KPackage API")
0542     virtual Package internalLoadPackage(const QString &name, const QString &specialization);
0543 #endif
0544     /**
0545      * A re-implementable method that allows subclasses to provide additional applets
0546      * for listAppletInfo. If the application has no applets to give to the application,
0547      * then the implementation should return an empty list.
0548      *
0549      * This method is called by listAppletInfo prior to generating the list of applets installed
0550      * on the system using the standard Plasma plugin mechanisms, and will try to find .desktop
0551      * files for your applets.
0552      *
0553      * @param category Only applets matching this category will be returned.
0554      *                 If "Misc" is passed in, then applets without a
0555      *                 Categories= entry are also returned.
0556      *                 If an empty string is passed in, all applets are
0557      *                 returned.
0558      * @return list of applets
0559      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0560      **/
0561     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0562     virtual QList<KPluginInfo> internalAppletInfo(const QString &category) const;
0563 
0564     /**
0565      * A re-implementable method that allows subclasses to provide additional dataengines
0566      * for DataEngine::listDataEngines.
0567      *
0568      * @return list of dataengine info, or an empty list if none
0569      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0570      **/
0571     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0572     virtual QList<KPluginInfo> internalDataEngineInfo() const;
0573 
0574     /**
0575      * Returns a list of all known Service implementations
0576      *
0577      * @return list of Service info, or an empty list if none
0578      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0579      */
0580     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0581     virtual QList<KPluginInfo> internalServiceInfo() const;
0582 
0583     /**
0584      * Returns a list of all known ContainmentActions implementations
0585      *
0586      * @return list of ContainmentActions info, or an empty list if none
0587      * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
0588      */
0589     PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
0590     virtual QList<KPluginInfo> internalContainmentActionsInfo() const;
0591 #endif
0592 
0593 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 88)
0594     /**
0595      * Standardized mechanism for providing internal applets by install .desktop files
0596      * in $APPPDATA/plasma/internal/applets/
0597      *
0598      * For applications that do this, internalAppletInfo can be implemented as a one-liner
0599      * call to this method.
0600      *
0601      * @param category Only applets matching this category will be returned.
0602      *                 If "Misc" is passed in, then applets without a
0603      *                 Categories= entry are also returned.
0604      *                 If an empty string is passed in, all applets are
0605      *                 returned.
0606      * @return list of applets, or an empty list if none
0607      * @deprecated Since 5.88, deprecated for lack of usage & obsolete with json metadata
0608      */
0609     PLASMA_DEPRECATED_VERSION(5, 88, "deprecated for lack of usage & obsolete with json metadata")
0610     KPluginInfo::List standardInternalAppletInfo(const QString &category) const;
0611 
0612     /**
0613      * Standardized mechanism for providing internal dataengines by install .desktop files
0614      * in $APPPDATA/plasma/internal/dataengines/
0615      *
0616      * For applications that do this, internalDataEngineInfo can be implemented as a one-liner
0617      * call to this method.
0618      *
0619      * @return list of dataengines
0620      * @deprecated Since 5.88, deprecated for lack of usage & obsolete with json metadata
0621      */
0622     PLASMA_DEPRECATED_VERSION(5, 88, "deprecated for lack of usage & obsolete with json metadata")
0623     KPluginInfo::List standardInternalDataEngineInfo() const;
0624 
0625     /**
0626      * Standardized mechanism for providing internal services by install .desktop files
0627      * in $APPPDATA/plasma/internal/services/
0628      *
0629      * For applications that do this, internalServiceInfo can be implemented as a one-liner
0630      * call to this method.
0631      *
0632      * @return list of services
0633      * @deprecated Since 5.88, deprecated for lack of usage & obsolete with json metadata
0634      */
0635     PLASMA_DEPRECATED_VERSION(5, 88, "deprecated for lack of usage & obsolete with json metadata")
0636     KPluginInfo::List standardInternalServiceInfo() const;
0637 #endif
0638 
0639     PluginLoader();
0640     virtual ~PluginLoader();
0641 
0642 private:
0643     PluginLoaderPrivate *const d;
0644 };
0645 
0646 }
0647 
0648 Q_DECLARE_METATYPE(Plasma::PluginLoader *)
0649 
0650 #endif