1 /* This file is part of the KDE project 2 * 3 * Copyright (C) 2012 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_OPML_H_ 22 #define _KMPLAYER_OPML_H_ 23 24 #include <qstring.h> 25 26 #include "kmplayerplaylist.h" 27 28 namespace KMPlayer { 29 30 namespace OPML { 31 32 const short id_node_opml = 550; 33 const short id_node_head = 551; 34 const short id_node_title = 552; 35 const short id_node_body = 553; 36 const short id_node_outline = 554; 37 const short id_node_ignore = 555; 38 39 class KMPLAYER_NO_EXPORT Opml : public Element, public PlaylistRole { 40 public: Opml(NodePtr & d)41 Opml (NodePtr& d) : Element (d, id_node_opml) {} 42 Node *childFromTag (const QString& tag); nodeName()43 const char *nodeName () const { return "opml"; } 44 void *role (RoleType msg, void *content=NULL); 45 void closed (); 46 }; 47 48 class KMPLAYER_NO_EXPORT Head : public Element { 49 public: Head(NodePtr & d)50 Head (NodePtr& d) : Element (d, id_node_head) {} 51 Node *childFromTag (const QString& tag); nodeName()52 const char *nodeName () const { return "head"; } 53 }; 54 55 class KMPLAYER_NO_EXPORT Body : public Element { 56 public: Body(NodePtr & d)57 Body (NodePtr& d) : Element (d, id_node_body) {} nodeName()58 const char *nodeName () const { return "body"; } 59 Node *childFromTag (const QString& tag); 60 }; 61 62 class KMPLAYER_NO_EXPORT Outline : public Mrl { 63 public: Outline(NodePtr & d)64 Outline (NodePtr& d) : Mrl (d, id_node_outline) {} nodeName()65 const char *nodeName () const { return "outline"; } 66 void closed (); 67 }; 68 69 } //namespace OPML 70 71 72 } // namespace KMPlayer 73 74 #endif //_KMPLAYER_OPML_H_ 75