File indexing completed on 2024-03-24 04:56:56
0001 /* 0002 SPDX-FileCopyrightText: 2006 Koos Vriezen <koos.vriezen@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef _KMPLAYER_XSPF_H_ 0008 #define _KMPLAYER_XSPF_H_ 0009 0010 #include <QString> 0011 0012 #include "kmplayerplaylist.h" 0013 0014 namespace KMPlayer { 0015 0016 namespace XSPF { 0017 0018 const short id_node_playlist = 500; 0019 const short id_node_title = 501; 0020 const short id_node_creator = 502; 0021 const short id_node_annotation = 503; 0022 const short id_node_info = 504; 0023 const short id_node_location = 505; 0024 const short id_node_identifier = 506; 0025 const short id_node_image = 507; 0026 const short id_node_date = 508; 0027 const short id_node_license = 509; 0028 const short id_node_attribution = 510; 0029 const short id_node_meta = 511; 0030 const short id_node_extension = 512; 0031 const short id_node_tracklist = 513; 0032 const short id_node_track = 514; 0033 const short id_node_album = 515; 0034 const short id_node_tracknum = 516; 0035 const short id_node_duration = 517; 0036 const short id_node_link = 518; 0037 0038 class Playlist : public Mrl 0039 { 0040 public: 0041 Playlist (NodePtr & d) : Mrl (d, id_node_playlist) {} 0042 Node *childFromTag (const QString & tag) override; 0043 const char * nodeName () const override { return "playlist"; } 0044 void *role (RoleType msg, void *content=nullptr) override; 0045 void closed () override; 0046 }; 0047 0048 class Tracklist : public Element 0049 { 0050 public: 0051 Tracklist (NodePtr & d) : Element (d, id_node_tracklist) {} 0052 Node *childFromTag (const QString & tag) override; 0053 const char * nodeName () const override { return "tracklist"; } 0054 }; 0055 0056 class Track : public Element 0057 { 0058 public: 0059 Track (NodePtr & d) : Element (d, id_node_track) {} 0060 void closed () override; 0061 void activate () override; 0062 const char * nodeName () const override { return "track"; } 0063 Node *childFromTag (const QString & tag) override; 0064 }; 0065 0066 class Location : public Mrl 0067 { 0068 public: 0069 Location (NodePtr &d) : Mrl (d, id_node_location) {} 0070 const char * nodeName () const override { return "location"; } 0071 void closed () override; 0072 }; 0073 0074 } //namespace XSPF 0075 0076 0077 } // namespace KMPlayer 0078 0079 #endif //_KMPLAYER_XSPF_H_