File indexing completed on 2024-04-21 15:38:08
0001 /* This file is part of the KDE project 0002 * 0003 * Copyright (C) 2012 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_OPML_H_ 0022 #define _KMPLAYER_OPML_H_ 0023 0024 #include <qstring.h> 0025 0026 #include "kmplayerplaylist.h" 0027 0028 namespace KMPlayer { 0029 0030 namespace OPML { 0031 0032 const short id_node_opml = 550; 0033 const short id_node_head = 551; 0034 const short id_node_title = 552; 0035 const short id_node_body = 553; 0036 const short id_node_outline = 554; 0037 const short id_node_ignore = 555; 0038 0039 class KMPLAYER_NO_EXPORT Opml : public Element, public PlaylistRole { 0040 public: 0041 Opml (NodePtr& d) : Element (d, id_node_opml) {} 0042 Node *childFromTag (const QString& tag); 0043 const char *nodeName () const { return "opml"; } 0044 void *role (RoleType msg, void *content=NULL); 0045 void closed (); 0046 }; 0047 0048 class KMPLAYER_NO_EXPORT Head : public Element { 0049 public: 0050 Head (NodePtr& d) : Element (d, id_node_head) {} 0051 Node *childFromTag (const QString& tag); 0052 const char *nodeName () const { return "head"; } 0053 }; 0054 0055 class KMPLAYER_NO_EXPORT Body : public Element { 0056 public: 0057 Body (NodePtr& d) : Element (d, id_node_body) {} 0058 const char *nodeName () const { return "body"; } 0059 Node *childFromTag (const QString& tag); 0060 }; 0061 0062 class KMPLAYER_NO_EXPORT Outline : public Mrl { 0063 public: 0064 Outline (NodePtr& d) : Mrl (d, id_node_outline) {} 0065 const char *nodeName () const { return "outline"; } 0066 void closed (); 0067 }; 0068 0069 } //namespace OPML 0070 0071 0072 } // namespace KMPlayer 0073 0074 #endif //_KMPLAYER_OPML_H_