akregator/src/librss

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 <qmap.h>
00015 
00016 #include "global.h"
00017 
00018 class QDateTime;
00019 class QDomNode;
00020 template <class> class QValueList;
00021 class QString;
00022 class QWidget;
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 QValueList<Article> List;
00044 
00048          Article();
00049 
00054          Article(const Article &other);
00055 
00061          Article(const QDomNode &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          QString title() const;
00097 
00105          const KURL &link() const;
00106 
00112          QString description() const;
00113 
00117          QString author() const;
00118          
00123          QString guid() const;
00124 
00129          bool guidIsPermaLink() const;
00130 
00135          const QDateTime &pubDate() const;
00136          
00137          const KURL &commentsLink() const;
00138          int comments() const;
00139 
00140          Enclosure enclosure() const;
00141 
00143          QValueList<Category> categories() const;
00144 
00145          QString meta(const QString &key) const;
00146          
00161          KURLLabel *widget(QWidget *parent = 0, const char *name = 0) const;
00162          
00163          typedef QMap<QString, QString> MetaInfoMap;
00164          
00165       private:
00166          struct Private;
00167          Private *d;
00168    };
00169 }
00170 
00171 #endif // LIBRSS_ARTICLE_H
00172 // vim: noet:ts=4
KDE Home | KDE Accessibility Home | Description of Access Keys