libxspf  1.2.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
XspfReader Class Reference

#include <XspfReader.h>

Public Member Functions

 XspfReader (XspfExtensionReaderFactory *handlerFactory=NULL)
 
 XspfReader (XspfReader const &source)
 
XspfReaderoperator= (XspfReader const &source)
 
 ~XspfReader ()
 
int parseFile (XML_Char const *filename, XspfReaderCallback *callback, XML_Char const *baseUri)
 
int parseMemory (char const *memory, int numBytes, XspfReaderCallback *callback, XML_Char const *baseUri)
 
int parseChunks (XspfChunkCallback *inputCallback, XspfReaderCallback *dataCallback, XML_Char const *baseUri)
 
void limitLengthPerEntityValue (bool enabled)
 
void limitLookupSumPerEntityValue (bool enabled)
 
void limitLookupDepthPerEntityValue (bool enabled)
 
void enableMaliciousXmlDetection (bool enabled)
 
void setMaxLengthPerEntityValue (int maxLength)
 
void setMaxLookupSumPerEntityValue (int maxLookupSum)
 
void setMaxLookupDepthPerEntityValue (int maxLookupDepth)
 

Static Public Member Functions

static bool isXmlBase (XML_Char const *attributeKey)
 

Friends

class XspfExtensionReader
 

Detailed Description

Reads a XSPF playlist from a file.

Definition at line 209 of file XspfReader.h.

Constructor & Destructor Documentation

◆ XspfReader() [1/2]

XspfReader ( XspfExtensionReaderFactory handlerFactory = NULL)

Creates a new reader.

Parameters
handlerFactoryFactory used to create handlers

◆ XspfReader() [2/2]

XspfReader ( XspfReader const &  source)

Copy constructor.

Parameters
sourceSource to copy from

◆ ~XspfReader()

~XspfReader ( )

Frees all own memory.

Member Function Documentation

◆ enableMaliciousXmlDetection()

void enableMaliciousXmlDetection ( bool  enabled)

Enables/disables all means of malicious XML detection. This function is provided for convenience.

Experimental:
This feature is marked as experimental.
Parameters
enabledEnabled flag
See also
limitLengthPerEntityValue, setMaxLengthPerEntityValue
limitLookupSumPerEntityValue, setMaxLookupSumPerEntityValue
limitLookupDepthPerEntityValue, setMaxLookupDepthPerEntityValue
Since
1.0.0

◆ isXmlBase()

static bool isXmlBase ( XML_Char const *  attributeKey)
static

Checks if attributeKey is the xml:base attribute

Parameters
attributeKeyAttribute key to check
Returns
Equality flag

◆ limitLengthPerEntityValue()

void limitLengthPerEntityValue ( bool  enabled)

Enables/disables the restriction on the length of entity values.

Experimental:
This feature is marked as experimental.
Parameters
enabledEnabled flag
See also
setMaxLengthPerEntityValue
Since
1.0.0

◆ limitLookupDepthPerEntityValue()

void limitLookupDepthPerEntityValue ( bool  enabled)

Enables/disables the restriction on the lookup depth of entity values.

Experimental:
This feature is marked as experimental.
Parameters
enabledEnabled flag
See also
setMaxLookupDepthPerEntityValue
Since
1.0.0

◆ limitLookupSumPerEntityValue()

void limitLookupSumPerEntityValue ( bool  enabled)

Enables/disables the restriction on the sum of lookups per entity value.

Experimental:
This feature is marked as experimental.
Parameters
enabledEnabled flag
See also
setMaxLookupSumPerEntityValue
Since
1.0.0

◆ operator=()

XspfReader& operator= ( XspfReader const &  source)

Assignment operator.

Parameters
sourceSource to copy from

◆ parseChunks()

int parseChunks ( XspfChunkCallback inputCallback,
XspfReaderCallback dataCallback,
XML_Char const *  baseUri 
)

Reads an XSPF playlist from a chunk callback.

Parameters
inputCallbackChunk callback, must not be NULL
dataCallbackReader callback that will receive the playlist's information Passing NULL will make the reader use a XspfStrictReaderCallback instance internally.
baseUriAbsolute external base URI to resolve URIs against
Returns
Error/warning code that aborted parsing or XSPF_READER_SUCCESS.
Since
1.0.0rc1

◆ parseFile()

int parseFile ( XML_Char const *  filename,
XspfReaderCallback callback,
XML_Char const *  baseUri 
)

Reads an XSPF playlist from a file.

Parameters
filenameFilename of the file to read
callbackReader callback that will receive the playlist's information. Passing NULL will make the reader use a XspfStrictReaderCallback instance internally.
baseUriAbsolute external base URI to resolve URIs against
Returns
Error/warning code that aborted parsing or XSPF_READER_SUCCESS.
Since
1.0.0rc1

◆ parseMemory()

int parseMemory ( char const *  memory,
int  numBytes,
XspfReaderCallback callback,
XML_Char const *  baseUri 
)

Reads an XSPF playlist from a block of memory.

Parameters
memoryMemory block to parse
numBytesSize of memory in bytes
callbackReader callback that will receive the playlist's information Passing NULL will make the reader use a XspfStrictReaderCallback instance internally.
baseUriAbsolute external base URI to resolve URIs against
Returns
Error/warning code that aborted parsing or XSPF_READER_SUCCESS.
Since
1.0.0rc1

◆ setMaxLengthPerEntityValue()

void setMaxLengthPerEntityValue ( int  maxLength)

Adjusts the limit on the length of entity values.

Experimental:
This feature is marked as experimental.
Parameters
maxLengthInclusive limit to set
See also
limitLengthPerEntityValue
Since
1.0.0

◆ setMaxLookupDepthPerEntityValue()

void setMaxLookupDepthPerEntityValue ( int  maxLookupDepth)

Adjusts the limit on the lookup depth of entity values.

Experimental:
This feature is marked as experimental.
Parameters
maxLookupDepthInclusive limit to set
See also
limitLookupDepthPerEntityValue
Since
1.0.0

◆ setMaxLookupSumPerEntityValue()

void setMaxLookupSumPerEntityValue ( int  maxLookupSum)

Adjusts the limit on the sum of lookups per entity value.

Experimental:
This feature is marked as experimental.
Parameters
maxLookupSumInclusive limit to set
See also
limitLookupSumPerEntityValue
Since
1.0.0

The documentation for this class was generated from the following file: