syndication/atom
25 #include "constants.h"
26 #include "generator.h"
29 #include "atomtools.h"
33 #include <QtXml/QDomElement>
34 #include <QtCore/QList>
35 #include <QtCore/QString>
37 namespace Syndication {
50 QList<QDomElement> a =
52 QLatin1String(
"author"));
55 QList<QDomElement>::ConstIterator it = a.constBegin();
56 QList<QDomElement>::ConstIterator end = a.constEnd();
59 for ( ; it != end; ++it)
69 QList<QDomElement> a =
71 QLatin1String(
"contributor"));
74 QList<QDomElement>::ConstIterator it = a.constBegin();
75 QList<QDomElement>::ConstIterator end = a.constEnd();
78 for ( ; it != end; ++it)
88 QList<QDomElement> a =
90 QLatin1String(
"category"));
93 QList<QDomElement>::ConstIterator it = a.constBegin();
94 QList<QDomElement>::ConstIterator end = a.constEnd();
97 for ( ; it != end; ++it)
108 QLatin1String(
"generator")));
114 QLatin1String(
"icon"));
120 QLatin1String(
"id"));
125 QList<QDomElement> a =
127 QLatin1String(
"link"));
130 QList<QDomElement>::ConstIterator it = a.constBegin();
131 QList<QDomElement>::ConstIterator end = a.constEnd();
134 for ( ; it != end; ++it)
136 list.append(
Link(*it));
145 QLatin1String(
"logo"));
166 QLatin1String(
"updated"));
167 return parseDate(upd, ISODate);
173 info += QLatin1String(
"### Source: ###################\n");
174 if (!
title().isEmpty())
175 info += QLatin1String(
"title: #") +
title() + QLatin1String(
"#\n");
177 info += QLatin1String(
"subtitle: #") +
subtitle() + QLatin1String(
"#\n");
179 info += QLatin1String(
"id: #") +
id() + QLatin1String(
"#\n");
182 info += QLatin1String(
"rights: #") +
rights() + QLatin1String(
"#\n");
183 if (!
icon().isEmpty())
184 info += QLatin1String(
"icon: #") +
icon() + QLatin1String(
"#\n");
185 if (!
logo().isEmpty())
186 info += QLatin1String(
"logo: #") +
logo() + QLatin1String(
"#\n");
191 QString dupdated = dateTimeToString(
updated());
192 if (!dupdated.isNull())
193 info += QLatin1String(
"updated: #") + dupdated + QLatin1String(
"#\n");
195 QList<Link> dlinks =
links();
196 QList<Link>::ConstIterator endlinks = dlinks.constEnd();
197 for (QList<Link>::ConstIterator it = dlinks.constBegin(); it != endlinks; ++it)
198 info += (*it).debugInfo();
201 QList<Category>::ConstIterator endcats = dcats.constEnd();
202 for (QList<Category>::ConstIterator it = dcats.constBegin(); it != endcats; ++it)
203 info += (*it).debugInfo();
205 info += QLatin1String(
"### Authors: ###################\n");
207 QList<Person> dauthors =
authors();
208 QList<Person>::ConstIterator endauthors = dauthors.constEnd();
209 for (QList<Person>::ConstIterator it = dauthors.constBegin(); it != endauthors; ++it)
210 info += (*it).debugInfo();
212 info += QLatin1String(
"### Contributors: ###################\n");
215 QList<Person>::ConstIterator endcontri = dcontri.constEnd();
216 for (QList<Person>::ConstIterator it = dcontri.constBegin(); it != endcontri; ++it)
217 info += (*it).debugInfo();
219 info += QLatin1String(
"### Source end ################\n");
QList< Person > contributors() const
contributors to the original content (optional)
QString subtitle() const
description or subtitle of the source feed (optional).
QList< Link > links() const
a list of links.
QList< Category > categories() const
categories the source feed is assigned to (optional)
A category for categorizing items or whole feeds.
QString atom1Namespace()
namespace used by Atom 1.0 elements
QString debugInfo() const
a description of this generator for debugging purposes.
Description of the agent used to generate the feed.
QList< Person > authors() const
authors of the original content (optional)
QString extractAtomText(const Syndication::ElementWrapper &parent, const QString &tagname)
extracts the content of an atomTextConstruct.
QString title() const
source feed title (optional).
QString rights() const
copyright information (optional)
QString icon() const
URL of an image serving as a feed icon (optional)
QString id() const
a string that unambigously identifies the source feed (optional)
Generator generator() const
description of the software which generated the source feed (optional)
Source()
creates a null source object
QString logo() const
URL of an image, the logo of the source feed (optional)
A link, pointing to webpages, media files on the web ("podcast"), related content,...
time_t updated() const
The datetime of the last modification of the source feed content.
describes a person, with name and optional URI and e-mail address.
QString debugInfo() const
description of this source object for debugging purposes
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jan 29 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.