File indexing completed on 2024-04-21 12:25:44

0001 /*
0002     SPDX-FileCopyrightText: 2012 Koos Vriezen <koos.vriezen@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef _KMPLAYER_OPML_H_
0008 #define _KMPLAYER_OPML_H_
0009 
0010 #include <QString>
0011 
0012 #include "kmplayerplaylist.h"
0013 
0014 namespace KMPlayer {
0015 
0016 namespace OPML {
0017 
0018 const short id_node_opml = 550;
0019 const short id_node_head = 551;
0020 const short id_node_title = 552;
0021 const short id_node_body = 553;
0022 const short id_node_outline = 554;
0023 const short id_node_ignore = 555;
0024 
0025 class Opml : public Element, public PlaylistRole
0026 {
0027 public:
0028     Opml (NodePtr& d) : Element (d, id_node_opml) {}
0029     Node *childFromTag (const QString& tag) override;
0030     const char *nodeName () const override { return "opml"; }
0031     void *role (RoleType msg, void *content=nullptr) override;
0032     void closed () override;
0033 };
0034 
0035 class Head : public Element
0036 {
0037 public:
0038     Head (NodePtr& d) : Element (d, id_node_head) {}
0039     Node *childFromTag (const QString& tag) override;
0040     const char *nodeName () const override { return "head"; }
0041 };
0042 
0043 class Body : public Element
0044 {
0045 public:
0046     Body (NodePtr& d) : Element (d, id_node_body) {}
0047     const char *nodeName () const override { return "body"; }
0048     Node *childFromTag (const QString& tag) override;
0049 };
0050 
0051 class Outline : public Mrl
0052 {
0053 public:
0054     Outline (NodePtr& d) : Mrl (d, id_node_outline) {}
0055     const char *nodeName () const override { return "outline"; }
0056     void closed () override;
0057 };
0058 
0059 } //namespace OPML
0060 
0061 
0062 } // namespace KMPlayer
0063 
0064 #endif //_KMPLAYER_OPML_H_