Noatun API Documentation

pluginloader.h

00001 #ifndef PLUGIN_LOADER_H
00002 #define PLUGIN_LOADER_H
00003 
00004 #include <qstring.h>
00005 #include <qvaluelist.h>
00006 #include <qstringlist.h>
00007 #include <noatun/app.h>
00008 
00009 #include <klibloader.h>
00010 #include <qdict.h>
00011 
00012 struct NoatunLibraryInfo
00013 {
00014         QString specfile;
00015         QString filename;
00016         QString author;
00017         QString license;
00018         QString type;
00019         QString site;
00020         QString email;
00021         QString name;
00022         QString comment;
00023         QStringList require;
00024 };
00025 
00026 bool operator ==(const NoatunLibraryInfo &, const NoatunLibraryInfo &);
00027 
00028 class Playlist;
00029 class Visualization;
00030 class Plugin;
00031 
00035 class LibraryLoader
00036 {
00037         friend class Plugin;
00038         struct PluginLibrary
00039         {
00040                 Plugin *plugin;
00041                 KLibrary *library;
00042         };
00043 
00044 public:
00045         LibraryLoader();
00046         ~LibraryLoader();
00047 
00048         QValueList<NoatunLibraryInfo> available() const;
00049         QValueList<NoatunLibraryInfo> loaded() const;
00050         QValueList<NoatunLibraryInfo> loadedByType(const QString &type) const;
00051 
00055         bool loadAll(void);
00056         bool loadAll(const QStringList &);
00057 
00058         bool isLoaded(const QString &spec) const;
00059         void add(const QString &spec);
00060         void setModules(const QStringList &mods);
00064         bool remove(const QString &spec);
00071         bool remove(const QString &spec, bool terminateOnLastUI);
00075         bool remove(const LibraryLoader::PluginLibrary *plugin);
00076         bool remove(const Plugin *plugin);
00077 
00078         Playlist *playlist() const;
00079 
00085         NoatunLibraryInfo getInfo(const QString &spec) const;
00086         QPtrList<Plugin> plugins() const;
00087 
00088 private:
00089         bool loadSO(const QString &spec);
00090         void removeNow(const QString &spec);
00091 
00092 private:
00093         QDict<LibraryLoader::PluginLibrary> mLibHash;
00094         Playlist *mPlaylist;
00095 };
00096 
00097 #endif
00098 
KDE Logo
This file is part of the documentation for Noatun 2.6.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 23:49:45 2004 by doxygen 1.3.8-20040913 written by Dimitri van Heesch, © 1997-2003