33 #ifndef CXPLUGINFRAMEWORK_H_
34 #define CXPLUGINFRAMEWORK_H_
36 #include "cxLogicManagerExport.h"
40 #include <boost/shared_ptr.hpp>
42 #include "ctkPlugin.h"
43 #include "ctkPluginFramework_global.h"
48 class ctkPluginFramework;
49 class ctkPluginFrameworkFactory;
68 ctkPlugin::State targetState;
78 void install(
const QString& symbolicName);
79 void uninstall(
const QString& symbolicName);
80 bool start(
const QString& symbolicName, ctkPlugin::StartOptions options = ctkPlugin::START_ACTIVATION_POLICY);
81 bool stop(
const QString& symbolicName, ctkPlugin::StopOptions options = 0);
85 ctkPluginContext* getPluginContext();
86 QSharedPointer<ctkPluginFramework> getPluginFramework();
89 void setSearchPaths(
const QStringList& searchPath);
90 QStringList getSearchPaths()
const;
91 QStringList getPluginSymbolicNames();
92 QSharedPointer<ctkPlugin> getInstalledPluginFromSymbolicName(QString symbolicName);
93 ctkPlugin::State getStateFromSymbolicName(QString name);
97 void pluginPoolChanged();
101 QString getPluginPath(
const QString& symbolicName);
102 QStringList getPluginSymbolicNames(
const QString& searchPath);
103 bool nameIsProbablyPlugin(QString name)
const;
104 std::vector<PluginFrameworkManager::PluginLoadInfo> getPluginLoadInfo(QStringList symbolicNames);
106 QScopedPointer<ctkPluginFrameworkFactory> mFrameworkFactory;
107 QSharedPointer<ctkPluginFramework> mFramework;
109 void initializeFramework();
110 void startFramework();
112 bool frameworkInitialized()
const;
113 bool frameworkStarted()
const;
116 void loadPluginFromStoredState(QString symbolicName, QString storedState);
118 QString convertToRelativePath(QString path)
const;
119 QString convertToAbsolutePath(QString path)
const;
121 QStringList mPluginSearchPaths;
122 QStringList mPluginLibFilter;
124 QString mSettingsSearchPaths;
125 QString mSettingsBase;
QSharedPointer< ctkPlugin > ctkPluginPtr
std::pair< QString, ctkPluginPtr > PluginData
boost::shared_ptr< class PluginFrameworkManager > PluginFrameworkManagerPtr
static PluginFrameworkManagerPtr create()