Header cleanup
[amarok.git] / src / xspfplaylist.h
blob749f31adf1ca3bd938bb035dfc8420ddb0a90231
1 // Author: Mattias Fliesberg (C) Copyright 2006
2 // Copyright: See COPYING file that comes with this distribution
3 //
5 #ifndef XSPFPlaylist_H
6 #define XSPFPlaylist_H
8 class AtomicString;
10 #include <QString>
11 #include <q3textstream.h>
12 #include <qdom.h>
13 #include <QDateTime>
14 #include <QFile>
15 #include <q3valuelist.h>
17 #include <kurl.h>
19 /**
20 * @class XSPFPlaylist
21 * @author Mattias Fliesberg
24 typedef struct {
25 KUrl location;
26 QString identifier;
27 QString title;
28 AtomicString creator;
29 QString annotation;
30 KUrl info;
31 KUrl image;
32 AtomicString album;
33 uint trackNum;
34 uint duration;
35 KUrl link;
36 // meta,
37 // extension
38 } XSPFtrack;
40 typedef Q3ValueList < XSPFtrack > XSPFtrackList;
42 class XSPFPlaylist : public QDomDocument
44 public:
45 XSPFPlaylist();
46 XSPFPlaylist( QTextStream &stream );
48 public:
49 /* convenience functions */
50 QString title();
51 QString creator();
52 QString annotation();
53 KUrl info();
54 KUrl location();
55 QString identifier();
56 KUrl image();
57 QDateTime date();
58 KUrl license();
59 KUrl::List attribution();
60 KUrl link();
61 // meta();
62 // extension();
64 void setTitle( QString title );
65 void setCreator( QString creator );
66 void setAnnotation( QString annotation );
67 void setInfo( KUrl info );
68 void setLocation( KUrl location );
69 void setIdentifier( QString identifier );
70 void setImage( KUrl image );
71 void setDate( QDateTime date );
72 void setLicense( KUrl license );
73 void setAttribution( KUrl attribution, bool append = true );
74 void setLink( KUrl link );
75 void setTrackList( XSPFtrackList trackList, bool append = false );
76 // meta();
77 // extension();
79 XSPFtrackList trackList();
82 private:
83 bool loadXSPF( QTextStream& );
86 #endif // XSPFPlaylist_H