Syndication::Feed

Search for usage in LXR

Syndication::Feed Class Referenceabstract

#include <feed.h>

Inheritance diagram for Syndication::Feed:

Public Member Functions

virtual ~Feed ()
 
virtual QMultiMap< QString, QDomElementadditionalProperties () const =0
 
virtual QList< PersonPtr > authors () const =0
 
virtual QList< CategoryPtrcategories () const =0
 
virtual QString copyright () const =0
 
virtual QString debugInfo () const
 
virtual QString description () const =0
 
virtual ImagePtr icon () const =0
 
virtual ImagePtr image () const =0
 
virtual QList< ItemPtr > items () const =0
 
virtual QString language () const =0
 
virtual QString link () const =0
 
virtual SpecificDocumentPtr specificDocument () const =0
 
virtual QString title () const =0
 

Detailed Description

This class represents a feed document ("Channel" in RSS, "Feed" in Atom).

It contains a ordered list of items (e.g., articles) and a description of the feed (title, homepage, etc.). This interface abstracts from format-specific details of e.g. Atom::FeedDocument or RSS::Document and provides a format-agnostic, unified view on the document. This way applications using the syndication library have no need to care about the syndication format jungle at all. If necessary, format details and specialities can be accessed using the specificDocument() method.

Author
Frank Osterfeld

Definition at line 52 of file feed.h.

Constructor & Destructor Documentation

◆ ~Feed()

Syndication::Feed::~Feed ( )
virtual

destructor

Definition at line 19 of file feed.cpp.

Member Function Documentation

◆ additionalProperties()

virtual QMultiMap< QString, QDomElement > Syndication::Feed::additionalProperties ( ) const
pure virtual

returns a list of feed metadata not covered by this class.

Can be used e.g. to access format extensions.

The returned map contains key value pairs, where the key is the tag name of the element, namespace prefix are resolved to the corresponding URIs. The value is the XML element as read from the document.

For example, to access the <itunes:subtitle> element, use additionalProperties()["http://www.itunes.com/dtds/podcast-1.0.dtdsubtitle"].

Currently this is only supported for RSS 0.91..0.94/2.0 and Atom formats, but not for RDF (RSS 0.9 and 1.0).

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ authors()

virtual QList< PersonPtr > Syndication::Feed::authors ( ) const
pure virtual

returns a list of persons who created the feed content.

If there is a distinction between authors and contributors (Atom), both are added to the list, where authors are added first.

Returns
list of authors (and possibly other contributing persons)

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ categories()

virtual QList< CategoryPtr > Syndication::Feed::categories ( ) const
pure virtual

returns a list of categories this feed is associated with.

See Category for more information.

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ copyright()

virtual QString Syndication::Feed::copyright ( ) const
pure virtual

returns copyright information about the feed

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ debugInfo()

QString Syndication::Feed::debugInfo ( ) const
virtual

returns a description of the feed for debugging purposes

Returns
debug string

Definition at line 23 of file feed.cpp.

◆ description()

virtual QString Syndication::Feed::description ( ) const
pure virtual

A description of the feed.

This string may contain HTML markup.(Importantly, occurrences of the characters <,'
', '&', '\'' and '"' are escaped).

Returns
the description as HTML, or a null string if none is specified

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ icon()

virtual ImagePtr Syndication::Feed::icon ( ) const
pure virtual

returns an icon associated with this item.

Returns
an icon object, or a null icon (Not a null pointer! I.e., icon()->isNull() is true) if no image is specified in the feed

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ image()

virtual ImagePtr Syndication::Feed::image ( ) const
pure virtual

returns an image associated with this item.

Returns
an image object, or a null image (Not a null pointer! I.e., image()->isNull() is true) if no image is specified in the feed

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ items()

virtual QList< ItemPtr > Syndication::Feed::items ( ) const
pure virtual

A list of items, in the order they were parsed from the feed source.

(usually reverse chronological order, see also Item::datePublished() for sorting purposes).

Returns
list of items

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ language()

virtual QString Syndication::Feed::language ( ) const
pure virtual

The language used in the feed.

This is a global setting, which can be overridden by the contained items.

TODO: describe concrete format (language codes)

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ link()

virtual QString Syndication::Feed::link ( ) const
pure virtual

returns a link pointing to a website associated with this channel.

(blog, news site etc.)

Returns
a WWW link, or a null string if none is specified

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ specificDocument()

virtual SpecificDocumentPtr Syndication::Feed::specificDocument ( ) const
pure virtual

returns the format-specific document this abstraction wraps.

If you want to access format-specific properties, this can be used, in combination with a DocumentVisitor.

Returns
a shared pointer to the wrapped document.

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.

◆ title()

virtual QString Syndication::Feed::title ( ) const
pure virtual

The title of the feed.

This string may contain HTML markup.(Importantly, occurrences of the characters <,'
', '&', '\'' and '"' are escaped).

Returns
the title, or a null string if none is specified

Implemented in Syndication::FeedAtomImpl, Syndication::FeedRDFImpl, and Syndication::FeedRSS2Impl.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.