File indexing completed on 2024-04-14 15:00:58
0001 /* This file is part of the KDE project 0002 * 0003 * Copyright (C) 2005-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_RSS_H_ 0022 #define _KMPLAYER_RSS_H_ 0023 0024 #include <qstring.h> 0025 0026 #include "kmplayerplaylist.h" 0027 0028 namespace KMPlayer { 0029 0030 namespace RSS { 0031 0032 const short id_node_rss = 200; 0033 const short id_node_channel = 201; 0034 const short id_node_item = 202; 0035 const short id_node_title = 203; 0036 const short id_node_description = 204; 0037 const short id_node_enclosure = 205; 0038 const short id_node_category = 206; 0039 const short id_node_thumbnail = 207; 0040 const short id_node_ignored = 208; 0041 0042 /** 0043 * '<RSS>' tag 0044 */ 0045 class KMPLAYER_NO_EXPORT Rss : public Element, public PlaylistRole 0046 { 0047 public: 0048 KDE_NO_CDTOR_EXPORT Rss (NodePtr & d) : Element (d, id_node_rss) {} 0049 Node *childFromTag (const QString & tag); 0050 KDE_NO_EXPORT const char * nodeName () const { return "rss"; } 0051 void *role (RoleType msg, void *content=NULL); 0052 }; 0053 0054 class KMPLAYER_NO_EXPORT Channel : public Element, public PlaylistRole 0055 { 0056 public: 0057 KDE_NO_CDTOR_EXPORT Channel (NodePtr & d) : Element (d, id_node_channel) {} 0058 Node *childFromTag (const QString & tag); 0059 KDE_NO_EXPORT const char * nodeName () const { return "channel"; } 0060 void closed (); 0061 void *role (RoleType msg, void *content=NULL); 0062 }; 0063 0064 class KMPLAYER_NO_EXPORT Item : public Element, public PlaylistRole { 0065 public: 0066 KDE_NO_CDTOR_EXPORT Item (NodePtr &d) 0067 : Element (d, id_node_item), summary_added (false) {} 0068 Node *childFromTag (const QString & tag); 0069 KDE_NO_EXPORT const char * nodeName () const { return "item"; } 0070 void closed (); 0071 bool summary_added; 0072 }; 0073 0074 class KMPLAYER_NO_EXPORT Enclosure : public Mrl { 0075 public: 0076 KDE_NO_CDTOR_EXPORT Enclosure(NodePtr &d) : Mrl(d, id_node_enclosure) {} 0077 KDE_NO_EXPORT const char * nodeName () const { return "enclosure"; } 0078 void closed (); 0079 void activate (); 0080 void deactivate (); 0081 QString description; 0082 }; 0083 0084 } //namespace RSS 0085 0086 0087 } // namespace KMPlayer 0088 0089 #endif //_KMPLAYER_RSS_H_