File indexing completed on 2024-04-28 08:46:30
0001 /* 0002 SPDX-FileCopyrightText: 2005 Koos Vriezen <koos.vriezen@xs4all.nl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef _KMPLAYER_ASX_H_ 0008 #define _KMPLAYER_ASX_H_ 0009 0010 #include <QString> 0011 0012 #include "kmplayerplaylist.h" 0013 0014 namespace KMPlayer { 0015 0016 namespace ASX { 0017 0018 const short id_node_asx = 400; 0019 const short id_node_entry = 401; 0020 const short id_node_ref = 402; 0021 const short id_node_entryref = 403; 0022 const short id_node_title = 404; 0023 const short id_node_base = 405; 0024 const short id_node_param = 406; 0025 const short id_node_starttime = 407; 0026 const short id_node_duration = 408; 0027 0028 /** 0029 * '<ASX>' tag 0030 */ 0031 class Asx : public Mrl 0032 { 0033 public: 0034 Asx (NodePtr & d) : Mrl (d, id_node_asx) {} 0035 Node *childFromTag (const QString & tag) override; 0036 void closed () override; 0037 const char * nodeName () const override { return "ASX"; } 0038 void *role (RoleType msg, void *content=nullptr) override; 0039 }; 0040 0041 /** 0042 * Entry tag as found in ASX for playlist item 0043 */ 0044 class Entry : public Mrl 0045 { 0046 public: 0047 Entry (NodePtr & d) 0048 : Mrl (d, id_node_entry), duration_timer (nullptr), ref_child_count (0) {} 0049 Node *childFromTag (const QString & tag) override; 0050 void message (MessageType msg, void *content=nullptr) override; 0051 const char * nodeName () const override { return "Entry"; } 0052 void closed () override; 0053 void activate () override; 0054 void deactivate () override; 0055 /** 0056 * False, but since we might have a 'base' child, we can have a rel. src 0057 */ 0058 PlayType playType () override; 0059 void *role (RoleType msg, void *content=nullptr) override; 0060 0061 Posting *duration_timer; 0062 int ref_child_count; 0063 }; 0064 0065 /** 0066 * Ref tag as found in ASX for URL item in playlist item 0067 */ 0068 class Ref : public Mrl 0069 { 0070 public: 0071 Ref (NodePtr & d) : Mrl (d, id_node_ref) {} 0072 //Node *childFromTag (const QString & tag); 0073 void opened () override; 0074 const char * nodeName () const override { return "Ref"; } 0075 }; 0076 0077 /** 0078 * EntryRef tag as found in ASX for shortcut of Entry plus Ref playlist item 0079 */ 0080 class EntryRef : public Mrl 0081 { 0082 public: 0083 EntryRef (NodePtr & d) : Mrl (d, id_node_entryref) {} 0084 //Node *childFromTag (const QString & tag); 0085 void opened () override; 0086 const char * nodeName () const override { return "EntryRef"; } 0087 }; 0088 0089 } //namespace ASX 0090 0091 0092 } // namespace KMPlayer 0093 0094 #endif //_KMPLAYER_ASX_H_