akregator/src/librss

RSS::Document Class Reference

#include <document.h>

List of all members.


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.


Public Member Functions

 Document ()
 Document (const Document &other)
 Document (const QDomDocument &doc)
Documentoperator= (const Document &other)
 ~Document ()
bool isValid () const
Version version () const
QString verbVersion () const
QString title () const
QString description () const
const KURL & link () const
Imageimage ()
const Imageimage () const
TextInputtextInput ()
const TextInputtextInput () const
const Article::Listarticles () const
Language language () const
QString copyright () const
const QDateTime & pubDate () const
const QDateTime & lastBuildDate () const
QString rating () const
const KURL & docs () const
QString managingEditor () const
QString webMaster () const
const HourListskipHours () const
const DayListskipDays () const
int ttl () const

Constructor & Destructor Documentation

Document::Document (  ) 

Default constructor.

Definition at line 66 of file document.cpp.

Document::Document ( const Document other  ) 

Copy constructor.

Parameters:
other The Document object to copy.

Definition at line 70 of file document.cpp.

Document::Document ( const QDomDocument &  doc  ) 

Constructs a Document from a piece of XML markup.

Definition at line 94 of file document.cpp.

Document::~Document (  ) 

Destructor.

Definition at line 513 of file document.cpp.


Member Function Documentation

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

Assignment operator.

Parameters:
other The Document object to clone.
Returns:
A reference to the cloned Document object.

Definition at line 642 of file document.cpp.

bool Document::isValid (  )  const

Returns:
If document is valid

Definition at line 519 of file document.cpp.

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.

QString Document::verbVersion (  )  const

Convenience method.

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

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

Definition at line 529 of file document.cpp.

QString Document::title (  )  const

RSS 0.90 and upwards.

Returns:
The title of the RSS document, or QString::null 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.

QString Document::description (  )  const

RSS 0.90 and upwards.

Returns:
The description of the RSS document, or QString::null 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.

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.

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.

const Image * Document::image (  )  const

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

Definition at line 567 of file document.cpp.

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.

const TextInput * Document::textInput (  )  const

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

Definition at line 577 of file document.cpp.

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.

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.

QString Document::copyright (  )  const

RSS 0.91 and upwards.

Returns:
A copyright of the information contained in the RSS document, or QString::null if no copyright is available.

Definition at line 592 of file document.cpp.

const QDateTime & 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.

const QDateTime & Document::lastBuildDate (  )  const

RSS 0.91 and upwards.

Returns:
The last time the channel was modified.

Definition at line 602 of file document.cpp.

QString Document::rating (  )  const

RSS 0.91 and upwards.

Returns:
A PICS rating for this page.

Definition at line 607 of file document.cpp.

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.

QString 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@mancuso.com (Bull Mancuso).
See also:
webMaster()

Definition at line 617 of file document.cpp.

QString 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 QString::null if this information isn't available.
See also:
managingEditor()

Definition at line 622 of file document.cpp.

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.

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.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys