00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SYNDICATION_RSS2_ITEM_H
00024 #define SYNDICATION_RSS2_ITEM_H
00025
00026 #include <syndication/rss2/document.h>
00027 #include <syndication/elementwrapper.h>
00028 #include <boost/shared_ptr.hpp>
00029 #include <syndication/specificitem.h>
00030
00031 #include <ctime>
00032
00033 class QDomElement;
00034 class QString;
00035 template <class T> class QList;
00036
00037 namespace Syndication {
00038
00039 class SpecificItemVisitor;
00040
00041 namespace RSS2 {
00042
00043 class Category;
00044 class Enclosure;
00045 class Source;
00046
00052 class SYNDICATION_EXPORT Item : public ElementWrapper, public Syndication::SpecificItem
00053 {
00054 public:
00055
00060 explicit Item(boost::shared_ptr<Document> doc=boost::shared_ptr<Document>());
00061
00068 explicit Item(const QDomElement& element, boost::shared_ptr<Document> doc=boost::shared_ptr<Document>());
00069
00076 Item(const Item& other);
00077
00081 ~Item();
00082
00089 Item& operator=(const Item& other);
00090
00091
00097 bool accept(SpecificItemVisitor* visitor);
00098
00106 QString title() const;
00107
00114 QString link() const;
00115
00125 QString description() const;
00126
00137 QString content() const;
00138
00144 QList<Category> categories() const;
00145
00151 QString comments() const;
00152
00166 QString author() const;
00167
00176 QList<Enclosure> enclosures() const;
00177
00189 QString guid() const;
00190
00199 bool guidIsPermaLink() const;
00200
00211 time_t pubDate() const;
00212
00221 time_t expirationDate() const;
00222
00230 QString rating() const;
00231
00239 Source source() const;
00240
00245 QList<QDomElement> unhandledElements() const;
00246
00247
00254 QString debugInfo() const;
00255
00256
00262 QString originalDescription() const;
00263
00269 QString originalTitle() const;
00270
00271
00272 private:
00273
00274 class ItemPrivate;
00275 boost::shared_ptr<ItemPrivate> d;
00276 };
00277
00278 }
00279 }
00280
00281 #endif // SYNDICATION_RSS2_ITEM_H