blob: 522eff21351c4dceed8ddc36f49c995aa72b4a9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
// Author: Mattias Fliesberg (C) Copyright 2006
// Copyright: See COPYING file that comes with this distribution
//
#ifndef XSPFPlaylist_H
#define XSPFPlaylist_H
class AtomicString;
#include <tqstring.h>
#include <tqtextstream.h>
#include <tqdom.h>
#include <tqdatetime.h>
#include <tqfile.h>
#include <tqvaluelist.h>
#include <kurl.h>
/**
* @class XSPFPlaylist
* @author Mattias Fliesberg
*/
typedef struct {
KURL location;
TQString identifier;
TQString title;
AtomicString creator;
TQString annotation;
KURL info;
KURL image;
AtomicString album;
uint trackNum;
uint duration;
KURL link;
// meta,
// extension
} XSPFtrack;
typedef TQValueList < XSPFtrack > XSPFtrackList;
class XSPFPlaylist : public TQDomDocument
{
public:
XSPFPlaylist();
XSPFPlaylist( TQTextStream &stream );
public:
/* convenience functions */
TQString title();
TQString creator();
TQString annotation();
KURL info();
KURL location();
TQString identifier();
KURL image();
TQDateTime date();
KURL license();
KURL::List attribution();
KURL link();
// meta();
// extension();
void setTitle( TQString title );
void setCreator( TQString creator );
void setAnnotation( TQString annotation );
void setInfo( KURL info );
void setLocation( KURL location );
void setIdentifier( TQString identifier );
void setImage( KURL image );
void setDate( TQDateTime date );
void setLicense( KURL license );
void setAttribution( KURL attribution, bool append = true );
void setLink( KURL link );
void setTrackList( XSPFtrackList trackList, bool append = false );
// meta();
// extension();
XSPFtrackList trackList();
private:
bool loadXSPF( TQTextStream& );
};
#endif // XSPFPlaylist_H
|