• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

syndication/rss2

  • syndication
  • rss2
document.h
1/*
2 * This file is part of the syndication library
3 *
4 * Copyright (C) 2005 Frank Osterfeld <osterfeld@kde.org>
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_RSS2_DOCUMENT_H
24#define SYNDICATION_RSS2_DOCUMENT_H
25
26#include <syndication/specificdocument.h>
27#include <syndication/elementwrapper.h>
28
29#include <ctime>
30
31class QDomDocument;
32class QDomElement;
33class QString;
34
35template <class T> class QList;
36template <class T> class QSet;
37
38namespace Syndication {
39namespace RSS2 {
40
41class Category;
42class Cloud;
43class Document;
44class Image;
45class Item;
46class TextInput;
47typedef boost::shared_ptr<Document> DocumentPtr;
48
55class SYNDICATION_EXPORT Document : public Syndication::SpecificDocument,
56 public Syndication::ElementWrapper
57{
58 public:
59
68 static Document fromXML(const QDomDocument& document);
69
74 Document();
75
79 Document(const Document& other);
80
84 virtual ~Document();
85
92 Document& operator=(const Document& other);
93
99 virtual bool accept(DocumentVisitor* visitor);
100
106 bool isValid() const;
107
113 QString title() const;
114
120 QString link() const;
121
127 QString description() const;
128
132 QList<Item> items() const;
133
138 QString language() const;
139
149 QString copyright() const;
150
156 QString managingEditor() const;
157
164 QString webMaster() const;
165
178 time_t pubDate() const;
179
186 time_t lastBuildDate() const;
187
193 QList<Category> categories() const;
194
201 QString generator() const;
202
212 QString docs() const;
213
221 Cloud cloud() const;
222
229 int ttl() const;
230
237 Image image() const;
238
244 TextInput textInput() const;
245
250 QSet<int> skipHours() const;
251
253 enum DayOfWeek
254 {
255
256 Monday = 0,
257 Tuesday = 1,
258 Wednesday = 2,
259 Thursday = 3,
260 Friday = 4,
261 Saturday = 5,
262 Sunday = 6
263 };
264
269 QSet<DayOfWeek> skipDays() const;
270
275 QList<QDomElement> unhandledElements() const;
276
283 QString debugInfo() const;
284
285 //@cond PRIVATE
293 void getItemTitleFormatInfo(bool* isCDATA, bool* containsMarkup) const;
294
302 void getItemDescriptionFormatInfo(bool* isCDATA, bool* containsMarkup) const;
303 //@endcond
304
305 private:
311 explicit Document(const QDomElement& element);
312
313 class DocumentPrivate;
314 boost::shared_ptr<DocumentPrivate> d;
315
316};
317
318} // namespace RSS2
319} // namespace Syndication
320
321#endif // SYNDICATION_RSS2_DOCUMENT_H
Syndication::RSS2::Category
A category which can be assigned to items or whole feeds.
Definition category.h:42
Syndication::RSS2::Cloud
Cloud information for an RSS channel.
Definition cloud.h:60
Syndication::RSS2::Document
document implementation, representing an RSS feed from the 0.91-0.94/2.0 family.
Definition document.h:57
Syndication::RSS2::Document::DayOfWeek
DayOfWeek
days of week, used for skip days
Definition document.h:254
Syndication::RSS2::Document::Thursday
@ Thursday
self-explanatory
Definition document.h:259
Syndication::RSS2::Document::Monday
@ Monday
self-explanatory
Definition document.h:256
Syndication::RSS2::Document::Saturday
@ Saturday
self-explanatory
Definition document.h:261
Syndication::RSS2::Document::Sunday
@ Sunday
self-explanatory
Definition document.h:262
Syndication::RSS2::Document::Friday
@ Friday
self-explanatory
Definition document.h:260
Syndication::RSS2::Document::Wednesday
@ Wednesday
self-explanatory
Definition document.h:258
Syndication::RSS2::Document::Tuesday
@ Tuesday
self-explanatory
Definition document.h:257
Syndication::RSS2::Document::Document
Document()
Default constructor, creates a null object, for which isNull() is true and isValid() is false.
Definition document.cpp:73
Syndication::RSS2::Document::copyright
QString copyright() const
Copyright notice for content in the channel.
Definition document.cpp:130
Syndication::RSS2::Document::title
QString title() const
The title of the channel.
Definition document.cpp:97
Syndication::RSS2::Document::cloud
Cloud cloud() const
Allows processes to register with a cloud to be notified of updates to the channel,...
Definition document.cpp:203
Syndication::RSS2::Document::image
Image image() const
Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
Definition document.cpp:218
Syndication::RSS2::Document::ttl
int ttl() const
ttl stands for time to live.
Definition document.cpp:208
Syndication::RSS2::Document::operator=
Document & operator=(const Document &other)
assigns another document.
Definition document.cpp:86
Syndication::RSS2::Document::link
QString link() const
The URL to the HTML website corresponding to the channel.
Definition document.cpp:102
Syndication::RSS2::Document::pubDate
time_t pubDate() const
The publication date for the content in the channel.
Definition document.cpp:156
Syndication::RSS2::Document::isValid
bool isValid() const
returns whether this document is valid or not.
Definition document.cpp:92
Syndication::RSS2::Document::description
QString description() const
Phrase or sentence describing the channel.
Definition document.cpp:107
Syndication::RSS2::Document::managingEditor
QString managingEditor() const
Email address for person responsible for editorial content.
Definition document.cpp:146
Syndication::RSS2::Document::lastBuildDate
time_t lastBuildDate() const
The last time the content of the channel changed.
Definition document.cpp:171
Syndication::RSS2::Document::docs
QString docs() const
A URL that points to the documentation for the format used in the RSS file.
Definition document.cpp:198
Syndication::RSS2::Document::language
QString language() const
Definition document.cpp:113
Syndication::RSS2::Document::textInput
TextInput textInput() const
Specifies a text input box that can be displayed with the channel.
Definition document.cpp:223
Syndication::RSS2::Document::webMaster
QString webMaster() const
Email address for person responsible for technical issues relating to channel.
Definition document.cpp:151
Syndication::RSS2::Document::accept
virtual bool accept(DocumentVisitor *visitor)
Used by visitors for double dispatch.
Definition document.cpp:466
Syndication::RSS2::Document::categories
QList< Category > categories() const
Specifies one or more categories that the channel belongs to.
Definition document.cpp:178
Syndication::RSS2::Document::fromXML
static Document fromXML(const QDomDocument &document)
Parses an RSS2 document from an XML document.
Definition document.cpp:66
Syndication::RSS2::Document::skipHours
QSet< int > skipHours() const
Contains a set of hours (from 0 to 23), time in GMT, when the channel is not updated.
Definition document.cpp:234
Syndication::RSS2::Document::items
QList< Item > items() const
the items contained in this document
Definition document.cpp:286
Syndication::RSS2::Document::generator
QString generator() const
A string indicating the program used to generate the channel.
Definition document.cpp:193
Syndication::RSS2::Image
An RSS2 image, used to describe feed logos.
Definition image.h:38
Syndication::RSS2::TextInput
"The purpose of the <textInput> element is something of a mystery.
Definition textinput.h:41
Syndication::RSS2
A parser and model classes for RSS 0.91 (Userland and Netscape flavor), 0.92, 0.93,...
Definition category.cpp:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

syndication/rss2

Skip menu "syndication/rss2"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal