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 | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <qpe/qlibrary.h> | 8 | #include <qpe/qlibrary.h> |
9 | 9 | ||
10 | #include <qptrdict.h> | ||
10 | #include <qstringlist.h> | 11 | #include <qstringlist.h> |
11 | 12 | ||
12 | namespace Opie { | 13 | namespace Opie { |
@@ -31,7 +32,7 @@ class OPluginItem { | |||
31 | public: | 32 | public: |
32 | typedef QValueList<OPluginItem> List; | 33 | typedef QValueList<OPluginItem> List; |
33 | OPluginItem(); | 34 | OPluginItem(); |
34 | OPluginItem( const QString& name, const QCString& confopt, const QString& path, int pos = -1 ); | 35 | OPluginItem( const QString& name, const QString& path, int pos = -1 ); |
35 | ~OPluginItem(); | 36 | ~OPluginItem(); |
36 | 37 | ||
37 | bool operator==( const OPluginItem& )const; | 38 | bool operator==( const OPluginItem& )const; |
@@ -39,18 +40,15 @@ public: | |||
39 | 40 | ||
40 | 41 | ||
41 | QString name()const; | 42 | QString name()const; |
42 | QCString configKey()const; | ||
43 | QString path()const; | 43 | QString path()const; |
44 | int position()const; | 44 | int position()const; |
45 | 45 | ||
46 | void setName( const QString& ); | 46 | void setName( const QString& ); |
47 | void setConfigKey( const QCString& ); | ||
48 | void setPath( const QString& ); | 47 | void setPath( const QString& ); |
49 | void setPosition( int ); | 48 | void setPosition( int ); |
50 | 49 | ||
51 | private: | 50 | private: |
52 | QString m_name; | 51 | QString m_name; |
53 | QCString m_conf; | ||
54 | QString m_path; | 52 | QString m_path; |
55 | int m_pos; | 53 | int m_pos; |
56 | struct Private; | 54 | struct Private; |
@@ -90,24 +88,22 @@ public: | |||
90 | virtual void unload( QUnknownInterface* ); | 88 | virtual void unload( QUnknownInterface* ); |
91 | 89 | ||
92 | protected: | 90 | protected: |
93 | virtual void readConfig(); | 91 | void readConfig(); |
94 | virtual List plugins( const QString& dir, bool sorted, bool disabled )const; | 92 | virtual List plugins( const QString& dir, bool sorted, bool disabled )const; |
95 | void setPluginDirs( const QStringList& ); | 93 | void setPluginDirs( const QStringList& ); |
96 | void setPluginDir( const QString& ); | 94 | void setPluginDir( const QString& ); |
97 | bool &isSafeMode()const; | 95 | bool isSorted()const; |
98 | bool &isSorted()const; | 96 | void setSafeMode(const QString& app = QString::null, bool b = false); |
99 | void readConfig()const; | 97 | static QString unlibify( const QString& str ); |
100 | void setSafeMode(bool b = false); | ||
101 | 98 | ||
102 | private: | 99 | private: |
103 | QString languageList(); | 100 | QStringList languageList(); |
104 | void installTranslators(const QString& type); | 101 | void installTranslators(const QString& type); |
105 | QString m_dir; | 102 | QString m_dir; |
106 | QStringList m_plugDirs; | 103 | QStringList m_plugDirs; |
107 | QStringList m_languages; | 104 | QStringList m_languages; |
108 | bool m_autoDelete : 1; | 105 | bool m_autoDelete : 1; |
109 | bool m_isSafeMode : 1; | 106 | bool m_isSafeMode : 1; |
110 | bool m_readConfig : 1; | ||
111 | bool m_isSorted : 1; | 107 | bool m_isSorted : 1; |
112 | QPtrDict<QLibrary> m_library; | 108 | QPtrDict<QLibrary> m_library; |
113 | 109 | ||
@@ -139,9 +135,9 @@ public: | |||
139 | OPluginLoader( const QString& name, bool sorted = false ); | 135 | OPluginLoader( const QString& name, bool sorted = false ); |
140 | ~OPluginLoader(); | 136 | ~OPluginLoader(); |
141 | 137 | ||
142 | temlate<class IFace> | 138 | template<class IFace> |
143 | IFace* load( const QString& name, const QUuid& ); | 139 | IFace* load( const QString& name, const QUuid& ); |
144 | temlate<class IFace> | 140 | template<class IFace> |
145 | IFace* load( const OPluginItem& item, const QUuid& ); | 141 | IFace* load( const OPluginItem& item, const QUuid& ); |
146 | }; | 142 | }; |
147 | 143 | ||