Noatun API Documentation

pluginloader.h

Go to the documentation of this file.
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 
00032 class LibraryLoader
00033 {
00034         friend class Plugin;
00035         struct PluginLibrary
00036         {
00037                 Plugin *plugin;
00038                 KLibrary *library;
00039         };
00040 
00041 public:
00042         LibraryLoader();
00043         ~LibraryLoader();
00044 
00045         QValueList<NoatunLibraryInfo> available() const;
00046         QValueList<NoatunLibraryInfo> loaded() const;
00047         QValueList<NoatunLibraryInfo> loadedByType(const QString &type) const;
00048 
00052         bool loadAll(void);
00053         bool loadAll(const QStringList &);
00054 
00055         bool isLoaded(const QString &spec) const;
00056         void add(const QString &spec);
00057         void setModules(const QStringList &mods);
00061         bool remove(const QString &spec);
00068         bool remove(const QString &spec, bool terminateOnLastUI);
00072         bool remove(const LibraryLoader::PluginLibrary *plugin);
00073         bool remove(const Plugin *plugin);
00074         
00075         Playlist *playlist() const;
00076 
00082         NoatunLibraryInfo getInfo(const QString &spec) const;
00083         QPtrList<Plugin> plugins() const;
00084         
00085 private:
00086         bool loadSO(const QString &spec);
00087         void removeNow(const QString &spec);
00088 
00089 private:
00090         QDict<LibraryLoader::PluginLibrary> mLibHash;
00091         Playlist *mPlaylist;
00092 };
00093 
00094 #endif
00095 
KDE Logo
This file is part of the documentation for Noatun 2.6.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 22 00:20:36 2004 by doxygen 1.3.8-20040913 written by Dimitri van Heesch, © 1997-2003