libxspf  1.2.0
Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
XspfData Class Reference

#include <XspfData.h>

Inheritance diagram for XspfData:
Inheritance graph
[legend]

Public Member Functions

void giveImage (XML_Char const *image, bool copy)
 
void giveInfo (XML_Char const *info, bool copy)
 
void giveAnnotation (XML_Char const *annotation, bool copy)
 
void giveCreator (XML_Char const *creator, bool copy)
 
void giveTitle (XML_Char const *title, bool copy)
 
void giveAppendLink (XML_Char const *rel, bool copyRel, XML_Char const *content, bool copyContent)
 
void giveAppendMeta (XML_Char const *rel, bool copyRel, XML_Char const *content, bool copyContent)
 
void giveAppendExtension (XspfExtension const *extension, bool copy)
 
void lendImage (XML_Char const *image)
 
void lendInfo (XML_Char const *info)
 
void lendAnnotation (XML_Char const *annotation)
 
void lendCreator (XML_Char const *creator)
 
void lendTitle (XML_Char const *title)
 
void lendAppendLink (XML_Char const *rel, XML_Char const *content)
 
void lendAppendMeta (XML_Char const *rel, XML_Char const *content)
 
void lendAppendExtension (XspfExtension *extension)
 
XML_Char * stealImage ()
 
XML_Char * stealInfo ()
 
XML_Char * stealAnnotation ()
 
XML_Char * stealCreator ()
 
XML_Char * stealTitle ()
 
std::pair< XML_Char *, XML_Char * > * stealFirstLink ()
 
std::pair< XML_Char *, XML_Char * > * stealFirstMeta ()
 
XspfExtensionstealFirstExtension ()
 
XML_Char const * getImage () const
 
XML_Char const * getInfo () const
 
XML_Char const * getAnnotation () const
 
XML_Char const * getCreator () const
 
XML_Char const * getTitle () const
 
std::pair< XML_Char const *, XML_Char const * > * getLink (int index) const
 
std::pair< XML_Char const *, XML_Char const * > * getMeta (int index) const
 
XspfExtension const * getExtension (int index) const
 
int getLinkCount () const
 
int getMetaCount () const
 
int getExtensionCount () const
 

Static Public Attributes

static bool const COPY
 Memory is copied.
 
static bool const TRANSFER
 Memory ownership is transfered.
 

Protected Member Functions

 XspfData ()
 
 XspfData (XspfData const &source)
 
XspfDataoperator= (XspfData const &source)
 
virtual ~XspfData ()
 

Static Protected Member Functions

static XML_Char * stealHelper (XML_Char const *&property, bool own)
 

Friends

class XspfDataPrivate
 

Detailed Description

Provides shared functionality for XspfTrack and XspfProps.

Definition at line 62 of file XspfData.h.

Constructor & Destructor Documentation

◆ XspfData() [1/2]

XspfData ( )
protected

Creates a new XspfData object.

◆ XspfData() [2/2]

XspfData ( XspfData const &  source)
protected

Copy constructor.

Parameters
sourceSource to copy from

◆ ~XspfData()

virtual ~XspfData ( )
protectedvirtual

Destroys this XspfData object and deletes all memory associated with it that has not been stolen before.

Member Function Documentation

◆ getAnnotation()

XML_Char const* getAnnotation ( ) const

Returns the annotation property.

Returns
Annotation, can be NULL

◆ getCreator()

XML_Char const* getCreator ( ) const

Returns the creator property.

Returns
Creator, can be NULL

◆ getExtension()

XspfExtension const* getExtension ( int  index) const

Gets a specific extension from the list. If the list is empty NULL is returned.

NOTE: The returned extension has to be deleted manually!

Returns
Specified extension, can be NULL

◆ getExtensionCount()

int getExtensionCount ( ) const

Returns the number of extensions.

Returns
Number of extensions

◆ getImage()

XML_Char const* getImage ( ) const

Returns the image property.

Returns
Image URI, can be NULL

◆ getInfo()

XML_Char const* getInfo ( ) const

Returns the info property.

Returns
Info URI, can be NULL

◆ getLink()

std::pair<XML_Char const *, XML_Char const *>* getLink ( int  index) const

Gets a specific link pair from the list. If the list is empty NULL is returned.

NOTE: The returned pair has to be deleted manually!

Returns
Specified link pair, can be NULL

◆ getLinkCount()

int getLinkCount ( ) const

Returns the number of link pairs.

Returns
Number of link pairs

◆ getMeta()

std::pair<XML_Char const *, XML_Char const *>* getMeta ( int  index) const

Gets a specific meta pair from the list. If the list is empty NULL is returned.

NOTE: The returned pair has to be deleted manually!

Returns
Specified meta pair, can be NULL

◆ getMetaCount()

int getMetaCount ( ) const

Returns the number of meta pairs.

Returns
Number of meta pairs

◆ getTitle()

XML_Char const* getTitle ( ) const

Returns the title property.

Returns
Title, can be NULL

◆ giveAnnotation()

void giveAnnotation ( XML_Char const *  annotation,
bool  copy 
)

Overwrites the annotation property. If copy is true the string will be copied, otherwise just assigned. In both cases the associated memory will be deleted on object destruction.

Parameters
annotationAnnotation string to set
copyCopy flag

◆ giveAppendExtension()

void giveAppendExtension ( XspfExtension const *  extension,
bool  copy 
)

