Noatun API Documentation

playlistsaver.h

00001 #ifndef NOATUNPLAYLISTSAVER_H
00002 #define NOATUNPLAYLISTSAVER_H
00003 
00004 #include <kurl.h>
00005 #include <qmap.h>
00006 #include <noatun/playlist.h>
00007 
00008 class Structure;
00009 
00019 class PlaylistSaver
00020 {
00021         friend class NoatunXMLStructure;
00022         friend class MSASXStructure;
00023 public:
00024         enum Options
00025         {
00026                 XMLPlaylist=1,
00027                 M3U=2,
00028                 PLS=4,
00029                 EXTM3U=8,
00030                 ASX=16
00031         };
00032 
00033         PlaylistSaver();
00034         virtual ~PlaylistSaver();
00035 
00036         bool save(const KURL &file, int options=0);
00037         bool load(const KURL &file, int options=0);
00038 
00049         bool metalist(const KURL &url);
00050 
00055         virtual void setGroup(const QString &);
00056 
00057 protected:
00063         virtual void readItem(const QMap<QString,QString> &properties) = 0;
00064 
00069         virtual PlaylistItem writeItem() = 0;
00070 
00075         virtual void changeGroup(const QString &) {}
00076 
00084         virtual void reset() {}
00085 
00086 private:
00087         bool loadXML(const KURL &file, int x=0);
00088         bool saveXML(const KURL &file, int x=0);
00089 
00090         bool loadM3U(const KURL &file, int x=0);
00091         bool saveM3U(const KURL &file, int x=0);
00092 
00093         bool loadPLS(const KURL &file, int x=0);
00094         bool savePLS(const KURL &file, int x=0);
00095 
00096 private:
00097         class Private;
00098         PlaylistSaver::Private *d; // unused
00099 
00100 };
00101 
00102 #endif
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