1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2006 Koos Vriezen <koos.vriezen@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef _KMPLAYER_XSPF_H_
22 #define _KMPLAYER_XSPF_H_
23 
24 #include <qstring.h>
25 
26 #include "kmplayerplaylist.h"
27 
28 namespace KMPlayer {
29 
30 namespace XSPF {
31 
32 const short id_node_playlist = 500;
33 const short id_node_title = 501;
34 const short id_node_creator = 502;
35 const short id_node_annotation = 503;
36 const short id_node_info = 504;
37 const short id_node_location = 505;
38 const short id_node_identifier = 506;
39 const short id_node_image = 507;
40 const short id_node_date = 508;
41 const short id_node_license = 509;
42 const short id_node_attribution = 510;
43 const short id_node_meta = 511;
44 const short id_node_extension = 512;
45 const short id_node_tracklist = 513;
46 const short id_node_track = 514;
47 const short id_node_album = 515;
48 const short id_node_tracknum = 516;
49 const short id_node_duration = 517;
50 const short id_node_link = 518;
51 
52 class KMPLAYER_NO_EXPORT Playlist : public Mrl {
53 public:
Playlist(NodePtr & d)54     KDE_NO_CDTOR_EXPORT Playlist (NodePtr & d) : Mrl (d, id_node_playlist) {}
55     Node *childFromTag (const QString & tag);
nodeName()56     KDE_NO_EXPORT const char * nodeName () const { return "playlist"; }
57     void *role (RoleType msg, void *content=NULL);
58     void closed ();
59 };
60 
61 class KMPLAYER_NO_EXPORT Tracklist : public Element {
62 public:
Tracklist(NodePtr & d)63     KDE_NO_CDTOR_EXPORT Tracklist (NodePtr & d) : Element (d, id_node_tracklist) {}
64     Node *childFromTag (const QString & tag);
nodeName()65     KDE_NO_EXPORT const char * nodeName () const { return "tracklist"; }
66 };
67 
68 class KMPLAYER_NO_EXPORT Track : public Element {
69 public:
Track(NodePtr & d)70     KDE_NO_CDTOR_EXPORT Track (NodePtr & d) : Element (d, id_node_track) {}
71     void closed ();
72     void activate ();
nodeName()73     KDE_NO_EXPORT const char * nodeName () const { return "track"; }
74     Node *childFromTag (const QString & tag);
75 };
76 
77 class KMPLAYER_NO_EXPORT Location : public Mrl {
78 public:
Location(NodePtr & d)79     KDE_NO_CDTOR_EXPORT Location (NodePtr &d) : Mrl (d, id_node_location) {}
nodeName()80     KDE_NO_EXPORT const char * nodeName () const { return "location"; }
81     void closed ();
82 };
83 
84 } //namespace XSPF
85 
86 
87 } // namespace KMPlayer
88 
89 #endif //_KMPLAYER_XSPF_H_
90