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_ATOM_H_ 22 #define _KMPLAYER_ATOM_H_ 23 24 #include <qstringlist.h> 25 26 #include "kmplayerplaylist.h" 27 28 namespace KMPlayer { 29 30 namespace ATOM { 31 32 const short id_node_feed = 300; 33 const short id_node_entry = 301; 34 const short id_node_link = 302; 35 const short id_node_title = 303; 36 const short id_node_summary = 304; 37 const short id_node_content = 305; 38 const short id_node_media_group = 306; 39 const short id_node_media_content = 307; 40 const short id_node_media_title = 308; 41 const short id_node_media_description = 309; 42 const short id_node_media_player = 310; 43 const short id_node_media_thumbnail = 311; 44 const short id_node_gd_rating = 312; 45 const short id_node_ignored = 313; 46 47 /** 48 * '<feed>' tag 49 */ 50 class KMPLAYER_NO_EXPORT Feed : public Element, public PlaylistRole { 51 public: Feed(NodePtr & d)52 KDE_NO_CDTOR_EXPORT Feed (NodePtr & d) : Element (d, id_node_feed) {} 53 Node *childFromTag (const QString & tag); nodeName()54 KDE_NO_EXPORT const char * nodeName () const { return "feed"; } 55 void closed (); 56 void *role (RoleType msg, void *content=NULL); 57 }; 58 59 class KMPLAYER_NO_EXPORT Entry : public Element, public PlaylistRole { 60 public: Entry(NodePtr & d)61 KDE_NO_CDTOR_EXPORT Entry (NodePtr & d) : Element (d, id_node_entry) {} 62 Node *childFromTag (const QString & tag); nodeName()63 KDE_NO_EXPORT const char * nodeName () const { return "entry"; } 64 void closed (); 65 void *role (RoleType msg, void *content=NULL); 66 }; 67 68 class KMPLAYER_NO_EXPORT Link : public Mrl { 69 public: Link(NodePtr & d)70 KDE_NO_CDTOR_EXPORT Link (NodePtr & d) : Mrl (d, id_node_link) {} nodeName()71 KDE_NO_EXPORT const char * nodeName () const { return "link"; } 72 PlayType playType (); 73 void closed (); 74 }; 75 76 class KMPLAYER_NO_EXPORT Content : public Mrl { 77 public: Content(NodePtr & d)78 KDE_NO_CDTOR_EXPORT Content (NodePtr &d) : Mrl(d, id_node_content) {} nodeName()79 KDE_NO_EXPORT const char * nodeName () const { return "content"; } 80 PlayType playType (); 81 void closed (); 82 }; 83 84 class KMPLAYER_NO_EXPORT MediaGroup : public Element { 85 public: MediaGroup(NodePtr & d)86 MediaGroup (NodePtr &d) : Element (d, id_node_media_group) {} 87 Node *childFromTag (const QString &tag); 88 void message (MessageType msg, void *content=NULL); nodeName()89 KDE_NO_EXPORT const char *nodeName () const { return "media:group"; } 90 void addSummary (Node *parent, Node *ratings, const QString& alt_title, const QString& alt_desc, 91 const QString& alt_img, int width, int height); 92 }; 93 94 class KMPLAYER_NO_EXPORT MediaContent : public Mrl { 95 public: MediaContent(NodePtr & d)96 MediaContent (NodePtr &d) : Mrl (d, id_node_media_content) {} nodeName()97 KDE_NO_EXPORT const char *nodeName () const { return "media:content"; } 98 void closed (); 99 }; 100 101 } //namespace ATOM 102 103 104 } // namespace KMPlayer 105 106 #endif //_KMPLAYER_ATOM_H_ 107