1 #ifndef BALL_PLUGIN_PLUGINMANAGER_H
2 #define BALL_PLUGIN_PLUGINMANAGER_H
4 #ifndef BALL_COMMON_GLOBAL_H
8 #ifndef BALL_DATATYPE_STRING_H
12 #include <QtCore/QString>
13 #include <QtCore/QStringList>
14 #include <QtCore/QHash>
15 #include <QtCore/QMutex>
16 #include <QtCore/QReadWriteLock>
18 #include <boost/shared_ptr.hpp>
59 bool addPluginDirectory(
const QString& dir);
68 bool removePluginDirectory(
const QString& dir);
72 std::vector<QString> getPluginDirectories()
const;
82 BALLPlugin* loadPlugin(
const QString& plugin_name);
89 bool unloadPlugin(
const QString& plugin);
100 QObject* getPluginInstance(
const QString& plugin);
111 QObject* getPluginInstance(
int pos);
116 bool startPlugin(
int plugin);
121 bool startPlugin(
const QString& plugin);
137 bool stopPlugin(
int plugin);
142 bool stopPlugin(
const QString& plugin);
157 void unloadAllPlugins();
162 int getPluginCount()
const;
178 void registerHandler(boost::shared_ptr<PluginHandler> h);
201 virtual bool getPluginDirectories(
String& value)
const;
202 virtual bool setPluginDirectories(
const String&);
204 virtual QString getAutoActivatePlugins()
const;
205 virtual bool setAutoActivatePlugins(
const QString&);
207 void autoActivatePlugin(
const QString& str);
208 void doNotAutoActivatePlugin(
const QString& str);
219 bool unloadDirectoryPlugins_(PluginDirMap::iterator it);
239 #endif //BALL_PLUGIN_PLUGINMANAGER_H
QHash< QString, QPluginLoader * > loaders_
QStringList autoactivate_plugins_
BALL_EXTERN_VARIABLE const double h
QReadWriteLock handler_mutex_
static const char * BETWEEN_PLUGINDIR_SEPERATOR
QReadWriteLock loader_mutex_
PluginDirMap loaded_plugin_dirs_
std::list< boost::shared_ptr< PluginHandler > > shared_handlers_
std::list< PluginHandler * > handlers_
std::map< QString, vector< BALLPlugin * > > PluginDirMap
static boost::shared_ptr< PluginManager > manager_