Syndication::Atom::FeedDocument Class

class Syndication::Atom::FeedDocument

An Atom 1.0 Feed Document, containing metadata describing the feed and a number of entries. More...

Header: #include <Syndication/Atom/FeedDocument>
CMake: find_package(KF6 REQUIRED COMPONENTS Syndication)
target_link_libraries(mytarget PRIVATE KF6::Syndication)
Inherits: Syndication::SpecificDocument and Syndication::ElementWrapper

Public Functions

FeedDocument()
FeedDocument(const QDomElement &element)
QList<Syndication::Atom::Person> authors() const
QList<Syndication::Atom::Category> categories() const
QList<Syndication::Atom::Person> contributors() const
QList<Syndication::Atom::Entry> entries() const
Syndication::Atom::Generator generator() const
QString icon() const
QString id() const
QList<Syndication::Atom::Link> links() const
QString logo() const
QString rights() const
QString subtitle() const
QString title() const
QList<QDomElement> unhandledElements() const
time_t updated() const

Reimplemented Public Functions

virtual bool accept(Syndication::DocumentVisitor *visitor) override
virtual QString debugInfo() const override
virtual bool isValid() const override

Detailed Description

Member Function Documentation

FeedDocument::FeedDocument()

default constructor, creates a null feed, which is invalid.

See also isValid().

[explicit] FeedDocument::FeedDocument(const QDomElement &element)

creates a FeedDocument wrapping an atom:feed element.

element a DOM element, should be a atom:feed document (although not enforced), otherwise this object will not parse anything useful

[override virtual] bool FeedDocument::accept(Syndication::DocumentVisitor *visitor)

Reimplements: SpecificDocument::accept(Syndication::DocumentVisitor *visitor).

Used by visitors for double dispatch. See DocumentVisitor for more information.

visitor the visitor calling the method

QList<Syndication::Atom::Person> FeedDocument::authors() const

a list of persons who are the authors of this feed.

According to the Atom 1.0 spec, a feed must have an author unless all entries in it have one.

QList<Syndication::Atom::Category> FeedDocument::categories() const

a list of categories this feed is assigned to (optional)

QList<Syndication::Atom::Person> FeedDocument::contributors() const

a list of persons who contribute to this feed. (optional)

[override virtual] QString FeedDocument::debugInfo() const

Reimplements: SpecificDocument::debugInfo() const.

returns a description of this feed document for debugging purposes.

QList<Syndication::Atom::Entry> FeedDocument::entries() const

a list of the entries (items) in this feed.

Syndication::Atom::Generator FeedDocument::generator() const

description of the agent used to generate the feed. See Generator for more information (optional).

Returns description of the generator, or a null Generator object if not specified in the feed.

QString FeedDocument::icon() const

URL of an image serving as a feed icon (optional)

QString FeedDocument::id() const

a string that unambiguously identifies the feed (required)

Returns the ID of the feed. As defined in the Atom spec it must be a valid URI (which is neither checked nor enforced by this parser)

[override virtual] bool FeedDocument::isValid() const

Reimplements: SpecificDocument::isValid() const.

returns whether this document is valid or not. Invalid documents do not contain any useful information.

a list of links. See Link for more information on link types.

URL of an image serving as a feed logo (optional)

QString FeedDocument::rights() const

copyright information (optional)

Returns copyright information for the feed (intended for human readers), or a null string if not specified

QString FeedDocument::subtitle() const

description or subtitle of the feed (optional).

Returns subtitle string as HTML, or a null string if not specified in the feed.

QString FeedDocument::title() const

feed title (required).

Returns title string as HTML.

QList<QDomElement> FeedDocument::unhandledElements() const

returns all child elements of this feed not covered by this class. This can be used to access additional metadata from Atom extensions.

time_t FeedDocument::updated() const

The datetime of the last modification of the feed content.

Returns the modification date in seconds since epoch