article.h
00001 /* 00002 * article.h 00003 * 00004 * Copyright (c) 2001, 2002, 2003 Frerich Raabe <raabe@kde.org> 00005 * 00006 * This program is distributed in the hope that it will be useful, but WITHOUT 00007 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00008 * FOR A PARTICULAR PURPOSE. For licensing and distribution details, check the 00009 * accompanying file 'COPYING'. 00010 */ 00011 #ifndef LIBRSS_ARTICLE_H 00012 #define LIBRSS_ARTICLE_H 00013 00014 #include <tqmap.h> 00015 00016 #include "global.h" 00017 00018 class TQDateTime; 00019 class TQDomNode; 00020 template <class> class TQValueList; 00021 class TQString; 00022 class TQWidget; 00023 class KURL; 00024 class KURLLabel; 00025 00026 namespace RSS 00027 { 00028 class Category; 00029 class Enclosure; 00030 00037 class KDE_EXPORT Article 00038 { 00039 public: 00043 typedef TQValueList<Article> List; 00044 00048 Article(); 00049 00054 Article(const Article &other); 00055 00061 Article(const TQDomNode &node, Format format, Version version); 00062 00068 Article &operator=(const Article &other); 00069 00077 bool operator==(const Article &other) const; 00078 00084 bool operator!=(const Article &other) const { return !operator==(other); } 00085 00089 virtual ~Article(); 00090 00096 TQString title() const; 00097 00105 const KURL &link() const; 00106 00112 TQString description() const; 00113 00117 TQString author() const; 00118 00123 TQString guid() const; 00124 00129 bool guidIsPermaLink() const; 00130 00135 const TQDateTime &pubDate() const; 00136 00137 const KURL &commentsLink() const; 00138 int comments() const; 00139 00140 Enclosure enclosure() const; 00141 00143 TQValueList<Category> categories() const; 00144 00145 TQString meta(const TQString &key) const; 00146 00161 KURLLabel *widget(TQWidget *parent = 0, const char *name = 0) const; 00162 00163 typedef TQMap<TQString, TQString> MetaInfoMap; 00164 00165 private: 00166 struct Private; 00167 Private *d; 00168 }; 00169 } 00170 00171 #endif // LIBRSS_ARTICLE_H 00172 // vim: noet:ts=4