add mp3 and ogg torrent url info to JamendoAlbum
[amarok.git] / src / xspfplaylist.h
bloba97163d2364783b762a3353308d99e0bafaa352e
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 #include "atomicstring.h"
9 class QString;
10 class QDateTime;
11 class KUrl;
13 #include <QDomDocument>
15 #include "meta.h"
17 typedef struct {
18 KUrl location;
19 QString identifier;
20 QString title;
21 AtomicString creator;
22 QString annotation;
23 KUrl info;
24 KUrl image;
25 AtomicString album;
26 uint trackNum;
27 uint duration;
28 KUrl link;
29 } XSPFtrack;
31 typedef QList<XSPFtrack> XSPFtrackList;
33 /**
34 * @class XSPFPlaylist
35 * @author Mattias Fliesberg
36 * @author Ian Monroe
38 class XSPFPlaylist : public QDomDocument
40 public:
41 XSPFPlaylist();
42 XSPFPlaylist( QTextStream &stream );
44 public:
45 /* convenience functions */
46 QString title();
47 QString creator();
48 QString annotation();
49 KUrl info();
50 KUrl location();
51 QString identifier();
52 KUrl image();
53 QDateTime date();
54 KUrl license();
55 KUrl::List attribution();
56 KUrl link();
57 // meta();
58 // extension();
60 void setTitle( QString title );
61 void setCreator( QString creator );
62 void setAnnotation( QString annotation );
63 void setInfo( KUrl info );
64 void setLocation( KUrl location );
65 void setIdentifier( QString identifier );
66 void setImage( KUrl image );
67 void setDate( QDateTime date );
68 void setLicense( KUrl license );
69 void setAttribution( KUrl attribution, bool append = true );
70 void setLink( KUrl link );
71 void setTrackList( Meta::TrackList trackList, bool append = false );
72 // meta();
73 // extension();
75 XSPFtrackList trackList();
78 private:
79 bool loadXSPF( QTextStream& );
82 #endif // XSPFPlaylist_H