1 /* This file is part of the KDE project 2 * 3 * Copyright (C) 2005-2006 Koos Vriezen <koos.vriezen@gmail.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public License 16 * along with this library; see the file COPYING.LIB. If not, write to 17 * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef _KMPLAYER_RSS_H_ 22 #define _KMPLAYER_RSS_H_ 23 24 #include <qstring.h> 25 26 #include "kmplayerplaylist.h" 27 28 namespace KMPlayer { 29 30 namespace RSS { 31 32 const short id_node_rss = 200; 33 const short id_node_channel = 201; 34 const short id_node_item = 202; 35 const short id_node_title = 203; 36 const short id_node_description = 204; 37 const short id_node_enclosure = 205; 38 const short id_node_category = 206; 39 const short id_node_thumbnail = 207; 40 const short id_node_ignored = 208; 41 42 /** 43 * '<RSS>' tag 44 */ 45 class KMPLAYER_NO_EXPORT Rss : public Element, public PlaylistRole 46 { 47 public: Rss(NodePtr & d)48 KDE_NO_CDTOR_EXPORT Rss (NodePtr & d) : Element (d, id_node_rss) {} 49 Node *childFromTag (const QString & tag); nodeName()50 KDE_NO_EXPORT const char * nodeName () const { return "rss"; } 51 void *role (RoleType msg, void *content=NULL); 52 }; 53 54 class KMPLAYER_NO_EXPORT Channel : public Element, public PlaylistRole 55 { 56 public: Channel(NodePtr & d)57 KDE_NO_CDTOR_EXPORT Channel (NodePtr & d) : Element (d, id_node_channel) {} 58 Node *childFromTag (const QString & tag); nodeName()59 KDE_NO_EXPORT const char * nodeName () const { return "channel"; } 60 void closed (); 61 void *role (RoleType msg, void *content=NULL); 62 }; 63 64 class KMPLAYER_NO_EXPORT Item : public Element, public PlaylistRole { 65 public: Item(NodePtr & d)66 KDE_NO_CDTOR_EXPORT Item (NodePtr &d) 67 : Element (d, id_node_item), summary_added (false) {} 68 Node *childFromTag (const QString & tag); nodeName()69 KDE_NO_EXPORT const char * nodeName () const { return "item"; } 70 void closed (); 71 bool summary_added; 72 }; 73 74 class KMPLAYER_NO_EXPORT Enclosure : public Mrl { 75 public: Enclosure(NodePtr & d)76 KDE_NO_CDTOR_EXPORT Enclosure(NodePtr &d) : Mrl(d, id_node_enclosure) {} nodeName()77 KDE_NO_EXPORT const char * nodeName () const { return "enclosure"; } 78 void closed (); 79 void activate (); 80 void deactivate (); 81 QString description; 82 }; 83 84 } //namespace RSS 85 86 87 } // namespace KMPlayer 88 89 #endif //_KMPLAYER_RSS_H_ 90