prep for Package loading
This commit is contained in:
parent
0633f2fd28
commit
aabb8d47f9
@ -244,6 +244,17 @@ Service *PluginLoader::loadService(const QString &name, const QVariantList &args
|
||||
return service;
|
||||
}
|
||||
|
||||
Package PluginLoader::loadPackage(const QString &name, const QVariantList &args)
|
||||
{
|
||||
Package p = internalLoadPackage(name, args);
|
||||
if (p.isValid()) {
|
||||
return p;
|
||||
}
|
||||
|
||||
//TODO: pull code from PackageStructure over here
|
||||
return p;
|
||||
}
|
||||
|
||||
KPluginInfo::List PluginLoader::listAppletInfo(const QString &category, const QString &parentApp)
|
||||
{
|
||||
KPluginInfo::List list;
|
||||
@ -344,6 +355,13 @@ Service* PluginLoader::internalLoadService(const QString &name, const QVariantLi
|
||||
return 0;
|
||||
}
|
||||
|
||||
Package PluginLoader::internalLoadPackage(const QString &name, const QVariantList &args)
|
||||
{
|
||||
Q_UNUSED(name);
|
||||
Q_UNUSED(args);
|
||||
return Package();
|
||||
}
|
||||
|
||||
KPluginInfo::List PluginLoader::internalAppletInfo(const QString &category) const
|
||||
{
|
||||
Q_UNUSED(category)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef PLUGIN_LOADER_H
|
||||
#define PLUGIN_LOADER_H
|
||||
|
||||
#include <plasma/package.h>
|
||||
#include <plasma/plasma.h>
|
||||
#include <kplugininfo.h>
|
||||
|
||||
@ -93,6 +94,16 @@ public:
|
||||
**/
|
||||
Service *loadService(const QString &name, const QVariantList &args, QObject *parent = 0);
|
||||
|
||||
/**
|
||||
* Load a Package plugin.
|
||||
*
|
||||
* @param name the plugin name of the package to load
|
||||
* @param args a list of arguments to supply to the service plugin when loading it
|
||||
*
|
||||
* @return a Package object matching name, or an invalid package on failure
|
||||
**/
|
||||
Package loadPackage(const QString &name, const QVariantList &args);
|
||||
|
||||
/**
|
||||
* Returns a list of all known applets.
|
||||
* This may skip applets based on security settings and ExcludeCategories in the application's config.
|
||||
@ -205,6 +216,21 @@ protected:
|
||||
**/
|
||||
virtual Service *internalLoadService(const QString &name, const QVariantList &args, QObject *parent = 0);
|
||||
|
||||
/**
|
||||
* A re-implementable method that allows subclasses to override
|
||||
* the default behaviour of loadPackage. If the service requested is not recognized,
|
||||
* then the implementation should return a NULL pointer. This method is called
|
||||
* by loadService prior to attempting to load a Service using the standard Plasma
|
||||
* plugin mechanisms.
|
||||
*
|
||||
* @param name the plugin name of the service to load
|
||||
* @param args a list of arguments to supply to the service plugin when loading it
|
||||
* @param parent the parent object, if any, for the service
|
||||
*
|
||||
* @return a Service object, unlike Plasma::Service::loadService, this can return null.
|
||||
**/
|
||||
virtual Package internalLoadPackage(const QString &name, const QVariantList &args);
|
||||
|
||||
/**
|
||||
* A re-implementable method that allows subclasses to provide additional applets
|
||||
* for listAppletInfo. If the application has no applets to give to the application,
|
||||
|
Loading…
Reference in New Issue
Block a user