syndication/rss2
#include <document.h>
Inherits Syndication::SpecificDocument, and Syndication::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
◆ DayOfWeek
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
◆ Document() [1/3]
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.
◆ Document() [2/3]
Syndication::RSS2::Document::Document | ( | const Document & | other | ) |
copy constructor
Definition at line 77 of file document.cpp.
◆ ~Document()
|
virtual |
destructor
Definition at line 82 of file document.cpp.
◆ Document() [3/3]
|
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
◆ accept()
|
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.
◆ categories()
QList< Category > Syndication::RSS2::Document::categories | ( | ) | const |
Specifies one or more categories that the channel belongs to.
- Returns
- TODO
Definition at line 178 of file document.cpp.
◆ cloud()
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.
◆ copyright()
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.
◆ debugInfo()
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.
◆ description()
QString Syndication::RSS2::Document::description | ( | ) | const |
◆ docs()
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.
◆ fromXML()
|
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.
◆ generator()
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()
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.
◆ isValid()
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.
◆ items()
QList< Item > Syndication::RSS2::Document::items | ( | ) | const |
the items contained in this document
Definition at line 286 of file document.cpp.
◆ language()
QString Syndication::RSS2::Document::language | ( | ) | const |
- Returns
- TODO
Definition at line 113 of file document.cpp.
◆ lastBuildDate()
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.
◆ link()
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.
◆ managingEditor()
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.
◆ operator=()
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.
◆ pubDate()
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.
◆ skipDays()
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.
◆ skipHours()
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()
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.
◆ title()
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.
◆ ttl()
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.
◆ unhandledElements()
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.
◆ webMaster()
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.
Member Data Documentation
◆ d
boost::shared_ptr<DocumentPrivate> Syndication::RSS2::Document::d |
Definition at line 314 of file document.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.