akregator/src/librss

RSS::Document Class Reference

#include <document.h>

Public Member Functions

 Document ()
 
 Document (const Document &other)
 
 Document (const TQDomDocument &doc)
 
Documentoperator= (const Document &other)
 
 ~Document ()
 
bool isValid () const
 
Version version () const
 
TQString verbVersion () const
 
TQString title () const
 
TQString description () const
 
const KURL & link () const
 
Imageimage ()
 
const Imageimage () const
 
TextInputtextInput ()
 
const TextInputtextInput () const
 
const Article::Listarticles () const
 
Language language () const
 
TQString copyright () const
 
const TQDateTime & pubDate () const
 
const TQDateTime & lastBuildDate () const
 
TQString rating () const
 
const KURL & docs () const
 
TQString managingEditor () const
 
TQString webMaster () const
 
const HourList & skipHours () const
 
const DayList & skipDays () const
 
int ttl () const
 

Detailed Description

Represents a RSS document and provides all the features and properties as stored in it.

You usually don't need to instantiate this one yourself but rather use Loader::loadFrom() to produce a Document object.

See also
Loader::loadForm()

Definition at line 31 of file document.h.

Constructor & Destructor Documentation

◆ Document() [1/3]

Document::Document ( )

Default constructor.

Definition at line 66 of file document.cpp.

◆ Document() [2/3]

Document::Document ( const Document other)

Copy constructor.

Parameters
otherThe Document object to copy.

Definition at line 70 of file document.cpp.

◆ Document() [3/3]

Document::Document ( const TQDomDocument &  doc)

Constructs a Document from a piece of XML markup.

Definition at line 94 of file document.cpp.

◆ ~Document()

Document::~Document ( )

Destructor.

Definition at line 513 of file document.cpp.

Member Function Documentation

◆ articles()

const Article::List & Document::articles ( ) const

RSS 0.90 and upwards.

Returns
A list of Article objects as stored in the RSS document, or a null pointer if there were no articles available. Every RSS DTD requires that there is at least one article defined, so a null pointer indicates an invalid RSS file!
See also
Article

Definition at line 582 of file document.cpp.

◆ copyright()

TQString Document::copyright ( ) const

RSS 0.91 and upwards.

Returns
A copyright of the information contained in the RSS document, or TQString() if no copyright is available.

Definition at line 592 of file document.cpp.

◆ description()

TQString Document::description ( ) const

RSS 0.90 and upwards.

Returns
The description of the RSS document, or TQString() if no description was available. This is usually a short slogan or description of the news source from which the RSS document was retrieved.

Definition at line 552 of file document.cpp.

◆ docs()

const KURL & Document::docs ( ) const

RSS 0.91 and upwards.

Returns
This tag should contain either a URL that references a description of the channel, or a pointer to the documentation for the format used in the RSS file.

Definition at line 612 of file document.cpp.

◆ image() [1/2]

Image * Document::image ( )

RSS 0.90 and upwards.

Returns
An Image object as stored in the RSS document, or a null pointer if there was no image available.
See also
Image

Definition at line 562 of file document.cpp.

◆ image() [2/2]

const Image * Document::image ( ) const

A version of the method above, with stricter const-ness.

Definition at line 567 of file document.cpp.

◆ isValid()

bool Document::isValid ( ) const
Returns
If document is valid

Definition at line 519 of file document.cpp.

◆ language()

Language Document::language ( ) const

RSS 0.91 and upwards.

Returns
The language used in the RSS document (for the article headlines etc.). This was originally introduced to assist with determining the correct page encoding but acts as a solely optional information in this library since you don't have to care about the encoding as Unicode is used in the whole library.
See also
RSS::Language

Definition at line 587 of file document.cpp.

◆ lastBuildDate()

const TQDateTime & Document::lastBuildDate ( ) const

RSS 0.91 and upwards.

Returns
The last time the channel was modified.

Definition at line 602 of file document.cpp.

◆ link()

const KURL & Document::link ( ) const

RSS 0.90 and upwards.

Returns
A link pointing to some website, or an empty KURL if no link was available. This URL mostly points to the homepage of the news site from which the RSS document was retrieved. Note that the RSS 0.91 Specification dictates that URLs not starting with "http://" or "ftp://" are considered invalid.

Definition at line 557 of file document.cpp.

◆ managingEditor()

TQString Document::managingEditor ( ) const

RSS 0.91 and upwards.

Returns
The email address of the managing editor of the site, the person to contact for editorial inquiries. The suggested format for email addresses in RSS documents is bull@.nosp@m.manc.nosp@m.uso.c.nosp@m.om (Bull Mancuso).
See also
webMaster()

Definition at line 617 of file document.cpp.

◆ operator=()

Document & Document::operator= ( const Document other)

Assignment operator.

Parameters
otherThe Document object to clone.
Returns
A reference to the cloned Document object.

Definition at line 642 of file document.cpp.

◆ pubDate()

const TQDateTime & Document::pubDate ( ) const

RSS 0.91 and upwards.

Returns
The date when the RSS document was published.

Definition at line 597 of file document.cpp.

◆ rating()

TQString Document::rating ( ) const

RSS 0.91 and upwards.

Returns
A PICS rating for this page.

Definition at line 607 of file document.cpp.

◆ skipDays()

const DayList & Document::skipDays ( ) const

RSS 0.91 and upwards.

Returns
A list of <day>s of the week, in English, indicating the days of the week when the RSS document will not be updated.
See also
skipHours(), DayList, Day

Definition at line 632 of file document.cpp.

◆ skipHours()

const HourList & Document::skipHours ( ) const

RSS 0.91 and upwards.

Returns
A list of hours indicating the hours in the day, GMT, when the channel is unlikely to be updated. If this item is omitted, the channel is assumed to be updated hourly. Each hour should be an integer value between 0 and 23.
See also
skipDays()

Definition at line 627 of file document.cpp.

◆ textInput() [1/2]

TextInput * Document::textInput ( )

RSS 0.90 and upwards.

Returns
A TextInput object as stored in the RSS document, or a null pointer if there was no text input available.
See also
TextInput

Definition at line 572 of file document.cpp.

◆ textInput() [2/2]

const TextInput * Document::textInput ( ) const

A version of the method above, with stricter const-ness.

Definition at line 577 of file document.cpp.

◆ title()

TQString Document::title ( ) const

RSS 0.90 and upwards.

Returns
The title of the RSS document, or TQString() if no title was available. This is often the name of the news source from which the RSS document was retrieved.

Definition at line 547 of file document.cpp.

◆ verbVersion()

TQString Document::verbVersion ( ) const

Convenience method.

Differs from version() only in how the result is returned.

Returns
A TQString representing the verbose version of the document.
See also
version()

Definition at line 529 of file document.cpp.

◆ version()

Version Document::version ( ) const
Returns
The version of this document (one of the values of the enum RSS::Version). This value can be used to determine which features this RSS document provides.
See also
verbVersion()

Definition at line 524 of file document.cpp.

◆ webMaster()

TQString Document::webMaster ( ) const

RSS 0.91 and upwards.

Returns
The email address of the webmaster for the site, the person to contact if there are technical problems with the channel, or TQString() if this information isn't available.
See also
managingEditor()

Definition at line 622 of file document.cpp.


The documentation for this class was generated from the following files: