Syndication

atom/source.h
1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef SYNDICATION_ATOM_SOURCE_H
9#define SYNDICATION_ATOM_SOURCE_H
10
11#include <syndication/elementwrapper.h>
12
13#include <ctime>
14
15class QDomElement;
16class QString;
17
18template<class T>
19class QList;
20
21namespace Syndication
22{
23namespace Atom
24{
25class Category;
26class Generator;
27class Link;
28class Person;
29
30/**
31 * If an entry was copied from another feed, this class contains
32 * a description of the source feed.
33 *
34 * @author Frank Osterfeld
35 */
36class SYNDICATION_EXPORT Source : public ElementWrapper
37{
38public:
39 /**
40 * creates a null source object
41 */
42 Source();
43
44 /**
45 * creates a Source object wrapping a atom:source element.
46 *
47 * @param element a DOM element, should be a atom:source element
48 * (although not enforced), otherwise this object will not parse
49 * anything useful
50 */
51 explicit Source(const QDomElement &element);
52
53 /**
54 * authors of the original content (optional)
55 */
56 Q_REQUIRED_RESULT QList<Person> authors() const;
57
58 /**
59 * contributors to the original content (optional)
60 */
61 Q_REQUIRED_RESULT QList<Person> contributors() const;
62
63 /**
64 * categories the source feed is assigned to (optional)
65 */
66 Q_REQUIRED_RESULT QList<Category> categories() const;
67
68 /**
69 * description of the software which generated the source feed
70 * (optional)
71 */
72 Q_REQUIRED_RESULT Generator generator() const;
73
74 /**
75 * URL of an image serving as a feed icon (optional)
76 *
77 * @return icon URL, or a null string if not specified
78 */
79 Q_REQUIRED_RESULT QString icon() const;
80
81 /**
82 * a string that unambiguously identifies the source feed (optional)
83 *
84 * @return the ID of the source feed, or a null string if not
85 * specified.
86 */
87 Q_REQUIRED_RESULT QString id() const;
88
89 /**
90 * a list of links. See Link for more information on
91 * link types.
92 */
93 Q_REQUIRED_RESULT QList<Link> links() const;
94
95 /**
96 * URL of an image, the logo of the source feed (optional)
97 *
98 * @return image URL, or a null string if not specified in the feed.
99 */
100 Q_REQUIRED_RESULT QString logo() const;
101
102 /**
103 * copyright information (optional)
104 *
105 * @return copyright information for the source,
106 * or a null string if not specified
107 */
108 Q_REQUIRED_RESULT QString rights() const;
109
110 /**
111 * description or subtitle of the source feed (optional).
112 *
113 * @return subtitle string as HTML, or a null string
114 * if not specified.
115 */
116 Q_REQUIRED_RESULT QString subtitle() const;
117
118 /**
119 * source feed title (optional).
120 *
121 * @return title string as HTML, or a null string if not specified
122 */
123 Q_REQUIRED_RESULT QString title() const;
124
125 /**
126 * The datetime of the last modification of the source feed
127 * content. (optional)
128 *
129 * @return the modification date in seconds since epoch
130 */
131 Q_REQUIRED_RESULT time_t updated() const;
132
133 /**
134 * description of this source object for debugging purposes
135 *
136 * @return debug string
137 */
138 Q_REQUIRED_RESULT QString debugInfo() const;
139};
140
141} // namespace Atom
142} // namespace Syndication
143
144#endif // SYNDICATION_ATOM_SOURCE_H
Description of the agent used to generate the feed.
Definition generator.h:26
If an entry was copied from another feed, this class contains a description of the source feed.
Definition atom/source.h:37
A wrapper for XML elements.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.