Diffstat (limited to 'libopie2/opiecore/opluginloader.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/opluginloader.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opiecore/opluginloader.h b/libopie2/opiecore/opluginloader.h index d97f586..ee47733 100644 --- a/libopie2/opiecore/opluginloader.h +++ b/libopie2/opiecore/opluginloader.h @@ -19,97 +19,98 @@ class OPluginLibraryHolder; /** * \brief A small item representing the Plugin Information * This class contains the information about a Plugin. It contains * a translated name if available to the system, a config key, * and the path location. * * @since 1.2 * */ class OPluginItem { public: typedef QValueList<OPluginItem> List; OPluginItem(); OPluginItem( const QString& name, const QString& path, bool enabled = true, int pos = -1 ); ~OPluginItem(); bool isEmpty()const; bool operator==( const OPluginItem& )const; bool operator!=( const OPluginItem& )const; QString name()const; QString path()const; bool isEnabled()const; int position()const; void setName( const QString& ); void setPath( const QString& ); void setEnabled( bool ); void setPosition( int ); private: QString m_name; QString m_path; bool m_enabled : 1; int m_pos; struct Private; Private *d; }; /** * \brief A generic class to easily load and manage plugins * * This is the generic non sepcialised loader for plugins. Normally * you would prefer using the OPluginLoader directly. This class * exists to minimize the application binary size due the usage - * of templates in the specialized API + * of templates in the specialized API. + * * * @since 1.2 * @see OPluginLoader */ class OGenericPluginLoader { public: typedef OPluginItem::List List; OGenericPluginLoader( const QString &name, bool isSorted = false ); virtual ~OGenericPluginLoader(); void setAutoDelete( bool ); bool autoDelete()const; void clear(); QString name()const; bool isSorted()const; bool isInSafeMode()const; List allAvailable(bool sorted = false )const; List filtered(bool sorted = false )const; virtual QUnknownInterface* load( const OPluginItem& item, const QUuid& ); virtual void unload( QUnknownInterface* ); protected: friend class OPluginManager; // we need the static unlibify void readConfig(); virtual List plugins( const QString& dir, bool sorted, bool disabled )const; void setPluginDirs( const QStringList& ); void setPluginDir( const QString& ); void setSafeMode(const QString& app = QString::null, bool b = false); static QString unlibify( const QString& str ); private: QStringList languageList(); void installTranslators(const QString& type); QString m_dir; QStringList m_plugDirs; QStringList m_languages; bool m_autoDelete : 1; bool m_isSafeMode : 1; bool m_isSorted : 1; QPtrDict<QLibrary> m_library; struct Private; Private* d; }; |