#include <XspfReader.h>
Public Member Functions | |
XspfReader (XspfExtensionReaderFactory *handlerFactory=NULL) | |
XspfReader (XspfReader const &source) | |
XspfReader & | operator= (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 |
Definition at line 209 of file XspfReader.h.
XspfReader | ( | XspfExtensionReaderFactory * | handlerFactory = NULL |
) |
Creates a new reader.
handlerFactory | Factory used to create handlers |
XspfReader | ( | XspfReader const & | source | ) |
Copy constructor.
source | Source to copy from |
~XspfReader | ( | ) |
Frees all own memory.
void enableMaliciousXmlDetection | ( | bool | enabled | ) |
Enables/disables all means of malicious XML detection. This function is provided for convenience.
enabled | Enabled flag |
limitLookupSumPerEntityValue, setMaxLookupSumPerEntityValue
limitLookupDepthPerEntityValue, setMaxLookupDepthPerEntityValue
static bool isXmlBase | ( | XML_Char const * | attributeKey | ) | [static] |
Checks if attributeKey
is the xml:base attribute
attributeKey | Attribute key to check |
void limitLengthPerEntityValue | ( | bool | enabled | ) |
Enables/disables the restriction on the length of entity values.
enabled | Enabled flag |
void limitLookupDepthPerEntityValue | ( | bool | enabled | ) |
Enables/disables the restriction on the lookup depth of entity values.
enabled | Enabled flag |
void limitLookupSumPerEntityValue | ( | bool | enabled | ) |
Enables/disables the restriction on the sum of lookups per entity value.
enabled | Enabled flag |
XspfReader& operator= | ( | XspfReader const & | source | ) |
Assignment operator.
source | Source to copy from |
int parseChunks | ( | XspfChunkCallback * | inputCallback, | |
XspfReaderCallback * | dataCallback, | |||
XML_Char const * | baseUri | |||
) |
Reads an XSPF playlist from a chunk callback.
inputCallback | Chunk callback, must not be NULL | |
dataCallback | Reader callback that will receive the playlist's information Passing NULL will make the reader use a XspfStrictReaderCallback instance internally. | |
baseUri | Absolute external base URI to resolve URIs against |
XSPF_READER_SUCCESS
. int parseFile | ( | XML_Char const * | filename, | |
XspfReaderCallback * | callback, | |||
XML_Char const * | baseUri | |||
) |
Reads an XSPF playlist from a file.
filename | Filename of the file to read | |
callback | Reader callback that will receive the playlist's information. Passing NULL will make the reader use a XspfStrictReaderCallback instance internally. | |
baseUri | Absolute external base URI to resolve URIs against |
XSPF_READER_SUCCESS
. int parseMemory | ( | char const * | memory, | |
int | numBytes, | |||
XspfReaderCallback * | callback, | |||
XML_Char const * | baseUri | |||
) |
Reads an XSPF playlist from a block of memory.
memory | Memory block to parse | |
numBytes | Size of memory in bytes | |
callback | Reader callback that will receive the playlist's information Passing NULL will make the reader use a XspfStrictReaderCallback instance internally. | |
baseUri | Absolute external base URI to resolve URIs against |
XSPF_READER_SUCCESS
. void setMaxLengthPerEntityValue | ( | int | maxLength | ) |
Adjusts the limit on the length of entity values.
maxLength | Inclusive limit to set |
void setMaxLookupDepthPerEntityValue | ( | int | maxLookupDepth | ) |
Adjusts the limit on the lookup depth of entity values.
maxLookupDepth | Inclusive limit to set |
void setMaxLookupSumPerEntityValue | ( | int | maxLookupSum | ) |
Adjusts the limit on the sum of lookups per entity value.
maxLookupSum | Inclusive limit to set |