Appends an extension to the extension list.

Parameters
extensionExtension to append
copyCopy flag

◆ giveAppendLink()

void giveAppendLink ( XML_Char const *  rel,
bool  copyRel,
XML_Char const *  content,
bool  copyContent 
)

Appends a link to the link list.

Parameters
relLink rel to append
copyRelRel copy flag
contentLink content to append
copyContentContent copy flag

◆ giveAppendMeta()

void giveAppendMeta ( XML_Char const *  rel,
bool  copyRel,
XML_Char const *  content,
bool  copyContent 
)

Appends a meta to the meta list.

Parameters
relMeta rel to append
copyRelRel copy flag
contentMeta content to append
copyContentContent copy flag

◆ giveCreator()

void giveCreator ( XML_Char const *  creator,
bool  copy 
)

Overwrites the creator property. If copy is true the string will be copied, otherwise just assigned. In both cases the associated memory will be deleted on object destruction.

Parameters
creatorCreator string to set
copyCopy flag

◆ giveImage()

void giveImage ( XML_Char const *  image,
bool  copy 
)

Overwrites the image property. If copy is true the string will be copied, otherwise just assigned. In both cases the associated memory will be deleted on object destruction.

Parameters
imageImage string to set
copyCopy flag

◆ giveInfo()

void giveInfo ( XML_Char const *  info,
bool  copy 
)

Overwrites the info property. If copy is true the string will be copied, otherwise just assigned. In both cases the associated memory will be deleted on object destruction.

Parameters
infoInfo string to set
copyCopy flag

◆ giveTitle()

void giveTitle ( XML_Char const *  title,
bool  copy 
)

Overwrites the title property. If copy is true the string will be copied, otherwise just assigned. In both cases the associated memory will be deleted on object destruction.

Parameters
titleTitle string to set
copyCopy flag

◆ lendAnnotation()

void lendAnnotation ( XML_Char const *  annotation)

Overwrites the annotation property. The string is only assigned not copied. The ownership is not transferred.

Parameters
annotationAnnotation string to set

◆ lendAppendExtension()

void lendAppendExtension ( XspfExtension extension)

Appends an extension to the extension list. The associated memory is neither copied nor deleted on onject destruction.

Parameters
extensionExtension to append

◆ lendAppendLink()

void lendAppendLink ( XML_Char const *  rel,
XML_Char const *  content 
)

Appends a link pair to the link list. The associated memory is neither copied nor deleted on onject destruction.

Parameters
relLink rel to append
contentLink content to append

◆ lendAppendMeta()

void lendAppendMeta ( XML_Char const *  rel,
XML_Char const *  content 
)

Appends a meta pair to the meta list. The associated memory is neither copied nor deleted on onject destruction.

Parameters
relMeta rel to append
contentMeta content to append

◆ lendCreator()

void lendCreator ( XML_Char const *  creator)

Overwrites the creator property. The string is only assigned not copied. The ownership is not transferred.

Parameters
creatorCreator string to set

◆ lendImage()

void lendImage ( XML_Char const *  image)

Overwrites the image property. The string is only assigned not copied. The ownership is not transferred.

Parameters
imageImage string to set

◆ lendInfo()

void lendInfo ( XML_Char const *  info)

Overwrites the info property. The string is only assigned not copied. The ownership is not transferred.

Parameters
infoInfo string to set

◆ lendTitle()

void lendTitle ( XML_Char const *  title)

Overwrites the title property. The string is only assigned not copied. The ownership is not transferred.

Parameters
titleTitle string to set

◆ operator=()

XspfData& operator= ( XspfData const &  source)
protected

Assignment operator.

Parameters
sourceSource to copy from

◆ stealAnnotation()

XML_Char* stealAnnotation ( )

Steals the annotation property.

Returns
Annotation, can be NULL

◆ stealCreator()

XML_Char* stealCreator ( )

Steals the creator property.

Returns
Creator, can be NULL

◆ stealFirstExtension()

XspfExtension* stealFirstExtension ( )

Steals the extension from the list. If the list is empty NULL is returned.

NOTE: Do not forget to delete the extension!

Returns
First extension, can be NULL

◆ stealFirstLink()

std::pair<XML_Char *, XML_Char *>* stealFirstLink ( )

Steals the first link pair from the list. If the list is empty NULL is returned.

NOTE: Do not forget to delete the pair!

Returns
First link pair, can be NULL

◆ stealFirstMeta()

std::pair<XML_Char *, XML_Char *>* stealFirstMeta ( )

Steals the first meta pair from the list. If the list is empty NULL is returned.

NOTE: Do not forget to delete the pair!

Returns
First meta pair, can be NULL

◆ stealHelper()

static XML_Char* stealHelper ( XML_Char const *&  property,
bool  own 
)
staticprotected

Steals a property. If the property's memory is not owned a clone is returned. In any case you own the memory return and have to delete it.

Parameters
propertyProperty to steal
ownOwner flag
Returns
Stolen property value, can be NULL

◆ stealImage()

XML_Char* stealImage ( )

Steals the image property.

Returns
Image URI, can be NULL

◆ stealInfo()

XML_Char* stealInfo ( )

Steals the info property.

Returns
Info URI, can be NULL

◆ stealTitle()

XML_Char* stealTitle ( )

Steals the title property.

Returns
Title, can be NULL

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