Syndication

Syndication Namespace Reference

Namespaces

 Atom
 
 RDF
 
 RSS2
 

Classes

class  AbstractParser
 
class  AtomMapper
 
class  Category
 
class  CategoryAtomImpl
 
class  CategoryRSS2Impl
 
class  DataRetriever
 
class  DocumentSource
 
class  DocumentVisitor
 
class  ElementWrapper
 
class  Enclosure
 
class  EnclosureAtomImpl
 
class  EnclosureRSS2Impl
 
class  Feed
 
class  FeedAtomImpl
 
class  FeedRDFImpl
 
class  FeedRSS2Impl
 
class  Image
 
class  ImageAtomImpl
 
class  ImageRDFImpl
 
class  ImageRSS2Impl
 
class  Item
 
class  ItemAtomImpl
 
class  ItemRDFImpl
 
class  ItemRSS2Impl
 
class  Loader
 
class  Mapper
 
class  ParserCollection
 
class  Person
 
class  RDFMapper
 
class  RSS2Mapper
 
class  SpecificDocument
 
class  SpecificItem
 
class  SpecificItemVisitor
 

Typedefs

typedef QSharedPointer< CategoryAtomImplCategoryAtomImplPtr
 
typedef QSharedPointer< CategoryCategoryPtr
 
typedef QSharedPointer< CategoryRSS2ImplCategoryRSS2ImplPtr
 
typedef QSharedPointer< EnclosureAtomImplEnclosureAtomImplPtr
 
typedef QSharedPointer< EnclosureRSS2ImplEnclosureRSS2ImplPtr
 
typedef QSharedPointer< FeedAtomImplFeedAtomImplPtr
 
typedef QSharedPointer< FeedRDFImplFeedRDFImplPtr
 
typedef QSharedPointer< FeedRSS2ImplFeedRSS2ImplPtr
 
typedef QSharedPointer< ImageAtomImplImageAtomImplPtr
 
typedef QSharedPointer< ImageImagePtr
 
typedef QSharedPointer< ImageRDFImplImageRDFImplPtr
 
typedef QSharedPointer< ImageRSS2ImplImageRSS2ImplPtr
 
typedef QSharedPointer< ItemAtomImplItemAtomImplPtr
 
typedef QSharedPointer< ItemRDFImplItemRDFImplPtr
 
typedef QSharedPointer< ItemRSS2ImplItemRSS2ImplPtr
 

Enumerations

enum  ErrorCode {
  Success = 0, Aborted = 1, Timeout = 2, UnknownHost = 3,
  FileNotFound = 4, OtherRetrieverError = 5, InvalidXml = 6, XmlNotAccepted = 7,
  InvalidFormat = 8
}
 

Functions

unsigned int calcHash (const QString &str)
 
unsigned int calcHash (const QByteArray &array)
 
QString calcMD5Sum (const QString &str)
 
QString commentApiNamespace ()
 
QString contentNameSpace ()
 
QString convertNewlines (const QString &strp)
 
QString dateTimeToString (uint date)
 
QString dublinCoreNamespace ()
 
QString escapeSpecialCharacters (const QString &strp)
 
QString htmlToPlainText (const QString &html)
 
bool isHtml (const QString &str)
 
QString itunesNamespace ()
 
QString normalize (const QString &str)
 
QString normalize (const QString &strp, bool isCDATA, bool containsMarkup)
 
FeedPtr parse (const DocumentSource &src, const QString &formatHint=QString())
 
uint parseDate (const QString &str, DateFormat hint)
 
uint parseISODate (const QString &str)
 
ParserCollection< Feed > * parserCollection ()
 
uint parseRFCDate (const QString &str)
 
PersonPtr personFromString (const QString &strp)
 
QString plainTextToHtml (const QString &plainText)
 
QString resolveEntities (const QString &str)
 
QString slashNamespace ()
 
bool stringContainsMarkup (const QString &str)
 
static QRegularExpression tagRegExp ()
 
static uint toTimeT (QDateTime &kdt)
 
QString xhtmlNamespace ()
 
QString xmlNamespace ()
 

Variables

QCryptographicHash md5Machine (QCryptographicHash::Md5)
 
static ParserCollectionImpl< Syndication::Feed > * parserColl = nullptr
 

Detailed Description

TODO.

Enumeration Type Documentation

error code indicating fetching or parsing errors

Enumerator
Success 

No error occurred, feed was fetched and parsed successfully.

Aborted 

file downloading/parsing was aborted by the user

Timeout 

file download timed out

UnknownHost 

The hostname couldn't get resolved to an IP address.

FileNotFound 

the host was contacted successfully, but reported a 404 error

OtherRetrieverError 

retriever error not covered by the error codes above.

This is returned if a custom DataRetriever was used. See the retriever-specific status byte for more information on the occurred error.

InvalidXml 

The XML is invalid.

This is returned if no parser accepts the source and the DOM document can't be parsed. It is not returned if the source is not valid XML but a (non-XML) parser accepts it.

XmlNotAccepted 

The source is valid XML, but no parser accepted it.

InvalidFormat 

the source was accepted by a parser, but the actual parsing failed.

As our parser implementations currently do not validate the source ("parse what you can get"), this code will be rarely seen.

Definition at line 84 of file global.h.

Function Documentation

SYNDICATION_EXPORT QString Syndication::commentApiNamespace ( )

wellformedweb.org's RSS namespace for comment functionality "http://wellformedweb.org/CommentAPI/"

Definition at line 55 of file constants.cpp.

SYNDICATION_EXPORT FeedPtr Syndication::parse ( const DocumentSource src,
const QString formatHint = QString() 
)

parses a document from a source and returns a new Feed object wrapping the feed content.

Shortcut for parserCollection()->parse(). See ParserCollection::parse() for more details.

Parameters
srcthe document source to parse
formatHintan optional hint which format to test first

Definition at line 71 of file global.cpp.

SYNDICATION_EXPORT ParserCollection< Feed > * Syndication::parserCollection ( )

The default ParserCollection instance parsing a DocumentSource into a Feed object.

Use this to parse a local file or a otherwise manually created DocumentSource object.

To retrieve a feed from the web, use Loader instead.

Example code:

...
QFile someFile(somePath);
...
DocumentSource src(someFile.readAll());
someFile.close();
FeedPtr feed = parserCollection()->parse(src);
if (feed)
{
QString title = feed->title();
QList<ItemPtr> items = feed->items();
...
}

Definition at line 58 of file global.cpp.

SYNDICATION_EXPORT QString Syndication::slashNamespace ( )

"slash" namespace http://purl.org/rss/1.0/modules/slash/

Definition at line 60 of file constants.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 23:01:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.