Syndication

atom/document.h
1 /*
2  * This file is part of the syndication library
3  *
4  * Copyright (C) 2006 Frank Osterfeld <[email protected]>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef SYNDICATION_ATOM_DOCUMENT_H
24 #define SYNDICATION_ATOM_DOCUMENT_H
25 
26 #include <syndication/specificdocument.h>
27 #include <syndication/elementwrapper.h>
28 
29 #include <ctime>
30 
31 template <class T> class QList;
32 
33 namespace Syndication
34 {
35 
36 class DocumentVisitor;
37 
38 namespace Atom
39 {
40 
41 class Category;
42 class Entry;
43 class EntryDocument;
44 class FeedDocument;
45 class Generator;
46 class Link;
47 class Person;
48 //@cond PRIVATE
49 typedef QSharedPointer<EntryDocument> EntryDocumentPtr;
50 typedef QSharedPointer<FeedDocument> FeedDocumentPtr;
51 //@endcond
52 
59 class SYNDICATION_EXPORT FeedDocument : public Syndication::SpecificDocument, public ElementWrapper
60 {
61 public:
62 
68  FeedDocument();
69 
76  explicit FeedDocument(const QDomElement &element);
77 
83  bool accept(DocumentVisitor *visitor) override;
84 
90  Q_REQUIRED_RESULT QList<Person> authors() const;
91 
95  Q_REQUIRED_RESULT QList<Person> contributors() const;
96 
100  Q_REQUIRED_RESULT QList<Category> categories() const;
101 
107  Q_REQUIRED_RESULT QString icon() const;
108 
114  Q_REQUIRED_RESULT QString logo() const;
115 
123  Q_REQUIRED_RESULT QString id() const;
124 
131  Q_REQUIRED_RESULT QString rights() const;
132 
138  Q_REQUIRED_RESULT QString title() const;
139 
146  Q_REQUIRED_RESULT QString subtitle() const;
147 
155  Q_REQUIRED_RESULT Generator generator() const;
156 
162  Q_REQUIRED_RESULT time_t updated() const;
163 
168  Q_REQUIRED_RESULT QList<Link> links() const;
169 
173  Q_REQUIRED_RESULT QList<Entry> entries() const;
174 
179  Q_REQUIRED_RESULT QList<QDomElement> unhandledElements() const;
180 
187  Q_REQUIRED_RESULT QString debugInfo() const override;
188 
194  Q_REQUIRED_RESULT bool isValid() const override;
195 };
196 
204 {
205 public:
206 
211  EntryDocument();
212 
219  explicit EntryDocument(const QDomElement &element);
220 
226  bool accept(DocumentVisitor *visitor) override;
227 
233  Q_REQUIRED_RESULT Entry entry() const;
234 
241  Q_REQUIRED_RESULT QString debugInfo() const override;
242 
248  Q_REQUIRED_RESULT bool isValid() const override;
249 };
250 
251 } // namespace Atom
252 } // namespace Syndication
253 
254 #endif // SYNDICATION_ATOM_DOCUMENT_H
Description of the agent used to generate the feed.
Definition: generator.h:41
A wrapper for XML elements.
Generator
An Atom 1.0 Feed Document, containing metadata describing the feed and a number of entries...
Definition: atom/document.h:59
an Atom entry, equivalent to the "items" in the RSS world.
Definition: entry.h:55
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 Tue May 26 2020 23:09:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.