33#include <QtXml/QDomElement>
34#include <QtCore/QList>
35#include <QtCore/QString>
37namespace 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");
A category for categorizing items or whole feeds.
Description of the agent used to generate the feed.
QString debugInfo() const
a description of this generator for debugging purposes.
A link, pointing to webpages, media files on the web ("podcast"), related content,...
describes a person, with name and optional URI and e-mail address.
time_t updated() const
The datetime of the last modification of the source feed content.
QList< Person > contributors() const
contributors to the original content (optional)
QString id() const
a string that unambigously identifies the source feed (optional)
QString title() const
source feed title (optional).
QList< Person > authors() const
authors of the original content (optional)
QString debugInfo() const
description of this source object for debugging purposes
QString subtitle() const
description or subtitle of the source feed (optional).
QString rights() const
copyright information (optional)
QString icon() const
URL of an image serving as a feed icon (optional)
Source()
creates a null source object
Generator generator() const
description of the software which generated the source feed (optional)
QString logo() const
URL of an image, the logo of the source feed (optional)
QList< Category > categories() const
categories the source feed is assigned to (optional)
QList< Link > links() const
a list of links.
QString atom1Namespace()
namespace used by Atom 1.0 elements
QString extractAtomText(const Syndication::ElementWrapper &parent, const QString &tagname)
extracts the content of an atomTextConstruct.