Qt API | Qtopia API | Qtopia Documentation | ![]() |
The PluginLoader class simplifies plugin loading and allows plugins to be enabled/disabled. More...
#include <qtopia/pluginloader.h>
PluginLoader simplifies loading plugins. The most common use is to iterate over the list of plugins and load each one:
PluginLoader loader( "Effects" ); QStringList list = pluginLoader.list(); QStringList::Iterator it; QValueList<EffectsInterface*> effectList; for ( it = list.begin(); it != list.end(); ++it ) { EffectsInterface *iface = 0; if ( pluginLoader.queryInterface( *it, IID_Effects, (QUnknownInterface**)&iface ) == QS_OK && iface ) { effectList.append( iface ); } }
First availability: Qtopia 1.6
See also Qtopia Classes.
The plugins must be installed in the $QPEDIR/plugins/type directory.
PluginLoader::~PluginLoader ()
Destroys the PluginLoader. Note that this does not release any
interfaces.
void PluginLoader::clear ()
Releases all interfaces.
const QStringList & PluginLoader::disabledList () const
Returns the list of plugins that have been disabled.
bool PluginLoader::inSafeMode () [static]
Returns TRUE if Qtopia is currently in Safe Mode. In Safe Mode
list() will return an empty list and no plugins should be loaded. This
is to allow misbehaving plugins to be disbled.
bool PluginLoader::isEnabled ( const QString & name ) const
Returns TRUE is the plugin name is enabled.
const QStringList & PluginLoader::list () const
Returns the list of plugins that are available.
QRESULT PluginLoader::queryInterface ( const QString & name, const QUuid & id, QUnknownInterface ** iface )
Query the plugin for the interface specified by id in plugin name.
If the interface is available, iface will contain the pointer to it.
Returns QS_OK if the interface was found or QS_FALSE otherwise.
This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.
Copyright © 2001-2002 Trolltech | Trademarks | Qtopia version 1.7.1
|