summaryrefslogtreecommitdiffstats
path: root/kommander/pluginmanager/pluginmanager.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /kommander/pluginmanager/pluginmanager.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/pluginmanager/pluginmanager.h')
-rw-r--r--kommander/pluginmanager/pluginmanager.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/kommander/pluginmanager/pluginmanager.h b/kommander/pluginmanager/pluginmanager.h
new file mode 100644
index 00000000..0c7c79b7
--- /dev/null
+++ b/kommander/pluginmanager/pluginmanager.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ pluginmanager.h - Plugin manager class
+ -------------------
+ copyright : (C) 2005 Michal Rudolf <mrudolf@kdewebdev.org>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+#ifndef __HAVE_PLUGINMANAGER_H
+#define __HAVE_PLUGINMANAGER_H
+
+#include <qstringlist.h>
+
+class KConfig;
+
+class PluginManager
+{
+public:
+ PluginManager();
+ ~PluginManager();
+
+ // number of known plugins
+ int count() const;
+ // n-th plugin
+ QString item(int i) const;
+ // adds a plugin if valid;
+ // FIXME: if overwrite is true, plugin with the same base name will be removed
+ bool add(const QString& plugin, bool overwrite = true);
+ // removes given plugin
+ bool remove(const QString& plugin);
+ // remove invalid plugins, returns number of removed plugins
+ int verify();
+ // list of plugins
+ QStringList items() const;
+private:
+ // returns expanded library name or null if it is invalid
+ QString libraryName(const QString& plugin) const;
+
+ QStringList* m_list;
+ KConfig *m_cfg;
+};
+
+
+#endif
+