ctkPluginStorage Class Reference

#include <Libs/PluginFramework/ctkPluginStorage_p.h>

Collaboration diagram for ctkPluginStorage:
Collaboration graph

List of all members.

Public Member Functions

void close ()
 ctkPluginStorage (ctkPluginFrameworkContext *framework)
QStringList findResourcesPath (long pluginId, const QString &path) const
QList< ctkPluginArchive * > getAllPluginArchives () const
QByteArray getPluginResource (long pluginId, const QString &res) const
QList< QString > getStartOnLaunchPlugins ()
ctkPluginArchiveinsertPlugin (const QUrl &location, const QString &localPath)
bool removeArchive (ctkPluginArchive *pa)
void replacePluginArchive (ctkPluginArchive *oldPA, ctkPluginArchive *newPA)
ctkPluginArchiveupdatePluginArchive (ctkPluginArchive *old, const QString &localPath)
 ~ctkPluginStorage ()

Private Attributes

QList< ctkPluginArchive * > archives
QMutex archivesLock
ctkPluginDatabase pluginDatabase

Detailed Description

Storage of all plugin meta-data and resources

Definition at line 41 of file ctkPluginStorage_p.h.

Constructor & Destructor Documentation

ctkPluginStorage::ctkPluginStorage ( ctkPluginFrameworkContext framework  ) 

Create a container for all plugin data in this framework. Try to restore all saved plugin archive state.

Definition at line 35 of file ctkPluginStorage.cpp.

ctkPluginStorage::~ctkPluginStorage (  ) 

Definition at line 94 of file ctkPluginStorage.cpp.

Member Function Documentation

void ctkPluginStorage::close (  ) 

Close this plugin storage and all bundles in it.

Definition at line 99 of file ctkPluginStorage.cpp.

QStringList ctkPluginStorage::findResourcesPath ( long  pluginId,
const QString &  path 
) const

Definition at line 138 of file ctkPluginStorage.cpp.

QList< ctkPluginArchive * > ctkPluginStorage::getAllPluginArchives (  )  const

Get all plugin archive objects.

QList of all PluginArchives.

Definition at line 74 of file ctkPluginStorage.cpp.

QByteArray ctkPluginStorage::getPluginResource ( long  pluginId,
const QString &  res 
) const

Definition at line 125 of file ctkPluginStorage.cpp.

QList< QString > ctkPluginStorage::getStartOnLaunchPlugins (  ) 

Get all plugins to start at next launch of framework. This list is sorted in increasing plugin id order.

A List with plugin locations.

Definition at line 79 of file ctkPluginStorage.cpp.

ctkPluginArchive * ctkPluginStorage::insertPlugin ( const QUrl &  location,
const QString &  localPath 

Insert a plugin (shared library) into the persistent storage

location Location of the plugin.
localPath Path to the plugin on the local file system
ctkPlugin archive object.

Definition at line 48 of file ctkPluginStorage.cpp.

bool ctkPluginStorage::removeArchive ( ctkPluginArchive pa  ) 

Remove plugin archive from archives list and persistent storage. The plugin archive is deleted and must not be used afterwards, if this method returns true.

pa ctkPlugin archive to remove.
true if element was removed.

Definition at line 105 of file ctkPluginStorage.cpp.

void ctkPluginStorage::replacePluginArchive ( ctkPluginArchive oldPA,
ctkPluginArchive newPA 

Replace old plugin archive with a new updated plugin archive, that was created with updatePluginArchive.

oldPA ctkPluginArchive to be replaced.
newPA new ctkPluginArchive.

Definition at line 61 of file ctkPluginStorage.cpp.

ctkPluginArchive * ctkPluginStorage::updatePluginArchive ( ctkPluginArchive old,
const QString &  localPath 

Insert a new plugin (shared library) into the persistent storagedata as an update to an existing plugin archive. To commit this data a call to replacePluginArchive is needed.

old ctkPluginArchive to be replaced.
localPath Path to a plugin on the local file system.
ctkPlugin archive object.

Definition at line 55 of file ctkPluginStorage.cpp.

Member Data Documentation

ctkPlugin id sorted list of all active plugin archives.

Definition at line 50 of file ctkPluginStorage_p.h.

Definition at line 45 of file ctkPluginStorage_p.h.

Framework handle.

Definition at line 55 of file ctkPluginStorage_p.h.

SQLite db caching plug-in metadata and resources

Definition at line 60 of file ctkPluginStorage_p.h.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1