author | zecke <zecke> | 2004-05-11 21:58:26 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-05-11 21:58:26 (UTC) |
commit | 81104f00cb87962333a024d3fa5ff6cf3d8d7d83 (patch) (side-by-side diff) | |
tree | a2cf80b7c2a340e7e24692ced55155e2e907cf77 /libopie2/opiecore/opluginloader.h | |
parent | e58a9f83f1bd385aad687daa166077602e921494 (diff) | |
download | opie-81104f00cb87962333a024d3fa5ff6cf3d8d7d83.zip opie-81104f00cb87962333a024d3fa5ff6cf3d8d7d83.tar.gz opie-81104f00cb87962333a024d3fa5ff6cf3d8d7d83.tar.bz2 |
-Woot The OpluginLoader successfully loaded and unloaded the Today Plugins
-Now when GUI and manager is done I'll see if sorting and disabling also works
No leak, no memcorruption when running the test case
Diffstat (limited to 'libopie2/opiecore/opluginloader.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/opluginloader.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/libopie2/opiecore/opluginloader.h b/libopie2/opiecore/opluginloader.h index a7df4a8..421d1f6 100644 --- a/libopie2/opiecore/opluginloader.h +++ b/libopie2/opiecore/opluginloader.h @@ -4,12 +4,13 @@ */ #ifndef ODP_CORE_OPLUGIN_LOADER_H #define ODP_CORE_OPLUGIN_LOADER_H #include <qpe/qlibrary.h> +#include <qptrdict.h> #include <qstringlist.h> namespace Opie { namespace Core { class OConfig; namespace Internal { @@ -28,32 +29,29 @@ template class QPtrDict<QLibrary>; * */ class OPluginItem { public: typedef QValueList<OPluginItem> List; OPluginItem(); - OPluginItem( const QString& name, const QCString& confopt, const QString& path, int pos = -1 ); + OPluginItem( const QString& name, const QString& path, int pos = -1 ); ~OPluginItem(); bool operator==( const OPluginItem& )const; bool operator!=( const OPluginItem& )const; QString name()const; - QCString configKey()const; QString path()const; int position()const; void setName( const QString& ); - void setConfigKey( const QCString& ); void setPath( const QString& ); void setPosition( int ); private: QString m_name; - QCString m_conf; QString m_path; int m_pos; struct Private; Private *d; }; @@ -87,30 +85,28 @@ public: virtual QUnknownInterface* load( const OPluginItem& item, const QUuid& ); virtual void unload( QUnknownInterface* ); protected: - virtual void readConfig(); + void readConfig(); virtual List plugins( const QString& dir, bool sorted, bool disabled )const; void setPluginDirs( const QStringList& ); void setPluginDir( const QString& ); - bool &isSafeMode()const; - bool &isSorted()const; - void readConfig()const; - void setSafeMode(bool b = false); + bool isSorted()const; + void setSafeMode(const QString& app = QString::null, bool b = false); + static QString unlibify( const QString& str ); private: - QString languageList(); + 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_readConfig : 1; bool m_isSorted : 1; QPtrDict<QLibrary> m_library; struct Private; Private* d; }; @@ -136,15 +132,15 @@ private: */ class OPluginLoader : public OGenericPluginLoader { public: OPluginLoader( const QString& name, bool sorted = false ); ~OPluginLoader(); - temlate<class IFace> + template<class IFace> IFace* load( const QString& name, const QUuid& ); - temlate<class IFace> + template<class IFace> IFace* load( const OPluginItem& item, const QUuid& ); }; /** * \brief A class to manager order and activation of plugins * |