Syndication

atom/document.h
1 /*
2  This file is part of the syndication library
3  SPDX-FileCopyrightText: 2006 Frank Osterfeld <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef SYNDICATION_ATOM_DOCUMENT_H
9 #define SYNDICATION_ATOM_DOCUMENT_H
10 
11 #include <syndication/specificdocument.h>
12 #include <syndication/elementwrapper.h>
13 
14 #include <ctime>
15 
16 template <class T> class QList;
17 
18 namespace Syndication
19 {
20 
21 class DocumentVisitor;
22 
23 namespace Atom
24 {
25 
26 class Category;
27 class Entry;
28 class EntryDocument;
29 class FeedDocument;
30 class Generator;
31 class Link;
32 class Person;
33 //@cond PRIVATE
34 typedef QSharedPointer<EntryDocument> EntryDocumentPtr;
35 typedef QSharedPointer<FeedDocument> FeedDocumentPtr;
36 //@endcond
37 
44 class SYNDICATION_EXPORT FeedDocument : public Syndication::SpecificDocument, public ElementWrapper
45 {
46 public:
47 
53  FeedDocument();
54 
61  explicit FeedDocument(const QDomElement &element);
62 
68  bool accept(DocumentVisitor *visitor) override;
69 
75  Q_REQUIRED_RESULT QList<Person> authors() const;
76 
80  Q_REQUIRED_RESULT QList<Person> contributors() const;
81 
85  Q_REQUIRED_RESULT QList<Category> categories() const;
86 
92  Q_REQUIRED_RESULT QString icon() const;
93 
99  Q_REQUIRED_RESULT QString logo() const;
100 
108  Q_REQUIRED_RESULT QString id() const;
109 
116  Q_REQUIRED_RESULT QString rights() const;
117 
123  Q_REQUIRED_RESULT QString title() const;
124 
131  Q_REQUIRED_RESULT QString subtitle() const;
132 
140  Q_REQUIRED_RESULT Generator generator() const;
141 
147  Q_REQUIRED_RESULT time_t updated() const;
148 
153  Q_REQUIRED_RESULT QList<Link> links() const;
154 
158  Q_REQUIRED_RESULT QList<Entry> entries() const;
159 
164  Q_REQUIRED_RESULT QList<QDomElement> unhandledElements() const;
165 
172  Q_REQUIRED_RESULT QString debugInfo() const override;
173 
179  Q_REQUIRED_RESULT bool isValid() const override;
180 };
181 
189 {
190 public:
191 
196  EntryDocument();
197 
204  explicit EntryDocument(const QDomElement &element);
205 
211  bool accept(DocumentVisitor *visitor) override;
212 
218  Q_REQUIRED_RESULT Entry entry() const;
219 
226  Q_REQUIRED_RESULT QString debugInfo() const override;
227 
233  Q_REQUIRED_RESULT bool isValid() const override;
234 };
235 
236 } // namespace Atom
237 } // namespace Syndication
238 
239 #endif // SYNDICATION_ATOM_DOCUMENT_H
Description of the agent used to generate the feed.
Definition: generator.h:26
A wrapper for XML elements.
An Atom 1.0 Feed Document, containing metadata describing the feed and a number of entries...
Definition: atom/document.h:44
an Atom entry, equivalent to the "items" in the RSS world.
Definition: entry.h:40
Visitor interface, following the Visitor design pattern.
Document interface for format-specific feed documents as parsed from a document source (see DocumentS...
An Atom 1.0 Entry Document, containing a single Atom entry outside of the context of a feed...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 3 2020 23:01:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.