syndication/rss2
#include <document.h>
Inherits SpecificDocument, and ElementWrapper.
Public Types | |
enum | DayOfWeek { Monday = 0, Tuesday = 1, Wednesday = 2, Thursday = 3, Friday = 4, Saturday = 5, Sunday = 6 } |
Public Member Functions | |
Document () | |
Document (const Document &other) | |
Document (const QDomElement &element) | |
virtual | ~Document () |
virtual bool | accept (DocumentVisitor *visitor) |
QList< Category > | categories () const |
Cloud | cloud () const |
QString | copyright () const |
QString | debugInfo () const |
QString | description () const |
QString | docs () const |
QString | generator () const |
Image | image () const |
bool | isValid () const |
QList< Item > | items () const |
QString | language () const |
time_t | lastBuildDate () const |
QString | link () const |
QString | managingEditor () const |
Document & | operator= (const Document &other) |
time_t | pubDate () const |
QSet< DayOfWeek > | skipDays () const |
QSet< int > | skipHours () const |
TextInput | textInput () const |
QString | title () const |
int | ttl () const |
QList< QDomElement > | unhandledElements () const |
QString | webMaster () const |
Static Public Member Functions | |
static Document | fromXML (const QDomDocument &document) |
Public Attributes | |
boost::shared_ptr < DocumentPrivate > | d |
Detailed Description
document implementation, representing an RSS feed from the 0.91-0.94/2.0 family.
Definition at line 55 of file document.h.
Member Enumeration Documentation
days of week, used for skip days
Enumerator | |
---|---|
Monday |
self-explanatory |
Tuesday |
self-explanatory |
Wednesday |
self-explanatory |
Thursday |
self-explanatory |
Friday |
self-explanatory |
Saturday |
self-explanatory |
Sunday |
self-explanatory |
Definition at line 253 of file document.h.
Constructor & Destructor Documentation
Syndication::RSS2::Document::Document | ( | ) |
Default constructor, creates a null object, for which isNull() is true
and isValid() is false
.
Definition at line 73 of file document.cpp.
Syndication::RSS2::Document::Document | ( | const Document & | other | ) |
copy constructor
Definition at line 77 of file document.cpp.
|
virtual |
destructor
Definition at line 82 of file document.cpp.
|
explicit |
private: /**
private constructor, used by fromXML() TODO: remove fromXML(), make this one private
Definition at line 60 of file document.cpp.
Member Function Documentation
|
virtual |
Used by visitors for double dispatch.
See DocumentVisitor for more information.
- Parameters
-
visitor the visitor calling the method
Definition at line 466 of file document.cpp.
Specifies one or more categories that the channel belongs to.
- Returns
- TODO
Definition at line 178 of file document.cpp.
Cloud Syndication::RSS2::Document::cloud | ( | ) | const |
Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
- Returns
- cloud information, or a null object if not set
Definition at line 203 of file document.cpp.
QString Syndication::RSS2::Document::copyright | ( | ) | const |
Copyright notice for content in the channel.
This method returns the content of the <copyright>
element. If <copyright>
is not available, the method returns <dc:rights>
instead, if available.
- Returns
- copyright information, or a null string if not set
Definition at line 130 of file document.cpp.
QString Syndication::RSS2::Document::debugInfo | ( | ) | const |
Returns a description of the object and its children for debugging purposes.
- Returns
- debug string
Definition at line 344 of file document.cpp.
QString Syndication::RSS2::Document::description | ( | ) | const |
QString Syndication::RSS2::Document::docs | ( | ) | const |
A URL that points to the documentation for the format used in the RSS file.
It's probably a pointer to the RSS specification. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.
- Returns
- URL pointing to the format specification, or a null string if not set
Definition at line 198 of file document.cpp.
|
static |
Parses an RSS2 document from an XML document.
TODO: More on supported formats etc.
- Parameters
-
document The dom document to parse the document from
- Returns
- the document parsed from XML, or an invalid document if parsing failed.
Definition at line 66 of file document.cpp.
QString Syndication::RSS2::Document::generator | ( | ) | const |
A string indicating the program used to generate the channel.
- Returns
- description of the generator program, or a null string if not set
Definition at line 193 of file document.cpp.
Image Syndication::RSS2::Document::image | ( | ) | const |
Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
- Returns
- the image, or a null object if not set
Definition at line 218 of file document.cpp.
bool Syndication::RSS2::Document::isValid | ( | ) | const |
returns whether this document is valid or not.
Invalid documents do not contain any useful information.
Definition at line 92 of file document.cpp.
QList< Item > Syndication::RSS2::Document::items | ( | ) | const |
the items contained in this document
Definition at line 286 of file document.cpp.
QString Syndication::RSS2::Document::language | ( | ) | const |
- Returns
- TODO
Definition at line 113 of file document.cpp.
time_t Syndication::RSS2::Document::lastBuildDate | ( | ) | const |
The last time the content of the channel changed.
- Returns
- the last build date, or 0 if no date was specified or parsing failed
Definition at line 171 of file document.cpp.
QString Syndication::RSS2::Document::link | ( | ) | const |
The URL to the HTML website corresponding to the channel.
- Returns
- TODO
Definition at line 102 of file document.cpp.
QString Syndication::RSS2::Document::managingEditor | ( | ) | const |
Email address for person responsible for editorial content.
- Returns
- editor's email address, or a null string if not set
Definition at line 146 of file document.cpp.
assigns another document.
As the d pointer is shared, this is a cheap operation.
- Parameters
-
other the document to assign
Definition at line 86 of file document.cpp.
time_t Syndication::RSS2::Document::pubDate | ( | ) | const |
The publication date for the content in the channel.
For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. This method returns the content of the <pubDate>
element. If <pubDate>
is not available, the method returns <dc:date>
instead, if available.
- Returns
- the publication date, or 0 if no date was specified or parsing failed
Definition at line 156 of file document.cpp.
QSet< Document::DayOfWeek > Syndication::RSS2::Document::skipDays | ( | ) | const |
A set of week days where aggregators shouldn't read the channel.
Definition at line 258 of file document.cpp.
QSet< int > Syndication::RSS2::Document::skipHours | ( | ) | const |
Contains a set of hours (from 0 to 23), time in GMT, when the channel is not updated.
Definition at line 234 of file document.cpp.
TextInput Syndication::RSS2::Document::textInput | ( | ) | const |
Specifies a text input box that can be displayed with the channel.
- Returns
- the text input, or a null object if not set
Definition at line 223 of file document.cpp.
QString Syndication::RSS2::Document::title | ( | ) | const |
The title of the channel.
- Returns
- title TODO: more on escaping/HTML
Definition at line 97 of file document.cpp.
int Syndication::RSS2::Document::ttl | ( | ) | const |
ttl stands for time to live.
It's a number of minutes that indicates how long a channel can be cached before refreshing from the source.
- Returns
- the "time to live" in minutes, or 0 if not set
Definition at line 208 of file document.cpp.
QList< QDomElement > Syndication::RSS2::Document::unhandledElements | ( | ) | const |
returns all child elements of this document not covered by this class.
You can use this to access additional metadata from RSS extensions.
Definition at line 301 of file document.cpp.
QString Syndication::RSS2::Document::webMaster | ( | ) | const |
Email address for person responsible for technical issues relating to channel.
- Returns
- web master's email address, or a null string if not
Definition at line 151 of file document.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.