author | eilers <eilers> | 2004-07-18 12:54:22 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-07-18 12:54:22 (UTC) |
commit | 2d2e1091b0da1a1f2b1031969d5be0bf25446021 (patch) (unidiff) | |
tree | 64bebe0415c650503211ebd839505f9cd15d0ade | |
parent | 4542dd2fd841179a064af1865b0701bdab7eaaf5 (diff) | |
download | opie-2d2e1091b0da1a1f2b1031969d5be0bf25446021.zip opie-2d2e1091b0da1a1f2b1031969d5be0bf25446021.tar.gz opie-2d2e1091b0da1a1f2b1031969d5be0bf25446021.tar.bz2 |
Really remove useless code ..
-rw-r--r-- | libopie2/opiecore/opluginloader.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libopie2/opiecore/opluginloader.h b/libopie2/opiecore/opluginloader.h index 7582d29..d97f586 100644 --- a/libopie2/opiecore/opluginloader.h +++ b/libopie2/opiecore/opluginloader.h | |||
@@ -1,117 +1,115 @@ | |||
1 | /* | 1 | /* |
2 | * LGPLv2 or later | 2 | * LGPLv2 or later |
3 | * zecke@handhelds.org | 3 | * zecke@handhelds.org |
4 | */ | 4 | */ |
5 | #ifndef ODP_CORE_OPLUGIN_LOADER_H | 5 | #ifndef ODP_CORE_OPLUGIN_LOADER_H |
6 | #define ODP_CORE_OPLUGIN_LOADER_H | 6 | #define ODP_CORE_OPLUGIN_LOADER_H |
7 | 7 | ||
8 | #include <qpe/qlibrary.h> | 8 | #include <qpe/qlibrary.h> |
9 | 9 | ||
10 | #include <qptrdict.h> | 10 | #include <qptrdict.h> |
11 | #include <qstringlist.h> | 11 | #include <qstringlist.h> |
12 | 12 | ||
13 | namespace Opie { | 13 | namespace Opie { |
14 | namespace Core { | 14 | namespace Core { |
15 | class OConfig; | 15 | class OConfig; |
16 | namespace Internal { | 16 | namespace Internal { |
17 | class OPluginLibraryHolder; | 17 | class OPluginLibraryHolder; |
18 | } | 18 | } |
19 | 19 | ||
20 | // template class QPtrDict<QLibrary>; | ||
21 | |||
22 | /** | 20 | /** |
23 | * \brief A small item representing the Plugin Information | 21 | * \brief A small item representing the Plugin Information |
24 | * This class contains the information about a Plugin. It contains | 22 | * This class contains the information about a Plugin. It contains |
25 | * a translated name if available to the system, a config key, | 23 | * a translated name if available to the system, a config key, |
26 | * and the path location. | 24 | * and the path location. |
27 | * | 25 | * |
28 | * @since 1.2 | 26 | * @since 1.2 |
29 | * | 27 | * |
30 | */ | 28 | */ |
31 | class OPluginItem { | 29 | class OPluginItem { |
32 | public: | 30 | public: |
33 | typedef QValueList<OPluginItem> List; | 31 | typedef QValueList<OPluginItem> List; |
34 | OPluginItem(); | 32 | OPluginItem(); |
35 | OPluginItem( const QString& name, const QString& path, bool enabled = true, int pos = -1 ); | 33 | OPluginItem( const QString& name, const QString& path, bool enabled = true, int pos = -1 ); |
36 | ~OPluginItem(); | 34 | ~OPluginItem(); |
37 | 35 | ||
38 | bool isEmpty()const; | 36 | bool isEmpty()const; |
39 | 37 | ||
40 | bool operator==( const OPluginItem& )const; | 38 | bool operator==( const OPluginItem& )const; |
41 | bool operator!=( const OPluginItem& )const; | 39 | bool operator!=( const OPluginItem& )const; |
42 | 40 | ||
43 | 41 | ||
44 | QString name()const; | 42 | QString name()const; |
45 | QString path()const; | 43 | QString path()const; |
46 | bool isEnabled()const; | 44 | bool isEnabled()const; |
47 | int position()const; | 45 | int position()const; |
48 | 46 | ||
49 | void setName( const QString& ); | 47 | void setName( const QString& ); |
50 | void setPath( const QString& ); | 48 | void setPath( const QString& ); |
51 | void setEnabled( bool ); | 49 | void setEnabled( bool ); |
52 | void setPosition( int ); | 50 | void setPosition( int ); |
53 | 51 | ||
54 | private: | 52 | private: |
55 | QString m_name; | 53 | QString m_name; |
56 | QString m_path; | 54 | QString m_path; |
57 | bool m_enabled : 1; | 55 | bool m_enabled : 1; |
58 | int m_pos; | 56 | int m_pos; |
59 | struct Private; | 57 | struct Private; |
60 | Private *d; | 58 | Private *d; |
61 | }; | 59 | }; |
62 | 60 | ||
63 | /** | 61 | /** |
64 | * \brief A generic class to easily load and manage plugins | 62 | * \brief A generic class to easily load and manage plugins |
65 | * | 63 | * |
66 | * This is the generic non sepcialised loader for plugins. Normally | 64 | * This is the generic non sepcialised loader for plugins. Normally |
67 | * you would prefer using the OPluginLoader directly. This class | 65 | * you would prefer using the OPluginLoader directly. This class |
68 | * exists to minimize the application binary size due the usage | 66 | * exists to minimize the application binary size due the usage |
69 | * of templates in the specialized API | 67 | * of templates in the specialized API |
70 | * | 68 | * |
71 | * @since 1.2 | 69 | * @since 1.2 |
72 | * @see OPluginLoader | 70 | * @see OPluginLoader |
73 | */ | 71 | */ |
74 | class OGenericPluginLoader { | 72 | class OGenericPluginLoader { |
75 | public: | 73 | public: |
76 | typedef OPluginItem::List List; | 74 | typedef OPluginItem::List List; |
77 | OGenericPluginLoader( const QString &name, bool isSorted = false ); | 75 | OGenericPluginLoader( const QString &name, bool isSorted = false ); |
78 | virtual ~OGenericPluginLoader(); | 76 | virtual ~OGenericPluginLoader(); |
79 | 77 | ||
80 | void setAutoDelete( bool ); | 78 | void setAutoDelete( bool ); |
81 | bool autoDelete()const; | 79 | bool autoDelete()const; |
82 | void clear(); | 80 | void clear(); |
83 | 81 | ||
84 | QString name()const; | 82 | QString name()const; |
85 | bool isSorted()const; | 83 | bool isSorted()const; |
86 | bool isInSafeMode()const; | 84 | bool isInSafeMode()const; |
87 | 85 | ||
88 | 86 | ||
89 | List allAvailable(bool sorted = false )const; | 87 | List allAvailable(bool sorted = false )const; |
90 | List filtered(bool sorted = false )const; | 88 | List filtered(bool sorted = false )const; |
91 | 89 | ||
92 | 90 | ||
93 | virtual QUnknownInterface* load( const OPluginItem& item, const QUuid& ); | 91 | virtual QUnknownInterface* load( const OPluginItem& item, const QUuid& ); |
94 | virtual void unload( QUnknownInterface* ); | 92 | virtual void unload( QUnknownInterface* ); |
95 | 93 | ||
96 | protected: | 94 | protected: |
97 | friend class OPluginManager; // we need the static unlibify | 95 | friend class OPluginManager; // we need the static unlibify |
98 | void readConfig(); | 96 | void readConfig(); |
99 | virtual List plugins( const QString& dir, bool sorted, bool disabled )const; | 97 | virtual List plugins( const QString& dir, bool sorted, bool disabled )const; |
100 | void setPluginDirs( const QStringList& ); | 98 | void setPluginDirs( const QStringList& ); |
101 | void setPluginDir( const QString& ); | 99 | void setPluginDir( const QString& ); |
102 | void setSafeMode(const QString& app = QString::null, bool b = false); | 100 | void setSafeMode(const QString& app = QString::null, bool b = false); |
103 | static QString unlibify( const QString& str ); | 101 | static QString unlibify( const QString& str ); |
104 | private: | 102 | private: |
105 | QStringList languageList(); | 103 | QStringList languageList(); |
106 | void installTranslators(const QString& type); | 104 | void installTranslators(const QString& type); |
107 | QString m_dir; | 105 | QString m_dir; |
108 | QStringList m_plugDirs; | 106 | QStringList m_plugDirs; |
109 | QStringList m_languages; | 107 | QStringList m_languages; |
110 | bool m_autoDelete : 1; | 108 | bool m_autoDelete : 1; |
111 | bool m_isSafeMode : 1; | 109 | bool m_isSafeMode : 1; |
112 | bool m_isSorted : 1; | 110 | bool m_isSorted : 1; |
113 | QPtrDict<QLibrary> m_library; | 111 | QPtrDict<QLibrary> m_library; |
114 | 112 | ||
115 | struct Private; | 113 | struct Private; |
116 | Private* d; | 114 | Private* d; |
117 | }; | 115 | }; |