File indexing completed on 2024-04-21 15:38:14

0001 /* This file is part of the KDE project
0002  *
0003  * Copyright (C) 2006 Koos Vriezen <koos.vriezen@gmail.com>
0004  *
0005  * This library is free software; you can redistribute it and/or
0006  * modify it under the terms of the GNU Library General Public
0007  * License as published by the Free Software Foundation; either
0008  * version 2 of the License, or (at your option) any later version.
0009  *
0010  * This library is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * Library General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU Library General Public License
0016  * along with this library; see the file COPYING.LIB.  If not, write to
0017  * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
0018  * Boston, MA 02110-1301, USA.
0019  */
0020 
0021 #ifndef _KMPLAYER_XSPF_H_
0022 #define _KMPLAYER_XSPF_H_
0023 
0024 #include <qstring.h>
0025 
0026 #include "kmplayerplaylist.h"
0027 
0028 namespace KMPlayer {
0029 
0030 namespace XSPF {
0031 
0032 const short id_node_playlist = 500;
0033 const short id_node_title = 501;
0034 const short id_node_creator = 502;
0035 const short id_node_annotation = 503;
0036 const short id_node_info = 504;
0037 const short id_node_location = 505;
0038 const short id_node_identifier = 506;
0039 const short id_node_image = 507;
0040 const short id_node_date = 508;
0041 const short id_node_license = 509;
0042 const short id_node_attribution = 510;
0043 const short id_node_meta = 511;
0044 const short id_node_extension = 512;
0045 const short id_node_tracklist = 513;
0046 const short id_node_track = 514;
0047 const short id_node_album = 515;
0048 const short id_node_tracknum = 516;
0049 const short id_node_duration = 517;
0050 const short id_node_link = 518;
0051 
0052 class KMPLAYER_NO_EXPORT Playlist : public Mrl {
0053 public:
0054     KDE_NO_CDTOR_EXPORT Playlist (NodePtr & d) : Mrl (d, id_node_playlist) {}
0055     Node *childFromTag (const QString & tag);
0056     KDE_NO_EXPORT const char * nodeName () const { return "playlist"; }
0057     void *role (RoleType msg, void *content=NULL);
0058     void closed ();
0059 };
0060 
0061 class KMPLAYER_NO_EXPORT Tracklist : public Element {
0062 public:
0063     KDE_NO_CDTOR_EXPORT Tracklist (NodePtr & d) : Element (d, id_node_tracklist) {}
0064     Node *childFromTag (const QString & tag);
0065     KDE_NO_EXPORT const char * nodeName () const { return "tracklist"; }
0066 };
0067 
0068 class KMPLAYER_NO_EXPORT Track : public Element {
0069 public:
0070     KDE_NO_CDTOR_EXPORT Track (NodePtr & d) : Element (d, id_node_track) {}
0071     void closed ();
0072     void activate ();
0073     KDE_NO_EXPORT const char * nodeName () const { return "track"; }
0074     Node *childFromTag (const QString & tag);
0075 };
0076 
0077 class KMPLAYER_NO_EXPORT Location : public Mrl {
0078 public:
0079     KDE_NO_CDTOR_EXPORT Location (NodePtr &d) : Mrl (d, id_node_location) {}
0080     KDE_NO_EXPORT const char * nodeName () const { return "location"; }
0081     void closed ();
0082 };
0083 
0084 } //namespace XSPF
0085 
0086 
0087 } // namespace KMPlayer
0088 
0089 #endif //_KMPLAYER_XSPF_H_