• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

Syndication Library

Classes | Typedefs | Enumerations | Functions | Variables
Syndication Namespace Reference

Classes

class  AbstractParser
 
class  Category
 
class  DataRetriever
 
class  DocumentSource
 
class  DocumentVisitor
 
class  ElementWrapper
 
class  Enclosure
 
class  Feed
 
class  FileRetriever
 
class  Image
 
class  Item
 
class  Loader
 
class  Mapper
 
class  OutputRetriever
 
class  ParserCollection
 
class  Person
 
class  SpecificDocument
 
class  SpecificItem
 
class  SpecificItemVisitor
 

Typedefs

typedef boost::shared_ptr< Category > CategoryPtr
 

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 QByteArray &array)
 
unsigned int calcHash (const QString &str)
 
QString calcMD5Sum (const QString &str)
 
QString commentApiNamespace ()
 
QString contentNameSpace ()
 
QString convertNewlines (const QString &strp)
 
QString dateTimeToString (time_t 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())
 
time_t parseDate (const QString &str, DateFormat hint)
 
time_t parseISODate (const QString &str)
 
ParserCollection< Feed > * parserCollection ()
 
time_t 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 time_t toTimeT (KDateTime &kdt)
 
QString xhtmlNamespace ()
 
QString xmlNamespace ()
 

Variables

KMD5 md5Machine
 
static ParserCollectionImpl< Syndication::Feed > * parserColl = 0
 

Detailed Description

TODO.

Typedef Documentation

◆ CategoryPtr

typedef boost::shared_ptr<Category> Syndication::CategoryPtr

Definition at line 34 of file category.h.

Enumeration Type Documentation

◆ ErrorCode

enum Syndication::ErrorCode

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 85 of file global.h.

Function Documentation

◆ calcHash() [1/2]

unsigned int Syndication::calcHash ( const QByteArray &  array)

Definition at line 46 of file tools.cpp.

◆ calcHash() [2/2]

unsigned int Syndication::calcHash ( const QString &  str)

Definition at line 41 of file tools.cpp.

◆ calcMD5Sum()

QString Syndication::calcMD5Sum ( const QString &  str)

Definition at line 115 of file tools.cpp.

◆ commentApiNamespace()

QString Syndication::commentApiNamespace ( )

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

Definition at line 54 of file constants.cpp.

◆ contentNameSpace()

QString Syndication::contentNameSpace ( )

Definition at line 39 of file constants.cpp.

◆ convertNewlines()

QString Syndication::convertNewlines ( const QString &  strp)

Definition at line 138 of file tools.cpp.

◆ dateTimeToString()

QString Syndication::dateTimeToString ( time_t  date)

Definition at line 105 of file tools.cpp.

◆ dublinCoreNamespace()

QString Syndication::dublinCoreNamespace ( )

Definition at line 44 of file constants.cpp.

◆ escapeSpecialCharacters()

QString Syndication::escapeSpecialCharacters ( const QString &  strp)

Definition at line 127 of file tools.cpp.

◆ htmlToPlainText()

QString Syndication::htmlToPlainText ( const QString &  html)

Definition at line 156 of file tools.cpp.

◆ isHtml()

bool Syndication::isHtml ( const QString &  str)

Definition at line 188 of file tools.cpp.

◆ itunesNamespace()

QString Syndication::itunesNamespace ( )

Definition at line 49 of file constants.cpp.

◆ normalize() [1/2]

QString Syndication::normalize ( const QString &  str)

Definition at line 209 of file tools.cpp.

◆ normalize() [2/2]

QString Syndication::normalize ( const QString &  strp,
bool  isCDATA,
bool  containsMarkup 
)

Definition at line 214 of file tools.cpp.

◆ parse()

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 69 of file global.cpp.

◆ parseDate()

time_t Syndication::parseDate ( const QString &  str,
DateFormat  hint 
)

Definition at line 88 of file tools.cpp.

◆ parseISODate()

time_t Syndication::parseISODate ( const QString &  str)

Definition at line 76 of file tools.cpp.

◆ parserCollection()

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();
...
}
Syndication::parserCollection
ParserCollection< Feed > * parserCollection()
The default ParserCollection instance parsing a DocumentSource into a Feed object.
Definition: global.cpp:55

Definition at line 55 of file global.cpp.

◆ parseRFCDate()

time_t Syndication::parseRFCDate ( const QString &  str)

Definition at line 82 of file tools.cpp.

◆ personFromString()

PersonPtr Syndication::personFromString ( const QString &  strp)

Definition at line 237 of file tools.cpp.

◆ plainTextToHtml()

QString Syndication::plainTextToHtml ( const QString &  plainText)

Definition at line 145 of file tools.cpp.

◆ resolveEntities()

QString Syndication::resolveEntities ( const QString &  str)

Definition at line 122 of file tools.cpp.

◆ slashNamespace()

QString Syndication::slashNamespace ( )

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

Definition at line 59 of file constants.cpp.

◆ stringContainsMarkup()

bool Syndication::stringContainsMarkup ( const QString &  str)

Definition at line 170 of file tools.cpp.

◆ toTimeT()

static time_t Syndication::toTimeT ( KDateTime &  kdt)
static

Definition at line 64 of file tools.cpp.

◆ xhtmlNamespace()

QString Syndication::xhtmlNamespace ( )

Definition at line 34 of file constants.cpp.

◆ xmlNamespace()

QString Syndication::xmlNamespace ( )

Definition at line 29 of file constants.cpp.

Variable Documentation

◆ md5Machine

KMD5 Syndication::md5Machine

Definition at line 39 of file tools.cpp.

◆ parserColl

ParserCollectionImpl<Syndication::Feed>* Syndication::parserColl = 0
static

Definition at line 42 of file global.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Syndication Library

Skip menu "Syndication Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal