File indexing completed on 2024-04-14 15:00:56
0001 /* This file is part of the KDE project 0002 * 0003 * Copyright (C) 2005-2006 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_ATOM_H_ 0022 #define _KMPLAYER_ATOM_H_ 0023 0024 #include <qstringlist.h> 0025 0026 #include "kmplayerplaylist.h" 0027 0028 namespace KMPlayer { 0029 0030 namespace ATOM { 0031 0032 const short id_node_feed = 300; 0033 const short id_node_entry = 301; 0034 const short id_node_link = 302; 0035 const short id_node_title = 303; 0036 const short id_node_summary = 304; 0037 const short id_node_content = 305; 0038 const short id_node_media_group = 306; 0039 const short id_node_media_content = 307; 0040 const short id_node_media_title = 308; 0041 const short id_node_media_description = 309; 0042 const short id_node_media_player = 310; 0043 const short id_node_media_thumbnail = 311; 0044 const short id_node_gd_rating = 312; 0045 const short id_node_ignored = 313; 0046 0047 /** 0048 * '<feed>' tag 0049 */ 0050 class KMPLAYER_NO_EXPORT Feed : public Element, public PlaylistRole { 0051 public: 0052 KDE_NO_CDTOR_EXPORT Feed (NodePtr & d) : Element (d, id_node_feed) {} 0053 Node *childFromTag (const QString & tag); 0054 KDE_NO_EXPORT const char * nodeName () const { return "feed"; } 0055 void closed (); 0056 void *role (RoleType msg, void *content=NULL); 0057 }; 0058 0059 class KMPLAYER_NO_EXPORT Entry : public Element, public PlaylistRole { 0060 public: 0061 KDE_NO_CDTOR_EXPORT Entry (NodePtr & d) : Element (d, id_node_entry) {} 0062 Node *childFromTag (const QString & tag); 0063 KDE_NO_EXPORT const char * nodeName () const { return "entry"; } 0064 void closed (); 0065 void *role (RoleType msg, void *content=NULL); 0066 }; 0067 0068 class KMPLAYER_NO_EXPORT Link : public Mrl { 0069 public: 0070 KDE_NO_CDTOR_EXPORT Link (NodePtr & d) : Mrl (d, id_node_link) {} 0071 KDE_NO_EXPORT const char * nodeName () const { return "link"; } 0072 PlayType playType (); 0073 void closed (); 0074 }; 0075 0076 class KMPLAYER_NO_EXPORT Content : public Mrl { 0077 public: 0078 KDE_NO_CDTOR_EXPORT Content (NodePtr &d) : Mrl(d, id_node_content) {} 0079 KDE_NO_EXPORT const char * nodeName () const { return "content"; } 0080 PlayType playType (); 0081 void closed (); 0082 }; 0083 0084 class KMPLAYER_NO_EXPORT MediaGroup : public Element { 0085 public: 0086 MediaGroup (NodePtr &d) : Element (d, id_node_media_group) {} 0087 Node *childFromTag (const QString &tag); 0088 void message (MessageType msg, void *content=NULL); 0089 KDE_NO_EXPORT const char *nodeName () const { return "media:group"; } 0090 void addSummary (Node *parent, Node *ratings, const QString& alt_title, const QString& alt_desc, 0091 const QString& alt_img, int width, int height); 0092 }; 0093 0094 class KMPLAYER_NO_EXPORT MediaContent : public Mrl { 0095 public: 0096 MediaContent (NodePtr &d) : Mrl (d, id_node_media_content) {} 0097 KDE_NO_EXPORT const char *nodeName () const { return "media:content"; } 0098 void closed (); 0099 }; 0100 0101 } //namespace ATOM 0102 0103 0104 } // namespace KMPlayer 0105 0106 #endif //_KMPLAYER_ATOM_H_