Syndication

rss2/source.h
1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2005 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef SYNDICATION_RSS2_SOURCE_H
9#define SYNDICATION_RSS2_SOURCE_H
10
11#include <syndication/elementwrapper.h>
12
13class QDomElement;
14class QString;
15
16namespace Syndication
17{
18namespace RSS2
19{
20/**
21 * Class representing the @c &lt;source&gt; element in RSS2.
22 * "The purpose of this element is to propagate credit for links, to publicize
23 * the sources of news items. It's used in the post command in the Radio
24 * UserLand aggregator. It should be generated automatically when forwarding an
25 * item from an aggregator to a weblog authoring tool."
26 *
27 * @author Frank Osterfeld
28 */
29class Source : public ElementWrapper
30{
31public:
32 /**
33 * Default constructor, creates a null object, for which isNull() is
34 * @c true.
35 */
36 Source();
37
38 /**
39 * Creates a source object wrapping a @c &lt;source&gt; XML element.
40 *
41 * @param element The @c &lt;source&gt; element to wrap
42 */
43 explicit Source(const QDomElement &element);
44
45 /**
46 * The name of the RSS channel that the item came from, derived from
47 * its &lt;title>. Example: "Tomalak's Realm"
48 *
49 * @return A string containing the source, or a null string if not set
50 * (and for null objects)
51 */
52 QString source() const;
53
54 /**
55 * Required attribute, links to the XMLization of the source.
56 *
57 * @return A URL, or a null string if not set (though required from
58 * the spec), and for null objects
59 */
60 QString url() const;
61
62 /**
63 * Returns a description of the object for debugging purposes.
64 *
65 * @return debug string
66 */
67 QString debugInfo() const;
68};
69
70} // namespace RSS2
71} // namespace Syndication
72
73#endif // SYNDICATION_RSS2_SOURCE_H
Class representing the <source> element in RSS2.
Definition rss2/source.h:30
Source()
Default constructor, creates a null object, for which isNull() is true.
QString source() const
The name of the RSS channel that the item came from, derived from its <title>.
QString debugInfo() const
Returns a description of the object for debugging purposes.
QString url() const
Required attribute, links to the XMLization of the source.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:15 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.