Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

playlistsaver.h

Go to the documentation of this file.
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 Structure;
00022 public:
00023         enum Options
00024         {
00025                 XMLPlaylist=1,
00026                 M3U=2,
00027                 PLS=4
00028         };
00029         
00030         PlaylistSaver();
00031         virtual ~PlaylistSaver();
00032         
00033         bool save(const KURL &file, int options=0);
00034         bool load(const KURL &file, int options=0);
00035 
00046         bool metalist(const KURL &url);
00047 
00052         virtual void setGroup(const QString &);
00053 
00054 protected:
00060         virtual void readItem(const QMap<QString,QString> &properties) = 0;
00061 
00066         virtual PlaylistItem writeItem() = 0;
00067 
00072         virtual void changeGroup(const QString &) {}
00073 
00081         virtual void reset() {}
00082 
00083 private:
00084         bool loadXML(const KURL &file, int x=0);
00085         bool saveXML(const KURL &file, int x=0);
00086         
00087         bool loadM3U(const KURL &file, int x=0);
00088         bool saveM3U(const KURL &file, int x=0);
00089         
00090         bool loadPLS(const KURL &file, int x=0);
00091         bool savePLS(const KURL &file, int x=0);
00092 
00093 private:
00094         class Private;
00095         PlaylistSaver::Private *d; // unused
00096 
00097 };
00098 
00099 #endif

Generated on Sat May 24 15:10:27 2003 for Noatun by doxygen1.3-rc3