File indexing completed on 2024-05-05 16:56:09
0001 /* This file is part of the KDE project 0002 * 0003 * Copyright (C) 2005 Koos Vriezen <koos.vriezen@xs4all.nl> 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_ASX_H_ 0022 #define _KMPLAYER_ASX_H_ 0023 0024 #include <qstring.h> 0025 0026 #include "kmplayerplaylist.h" 0027 0028 namespace KMPlayer { 0029 0030 namespace ASX { 0031 0032 const short id_node_asx = 400; 0033 const short id_node_entry = 401; 0034 const short id_node_ref = 402; 0035 const short id_node_entryref = 403; 0036 const short id_node_title = 404; 0037 const short id_node_base = 405; 0038 const short id_node_param = 406; 0039 const short id_node_starttime = 407; 0040 const short id_node_duration = 408; 0041 0042 /** 0043 * '<ASX>' tag 0044 */ 0045 class KMPLAYER_NO_EXPORT Asx : public Mrl { 0046 public: 0047 KDE_NO_CDTOR_EXPORT Asx (NodePtr & d) : Mrl (d, id_node_asx) {} 0048 Node *childFromTag (const QString & tag); 0049 void closed (); 0050 KDE_NO_EXPORT const char * nodeName () const { return "ASX"; } 0051 void *role (RoleType msg, void *content=NULL); 0052 }; 0053 0054 /** 0055 * Entry tag as found in ASX for playlist item 0056 */ 0057 class KMPLAYER_NO_EXPORT Entry : public Mrl { 0058 public: 0059 KDE_NO_CDTOR_EXPORT Entry (NodePtr & d) 0060 : Mrl (d, id_node_entry), duration_timer (NULL), ref_child_count (0) {} 0061 Node *childFromTag (const QString & tag); 0062 void message (MessageType msg, void *content=NULL); 0063 KDE_NO_EXPORT const char * nodeName () const { return "Entry"; } 0064 void closed (); 0065 void activate (); 0066 void deactivate (); 0067 /** 0068 * False, but since we might have a 'base' child, we can have a rel. src 0069 */ 0070 PlayType playType (); 0071 void *role (RoleType msg, void *content=NULL); 0072 0073 Posting *duration_timer; 0074 int ref_child_count; 0075 }; 0076 0077 /** 0078 * Ref tag as found in ASX for URL item in playlist item 0079 */ 0080 class KMPLAYER_NO_EXPORT Ref : public Mrl { 0081 public: 0082 KDE_NO_CDTOR_EXPORT Ref (NodePtr & d) : Mrl (d, id_node_ref) {} 0083 //Node *childFromTag (const QString & tag); 0084 void opened (); 0085 KDE_NO_EXPORT const char * nodeName () const { return "Ref"; } 0086 }; 0087 0088 /** 0089 * EntryRef tag as found in ASX for shortcut of Entry plus Ref playlist item 0090 */ 0091 class KMPLAYER_NO_EXPORT EntryRef : public Mrl { 0092 public: 0093 KDE_NO_CDTOR_EXPORT EntryRef (NodePtr & d) : Mrl (d, id_node_entryref) {} 0094 //Node *childFromTag (const QString & tag); 0095 void opened (); 0096 KDE_NO_EXPORT const char * nodeName () const { return "EntryRef"; } 0097 }; 0098 0099 } //namespace ASX 0100 0101 0102 } // namespace KMPlayer 0103 0104 #endif //_KMPLAYER_ASX_H_