You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdewebdev/kommander/pluginmanager/pluginmanager.h

54 lines
1.7 KiB

/***************************************************************************
pluginmanager.h - Plugin manager class
-------------------
copyright : (C) 2005 Michal Rudolf <mrudolf@tdewebdev.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 <tqstringlist.h>
class KConfig;
class PluginManager
{
public:
PluginManager();
~PluginManager();
// number of known plugins
int count() const;
// n-th plugin
TQString 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 TQString& plugin, bool overwrite = true);
// removes given plugin
bool remove(const TQString& plugin);
// remove invalid plugins, returns number of removed plugins
int verify();
// list of plugins
TQStringList items() const;
private:
// returns expanded library name or null if it is invalid
TQString libraryName(const TQString& plugin) const;
TQStringList* m_list;
KConfig *m_cfg;
};
#endif