Syndication::Atom::Link

Search for usage in LXR

Syndication::Atom::Link Class Reference

#include <link.h>

Inheritance diagram for Syndication::Atom::Link:

Public Member Functions

 Link ()
 
 Link (const QDomElement &element)
 
QString debugInfo () const
 
QString href () const
 
QString hrefLanguage () const
 
uint length () const
 
QString rel () const
 
QString title () const
 
QString type () const
 
- Public Member Functions inherited from Syndication::ElementWrapper
 ElementWrapper ()
 
 ElementWrapper (const ElementWrapper &other)
 
 ElementWrapper (const QDomElement &element)
 
virtual ~ElementWrapper ()
 
QString attribute (const QString &name, const QString &defValue=QString()) const
 
QString attributeNS (const QString &nsURI, const QString &localName, const QString &defValue=QString()) const
 
QString childNodesAsXML () const
 
QString completeURI (const QString &uri) const
 
const QDomElementelement () const
 
QList< QDomElementelementsByTagName (const QString &tagName) const
 
QList< QDomElementelementsByTagNameNS (const QString &nsURI, const QString &tagName) const
 
QString extractElementText (const QString &tagName) const
 
QString extractElementTextNS (const QString &namespaceURI, const QString &localName) const
 
QDomElement firstElementByTagNameNS (const QString &nsURI, const QString &tagName) const
 
bool hasAttribute (const QString &name) const
 
bool hasAttributeNS (const QString &nsURI, const QString &localName) const
 
bool isNull () const
 
ElementWrapperoperator= (const ElementWrapper &other)
 
bool operator== (const ElementWrapper &other) const
 
QString text () const
 
QString xmlBase () const
 
QString xmlLang () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Syndication::ElementWrapper
static QString childNodesAsXML (const QDomElement &parent)
 

Detailed Description

A link, pointing to webpages, media files on the web ("podcast"), related content, etc.

See rel() for details.

Author
Frank Osterfeld

Definition at line 26 of file link.h.

Constructor & Destructor Documentation

◆ Link() [1/2]

Syndication::Atom::Link::Link ( )

creates a null link object.

Definition at line 17 of file link.cpp.

◆ Link() [2/2]

Syndication::Atom::Link::Link ( const QDomElement & element)
explicit

creates a Link object wrapping an atom:link element.

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

Definition at line 22 of file link.cpp.

Member Function Documentation

◆ debugInfo()

QString Syndication::Atom::Link::debugInfo ( ) const

description of the link object for debugging purposes

Returns
debug string

Definition at line 62 of file link.cpp.

◆ href()

QString Syndication::Atom::Link::href ( ) const

URL of the referenced resource (required)

Definition at line 27 of file link.cpp.

◆ hrefLanguage()

QString Syndication::Atom::Link::hrefLanguage ( ) const

the language of the linked resource.

(optional) If used together with a rel() value of "alternate", it implies a translated version of the entry.

Returns
a language tag as defined in RFC 3066, or a null string if not specified

Definition at line 43 of file link.cpp.

◆ length()

uint Syndication::Atom::Link::length ( ) const

size of the linked resource in bytes.

(optional)

Returns
file size in bytes, or 0 if not specified

Definition at line 53 of file link.cpp.

◆ rel()

QString Syndication::Atom::Link::rel ( ) const

the relation between the feed/entry and the linked resource.

The value of rel() is usually one of the following:

"alternate": The URL points to an alternate version of the feed/entry. In practice, this is the article described in an entry, or the homepage of the feed.

"enclosure": The link describes an Enclosure. See Syndication::Enclosure for more information.

"related": links to web resources with related content. E.g., an article discussing KDE might link to the KDE homepage.

"self": "identifies a resource equivalent to the containing element". This is usually the URL of the feed source itself.

"via": The link points to the source of the information contained in the feed/entry

Returns
the rel value specified in the feed. Default value is "alternate"

Definition at line 32 of file link.cpp.

◆ title()

QString Syndication::Atom::Link::title ( ) const

human-readable information about the link.

(optional)

Returns
the link title as plain text ("<", "&" are text, not markup!), or a null string if not specified

Definition at line 48 of file link.cpp.

◆ type()

QString Syndication::Atom::Link::type ( ) const

MIME type of the linked resource.

(optional)

Returns
MIME type following (e.g., "text/html", "audio/mpeg"), or a null string if not set

Definition at line 38 of file link.cpp.


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.