Plasma

pluginloader.h
1 /*
2  SPDX-FileCopyrightText: 2010 Ryan Rix <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef PLUGIN_LOADER_H
8 #define PLUGIN_LOADER_H
9 
10 #include <plasma/plasma_export.h>
11 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 94)
12 #include <KPluginInfo>
13 #include <plasma/package.h>
14 #else
15 class KPluginInfo;
16 #endif
17 
18 #include <plasma/plasma.h>
19 
20 #include <QVariant>
21 
22 class KPluginMetaData;
23 namespace Plasma
24 {
25 class Applet;
26 class Containment;
27 class ContainmentActions;
28 class DataEngine;
29 class Service;
30 
31 #if PLASMA_BUILD_DEPRECATED_SINCE(5, 86)
32 class Package; // FWD class so that excluding deprecated API does not cause an unknown type
33 #endif
34 
35 class PluginLoaderPrivate;
36 
37 // TODO:
38 // * add loadWallpaper
39 // * add KPluginInfo listing support for Containments (already loaded via the applet loading code)
40 
41 /**
42  * @class PluginLoader plasma/pluginloader.h <Plasma/PluginLoader>
43  *
44  * This is an abstract base class which defines an interface to which Plasma's
45  * Applet Loading logic can communicate with a parent application. The plugin loader
46  * must be set before any plugins are loaded, otherwise (for safety reasons), the
47  * default PluginLoader implementation will be used. The reimplemented version should
48  * not do more than simply returning a loaded plugin. It should not init() it, and it should not
49  * hang on to it. The associated methods will be called only when a component of Plasma
50  * needs to load a _new_ plugin. (e.g. DataEngine does its own caching).
51  *
52  * @author Ryan Rix <[email protected]>
53  * @since 4.6
54  **/
55 class PLASMA_EXPORT PluginLoader
56 {
57 public:
58  /**
59  * Load an Applet plugin.
60  *
61  * @param name the plugin name, as returned by KPluginInfo::pluginName()
62  * @param appletId unique ID to assign the applet, or zero to have one
63  * assigned automatically.
64  * @param args to send the applet extra arguments
65  * @return a pointer to the loaded applet, or 0 on load failure
66  **/
67  Applet *loadApplet(const QString &name, uint appletId = 0, const QVariantList &args = QVariantList());
68 
69 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 94)
70  /**
71  * Load a dataengine plugin.
72  *
73  * @param name the name of the engine
74  * @return the dataengine that was loaded, or the NullEngine on failure.
75  * @deprecated Since 5.94, Dataengines are being phased out, please port away from them if possible
76  * or load the plugin from the "plasma/dataengine" namespace manually using KPluginMetaData/KPluginFactory
77  */
78  PLASMA_DEPRECATED_VERSION(
79  5,
80  94,
81  "Dataengines are being phased out, please port away from them if possible or load the plugin from the \"plasma/dataengine\" namespace manually")
82  DataEngine *loadDataEngine(const QString &name);
83 #endif
84 
85 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 94)
86  /**
87  * @return a listing of all known dataengines by name
88  *
89  * @param parentApp the application to filter dataengines on. Uses the
90  * X-KDE-ParentApp entry (if any) in the plugin info.
91  * The default value of QString() will result in a
92  * list of all dataengines.
93  * @deprecated Since 5.94, Dataengines are being phased out, please port away from them if possible
94  * or query the plugins in the "plasma/dataengine" namespace manually using KPluginMetaData
95  */
96  PLASMA_DEPRECATED_VERSION(
97  5,
98  94,
99  "Dataengines are being phased out, please port away from them if possible or query the plugins in the \"plasma/dataengine\" namespace manually")
100  static QStringList listAllEngines(const QString &parentApp = QString());
101 #endif
102 
103 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 77)
104  /**
105  * Returns a list of all known dataengines.
106  *
107  * @param parentApp the application to filter dataengines on. Uses the
108  * X-KDE-ParentApp entry (if any) in the plugin info.
109  * The default value of QString() will result in a
110  * list of all dataengines.
111  * @return list of dataengines
112  * @deprecated since 5.77, use listDataEngineMetaData instead.
113  **/
114  PLASMA_DEPRECATED_VERSION(5, 77, "Use listDataEngineMetaData instead")
115  static KPluginInfo::List listEngineInfo(const QString &parentApp = QString());
116 #endif
117 
118 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 81)
119  /**
120  * Returns a list of all known dataengines filtering by category.
121  *
122  * @param category the category to filter dataengines on. Uses the
123  * X-KDE-PluginInfo-Category entry (if any) in the
124  * plugin info. The value of QString() will
125  * result in a list of dataengines with an empty category.
126  *
127  * @param parentApp the application to filter dataengines on. Uses the
128  * X-KDE-ParentApp entry (if any) in the plugin info.
129  * The default value of QString() will result in a
130  * list of all dataengines in specified categories.
131  * @return list of dataengines
132  * @deprecated since 5.81, use listDataEngineMetaData() instead.
133  * @since 4.3
134  **/
135  PLASMA_DEPRECATED_VERSION(5, 81, "Use listDataEngineMetaData instead")
136  static KPluginInfo::List listEngineInfoByCategory(const QString &category, const QString &parentApp = QString());
137 #endif
138 
139  /**
140  * Load a Service plugin.
141  *
142  * @param name the plugin name of the service to load
143  * @param args a list of arguments to supply to the service plugin when loading it
144  * @param parent the parent object, if any, for the service
145  *
146  * @return a Service object, unlike Plasma::Service::loadService, this can return null.
147  **/
148  Service *loadService(const QString &name, const QVariantList &args, QObject *parent = nullptr);
149 
150  /**
151  * Load a ContainmentActions plugin.
152  *
153  * Returns a pointer to the containmentactions if successful.
154  * The caller takes responsibility for the containmentactions, including
155  * deleting it when no longer needed.
156  *
157  * @param parent the parent containment. @since 4.6 null is allowed.
158  * @param name the plugin name, as returned by KPluginInfo::pluginName()
159  * @param args to send the containmentactions extra arguments
160  * @return a ContainmentActions object
161  **/
162  ContainmentActions *loadContainmentActions(Containment *parent, const QString &containmentActionsName, const QVariantList &args = QVariantList());
163 
164 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 30)
165  /**
166  * Load a Package plugin.
167  *
168  * @param name the plugin name of the package to load
169  * @param specialization used to find script extensions for the given format, e.g. "QML" for "Plasma/Applet"
170  *
171  * @return a Package object matching name, or an invalid package on failure
172  * @deprecated Since 5.30, use KPackage::PackageLoader::loadPackage(const QString& packageFormat, const QString& packagePath) instead.
173  **/
174  PLASMA_DEPRECATED_VERSION(5, 30, "Use KPackage::PackageLoader::loadPackage(const QString&, const QString&")
175  Package loadPackage(const QString &packageFormat, const QString &specialization = QString());
176 #endif
177 
178 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 28)
179  /**
180  * Returns a list of all known applets.
181  * This may skip applets based on security settings and ExcludeCategories in the application's config.
182  *
183  * @param category Only applets matching this category will be returned.
184  * If "Misc" is passed in, then applets without a
185  * Categories= entry are also returned.
186  * If an empty string is passed in, all applets are
187  * returned.
188  * @param parentApp the application to filter applets on. Uses the
189  * X-KDE-ParentApp entry (if any) in the plugin info.
190  * The default value of QString() will result in a
191  * list of all applets in specified category.
192  * @return list of applets
193  *
194  * @deprecated Since 5.28. Doesn't support metadata.json packages.
195  * Use listAppletMetaData(const QString &category, const QString &parentApp) instead.
196  **/
197  PLASMA_DEPRECATED_VERSION(5, 28, "Use PluginLoader::listAppletMetaData(const QString &, const QString &)")
198  KPluginInfo::List listAppletInfo(const QString &category, const QString &parentApp = QString());
199 #endif
200 
201  /**
202  * Returns a list of all known applets.
203  * This may skip applets based on security settings and ExcludeCategories in the application's config.
204  *
205  * @param category Only applets matching this category will be returned.
206  * If "Misc" is passed in, then applets without a
207  * Categories= entry are also returned.
208  * If an empty string is passed in, all applets are
209  * returned.
210  * @return list of applets
211  *
212  * @since 5.28
213  **/
214  QList<KPluginMetaData> listAppletMetaData(const QString &category);
215 
216 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 88)
217  /**
218  * @overload
219  * @param parentApp the application to filter applets on. Uses the
220  * X-KDE-ParentApp entry (if any) in the plugin info.
221  * The default value of QString() will result in a
222  * list of all applets in specified categories.
223  * @deprecated Since 5.88, use PluginLoader::listAppletMetaData(const QString &category)
224  * @since 5.28
225  */
226  PLASMA_DEPRECATED_VERSION(5, 88, "Use PluginLoader::listAppletMetaData(const QString &category)")
227  QList<KPluginMetaData> listAppletMetaData(const QString &category, const QString &parentApp);
228 #endif
229 
230 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 36)
231  /**
232  * Returns a list of all known applets associated with a certain mimetype.
233  *
234  * @return list of applets
235  *
236  * @deprecated Since 5.36, use listAppletMetaDataForMimeType(const QString &mimetype) instead.
237  **/
238  PLASMA_DEPRECATED_VERSION(5, 36, "Use PluginLoader::listAppletMetaDataForMimeType(const QString &)")
239  KPluginInfo::List listAppletInfoForMimeType(const QString &mimetype);
240 #endif
241 
242  /**
243  * Returns a list of all known applets associated with a certain mimetype.
244  *
245  * @return list of applets
246  * @since 5.36
247  **/
248  QList<KPluginMetaData> listAppletMetaDataForMimeType(const QString &mimetype);
249 
250 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 36)
251  /**
252  * Returns a list of all known applets associated with a certain URL.
253  *
254  * @return list of applets
255  *
256  * @deprecated Since 5.36, use listAppletMetaDataForUrl(const QUrl &url) instead.
257  **/
258  PLASMA_DEPRECATED_VERSION(5, 36, "Use PluginLoader::listAppletMetaDataForUrl(const QUrl &)")
259  KPluginInfo::List listAppletInfoForUrl(const QUrl &url);
260 #endif
261 
262  /**
263  * Returns a list of all known applets associated with a certain URL.
264  *
265  * @return list of applets
266  * @since 5.36
267  **/
268  QList<KPluginMetaData> listAppletMetaDataForUrl(const QUrl &url);
269 
270  /**
271  * Returns a list of all the categories used by installed applets.
272  *
273  * @param parentApp the application to filter applets on. Uses the
274  * X-KDE-ParentApp entry (if any) in the plugin info.
275  * The default value of QString() will result in a
276  * list of all Applets.
277  * @return list of categories
278  * @param visibleOnly true if it should only return applets that are marked as visible
279  */
280  QStringList listAppletCategories(const QString &parentApp = QString(), bool visibleOnly = true);
281 
282  /**
283  * Sets the list of custom categories that are used in addition to the default
284  * set of categories known to libplasma for applets.
285  * @param categories a list of categories
286  * @since 4.3
287  */
288  void setCustomAppletCategories(const QStringList &categories);
289 
290  /**
291  * @return the list of custom categories known to libplasma
292  * @since 4.3
293  */
294  QStringList customAppletCategories() const;
295 
296  /**
297  * Get the category of the given applet
298  *
299  * @param appletName the name of the applet
300  */
301  QString appletCategory(const QString &appletName);
302 
303 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
304  /**
305  * Returns a list of all known containments.
306  *
307  * @param category Only containments matching this category will be returned.
308  * If "Miscellaneous" is passed in, then containments without a
309  * Categories= entry are also returned.
310  * If an empty string is passed in, all containments are
311  * returned.
312  * @param parentApp the application to filter containments on. Uses the
313  * X-KDE-ParentApp entry (if any) in the plugin info.
314  * The default value of QString() will result in a
315  * list of all containments.
316  * @deprecated since 5.83, use PluginLoader::listContainmentsMetaData
317  * @return list of containments
318  **/
319  PLASMA_DEPRECATED_VERSION(5, 83, "Use PluginLoader::listContainmentsMetaData")
320  static KPluginInfo::List listContainments(const QString &category = QString(), const QString &parentApp = QString());
321 #endif
322 
323  /**
324  * Returns a list of all known containments.
325  *
326  * @param filter An optional predicate that can be used for filtering.
327  *
328  * @return list of containments
329  */
330  static QList<KPluginMetaData> listContainmentsMetaData(std::function<bool(const KPluginMetaData &)> filter = {});
331 
332  /**
333  * Returns a list of containments of the specified type.
334  *
335  * @param type The target containment type
336  *
337  * @return list of containments
338  */
339  static QList<KPluginMetaData> listContainmentsMetaDataOfType(const QString &type);
340 
341 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
342  /**
343  * Returns a list of all known containments that match the parameters.
344  *
345  * @param type Only containments with this string in X-Plasma-ContainmentType
346  * in their .desktop files will be returned. Common values are panel and
347  * desktop
348  * @param category Only containments matching this category will be returned.
349  * If "Miscellaneous" is passed in, then containments without a
350  * Categories= entry are also returned.
351  * If an empty string is passed in, all containments are
352  * returned.
353  * @param parentApp the application to filter containments on. Uses the
354  * X-KDE-ParentApp entry (if any) in the plugin info.
355  * The default value of QString() will result in a
356  * list of all containments, matching categories/type.
357  * @deprecated since 5.83, use PluginLoader::listContainmentsMetaDataOfType
358  * @return list of containments
359  **/
360  PLASMA_DEPRECATED_VERSION(5, 83, "Use PluginLoader::listContainmentsMetaDataOfType")
361  static KPluginInfo::List listContainmentsOfType(const QString &type, const QString &category = QString(), const QString &parentApp = QString());
362 #endif
363 
364 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
365  /**
366  * @return a list of all known types of containments on this system
367  */
368  PLASMA_DEPRECATED_VERSION(5,
369  83,
370  "Use PluginLoader::listContainmentsMetaDataOfType and aggregate the values of the X-Plasma-ContainmentType property instead")
371  static QStringList listContainmentTypes();
372 #endif
373 
374 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
375  /**
376  * Returns a list of all known containments associated with a certain MimeType
377  *
378  * @return list of containments
379  * @deprecated since 5.83, use listAppletMetaData() with custom filtering instead.
380  **/
381  PLASMA_DEPRECATED_VERSION(5, 83, "Use listAppletMetaData() with custom filtering")
382  static KPluginInfo::List listContainmentsForMimeType(const QString &mimeType);
383 #endif
384 
385 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 77)
386  /**
387  * Returns a list of all known dataengines.
388  *
389  * @param parentApp the application to filter dataengines on. Uses the
390  * X-KDE-ParentApp entry (if any) in the plugin info.
391  * The default value of QString() will result in a
392  * list of all dataengines
393  * @return list of dataengines
394  * @deprecated since 5.77, use listDataEngineMetaData()
395  **/
396  PLASMA_DEPRECATED_VERSION(5, 77, "Use listDataEngineMetaData()")
397  KPluginInfo::List listDataEngineInfo(const QString &parentApp = QString());
398 #endif
399 
400  /**
401  * Returns a list of all known dataengines.
402  *
403  * @param parentApp the application to filter dataengines on. Uses the
404  * X-KDE-ParentApp entry (if any) in the plugin info.
405  * The default value of QString() will result in a
406  * list of all dataengines
407  * @return list of dataengines
408  * @since 5.77
409  **/
410  QVector<KPluginMetaData> listDataEngineMetaData(const QString &parentApp = QString());
411 
412 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 77)
413  /**
414  * Returns a list of all known ContainmentActions.
415  *
416  * @param parentApp the application to filter ContainmentActions on. Uses the
417  * X-KDE-ParentApp entry (if any) in the plugin info.
418  * The default value of QString() will result in a
419  * list of all ContainmentActions.
420  * @return list of ContainmentActions
421  * @deprecated since 5.77, use listContainmentActionsMetaData()
422  **/
423  PLASMA_DEPRECATED_VERSION(5, 77, "Use listContainmentActionsMetaData()")
424  KPluginInfo::List listContainmentActionsInfo(const QString &parentApp);
425 #endif
426 
427  /**
428  * Returns a list of all known ContainmentActions.
429  *
430  * @param parentApp the application to filter ContainmentActions on. Uses the
431  * X-KDE-ParentApp entry (if any) in the plugin metadata.
432  * The default value of QString() will result in a
433  * list of all ContainmentActions.
434  * @return list of ContainmentActions
435  * @since 5.77
436  **/
437  QVector<KPluginMetaData> listContainmentActionsMetaData(const QString &parentApp);
438 
439 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 86)
440  /**
441  * Set the plugin loader which will be queried for all loads.
442  *
443  * @param loader A subclass of PluginLoader which will be supplied
444  * by the application
445  * @deprecated Since 5.86, method is obsolete with the deprecation of the virtual methods
446  **/
447  PLASMA_DEPRECATED_VERSION(5, 86, "Method is obsolete with the deprecation of the virtual methods")
448  static void setPluginLoader(PluginLoader *loader);
449 #endif
450 
451  /**
452  * Return the active plugin loader
453  **/
454  static PluginLoader *self();
455 
456 #if PLASMA_BUILD_DEPRECATED_SINCE(5, 86)
457 protected:
458  /**
459  * A re-implementable method that allows subclasses to override
460  * the default behaviour of loadApplet. If the applet requested is not recognized,
461  * then the implementation should return a NULL pointer. This method is called
462  * by loadApplet prior to attempting to load an applet using the standard Plasma
463  * plugin mechanisms.
464  *
465  * @param name the plugin name, as returned by KPluginInfo::pluginName()
466  * @param appletId unique ID to assign the applet, or zero to have one
467  * assigned automatically.
468  * @param args to send the applet extra arguments
469  * @return a pointer to the loaded applet, or 0 on load failure
470  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
471  **/
472  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
473  virtual Applet *internalLoadApplet(const QString &name, uint appletId = 0, const QVariantList &args = QVariantList());
474 
475  /**
476  * A re-implementable method that allows subclasses to override
477  * the default behaviour of loadDataEngine. If the engine requested is not recognized,
478  * then the implementation should return a NULL pointer. This method is called
479  * by loadDataEngine prior to attempting to load a DataEgine using the standard Plasma
480  * plugin mechanisms.
481  *
482  * @param name the name of the engine
483  * @return the data engine that was loaded, or the NullEngine on failure.
484  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
485  **/
486  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
487  virtual DataEngine *internalLoadDataEngine(const QString &name);
488 
489  /**
490  * A re-implementable method that allows subclasses to override
491  * the default behaviour of loadService. If the service requested is not recognized,
492  * then the implementation should return a NULL pointer. This method is called
493  * by loadService prior to attempting to load a Service using the standard Plasma
494  * plugin mechanisms.
495  *
496  * @param name the plugin name of the service to load
497  * @param args a list of arguments to supply to the service plugin when loading it
498  * @param parent the parent object, if any, for the service
499  *
500  * @return a Service object, unlike Plasma::Service::loadService, this can return null.
501  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
502  **/
503  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
504  virtual Service *internalLoadService(const QString &name, const QVariantList &args, QObject *parent = nullptr);
505 
506  /**
507  * A re-implementable method that allows subclasses to override
508  * the default behaviour of loadContainmentActions. If the ContainmentActions requested is not recognized,
509  * then the implementation should return a NULL pointer. This method is called
510  * by loadService prior to attempting to load a Service using the standard Plasma
511  * plugin mechanisms.
512  *
513  * Returns a pointer to the containmentactions if successful.
514  * The caller takes responsibility for the containmentactions, including
515  * deleting it when no longer needed.
516  *
517  * @param parent the parent containment. @since 4.6 null is allowed.
518  * @param name the plugin name, as returned by KPluginInfo::pluginName()
519  * @param args to send the containmentactions extra arguments
520  * @return a ContainmentActions object
521  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
522  **/
523  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
524  virtual ContainmentActions *internalLoadContainmentActions(Containment *parent, const QString &containmentActionsName, const QVariantList &args);
525 
526 #if PLASMA_BUILD_DEPRECATED_SINCE(5, 86)
527  /**
528  * A re-implementable method that allows subclasses to override
529  * the default behaviour of loadPackage. If the service requested is not recognized,
530  * then the implementation should return a NULL pointer. This method is called
531  * by loadService prior to attempting to load a Service using the standard Plasma
532  * plugin mechanisms.
533  *
534  * @param name the plugin name of the service to load
535  * @param args a list of arguments to supply to the service plugin when loading it
536  * @param parent the parent object, if any, for the service
537  *
538  * @return a Service object, unlike Plasma::Service::loadService, this can return null.
539  * @deprecated since 5.30, use KPackage API
540  **/
541  PLASMA_DEPRECATED_VERSION(5, 30, "Use KPackage API")
542  virtual Package internalLoadPackage(const QString &name, const QString &specialization);
543 #endif
544  /**
545  * A re-implementable method that allows subclasses to provide additional applets
546  * for listAppletInfo. If the application has no applets to give to the application,
547  * then the implementation should return an empty list.
548  *
549  * This method is called by listAppletInfo prior to generating the list of applets installed
550  * on the system using the standard Plasma plugin mechanisms, and will try to find .desktop
551  * files for your applets.
552  *
553  * @param category Only applets matching this category will be returned.
554  * If "Misc" is passed in, then applets without a
555  * Categories= entry are also returned.
556  * If an empty string is passed in, all applets are
557  * returned.
558  * @return list of applets
559  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
560  **/
561  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
562  virtual QList<KPluginInfo> internalAppletInfo(const QString &category) const;
563 
564  /**
565  * A re-implementable method that allows subclasses to provide additional dataengines
566  * for DataEngine::listDataEngines.
567  *
568  * @return list of dataengine info, or an empty list if none
569  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
570  **/
571  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
572  virtual QList<KPluginInfo> internalDataEngineInfo() const;
573 
574  /**
575  * Returns a list of all known Service implementations
576  *
577  * @return list of Service info, or an empty list if none
578  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
579  */
580  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
581  virtual QList<KPluginInfo> internalServiceInfo() const;
582 
583  /**
584  * Returns a list of all known ContainmentActions implementations
585  *
586  * @return list of ContainmentActions info, or an empty list if none
587  * @deprecated Since 5.86, deprecated for lack of usage, use default behaviour instead
588  */
589  PLASMA_DEPRECATED_VERSION(5, 86, "Deprecated for lack of usage, use default behaviour instead")
590  virtual QList<KPluginInfo> internalContainmentActionsInfo() const;
591 #endif
592 
593 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 88)
594  /**
595  * Standardized mechanism for providing internal applets by install .desktop files
596  * in $APPPDATA/plasma/internal/applets/
597  *
598  * For applications that do this, internalAppletInfo can be implemented as a one-liner
599  * call to this method.
600  *
601  * @param category Only applets matching this category will be returned.
602  * If "Misc" is passed in, then applets without a
603  * Categories= entry are also returned.
604  * If an empty string is passed in, all applets are
605  * returned.
606  * @return list of applets, or an empty list if none
607  * @deprecated Since 5.88, deprecated for lack of usage & obsolete with json metadata
608  */
609  PLASMA_DEPRECATED_VERSION(5, 88, "deprecated for lack of usage & obsolete with json metadata")
610  KPluginInfo::List standardInternalAppletInfo(const QString &category) const;
611 
612  /**
613  * Standardized mechanism for providing internal dataengines by install .desktop files
614  * in $APPPDATA/plasma/internal/dataengines/
615  *
616  * For applications that do this, internalDataEngineInfo can be implemented as a one-liner
617  * call to this method.
618  *
619  * @return list of dataengines
620  * @deprecated Since 5.88, deprecated for lack of usage & obsolete with json metadata
621  */
622  PLASMA_DEPRECATED_VERSION(5, 88, "deprecated for lack of usage & obsolete with json metadata")
623  KPluginInfo::List standardInternalDataEngineInfo() const;
624 
625  /**
626  * Standardized mechanism for providing internal services by install .desktop files
627  * in $APPPDATA/plasma/internal/services/
628  *
629  * For applications that do this, internalServiceInfo can be implemented as a one-liner
630  * call to this method.
631  *
632  * @return list of services
633  * @deprecated Since 5.88, deprecated for lack of usage & obsolete with json metadata
634  */
635  PLASMA_DEPRECATED_VERSION(5, 88, "deprecated for lack of usage & obsolete with json metadata")
636  KPluginInfo::List standardInternalServiceInfo() const;
637 #endif
638 
639  PluginLoader();
640  virtual ~PluginLoader();
641 
642 private:
643  PluginLoaderPrivate *const d;
644 };
645 
646 }
647 
648 Q_DECLARE_METATYPE(Plasma::PluginLoader *)
649 
650 #endif
Data provider for plasmoids (Plasma plugins)
Definition: dataengine.h:50
Namespace for everything in libplasma.
Definition: datamodel.cpp:14
The base ContainmentActions class.
This class provides a generic API for write access to settings or services.
Definition: service.h:77
object representing an installed Plasma package
Definition: package.h:76
The base class for plugins that provide backgrounds and applet grouping containers.
Definition: containment.h:45
The base Applet class.
Definition: applet.h:71
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Mar 23 2023 04:18:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.