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_ATOM_DOCUMENT_H
00024 #define SYNDICATION_ATOM_DOCUMENT_H
00025
00026 #include <syndication/specificdocument.h>
00027 #include <syndication/elementwrapper.h>
00028
00029 #include <ctime>
00030
00031 template <class T> class QList;
00032
00033 namespace Syndication {
00034
00035 class DocumentVisitor;
00036
00037 namespace Atom {
00038
00039 class Category;
00040 class Entry;
00041 class EntryDocument;
00042 class FeedDocument;
00043 class Generator;
00044 class Link;
00045 class Person;
00046
00047 typedef boost::shared_ptr<EntryDocument> EntryDocumentPtr;
00048 typedef boost::shared_ptr<FeedDocument> FeedDocumentPtr;
00049
00050
00057 class SYNDICATION_EXPORT FeedDocument : public Syndication::SpecificDocument, public ElementWrapper
00058 {
00059 public:
00060
00066 FeedDocument();
00067
00074 explicit FeedDocument(const QDomElement& element);
00075
00081 bool accept(DocumentVisitor* visitor);
00082
00088 QList<Person> authors() const;
00089
00093 QList<Person> contributors() const;
00094
00098 QList<Category> categories() const;
00099
00105 QString icon() const;
00106
00112 QString logo() const;
00113
00121 QString id() const;
00122
00129 QString rights() const;
00130
00136 QString title() const;
00137
00144 QString subtitle() const;
00145
00153 Generator generator() const;
00154
00160 time_t updated() const;
00161
00166 QList<Link> links() const;
00167
00171 QList<Entry> entries() const;
00172
00173
00178 QList<QDomElement> unhandledElements() const;
00179
00186 QString debugInfo() const;
00187
00193 bool isValid() const;
00194 };
00195
00202 class SYNDICATION_EXPORT EntryDocument : public Syndication::SpecificDocument, public Syndication::ElementWrapper
00203 {
00204 public:
00205
00210 EntryDocument();
00211
00218 explicit EntryDocument(const QDomElement& element);
00219
00225 bool accept(DocumentVisitor* visitor);
00226
00232 Entry entry() const;
00233
00240 QString debugInfo() const;
00241
00247 bool isValid() const;
00248 };
00249
00250 }
00251 }
00252
00253 #endif // SYNDICATION_ATOM_DOCUMENT_H