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

#include <XspfProps.h>

Inheritance diagram for XspfProps:
Inheritance graph
[legend]
Collaboration diagram for XspfProps:
Collaboration graph
[legend]

Public Member Functions

 XspfProps ()
 
 XspfProps (XspfProps const &source)
 
XspfPropsoperator= (XspfProps const &source)
 
 ~XspfProps ()
 
void giveIdentifier (XML_Char const *identifier, bool copy)
 
void giveLicense (XML_Char const *license, bool copy)
 
void giveLocation (XML_Char const *location, bool copy)
 
void giveAppendAttributionIdentifier (XML_Char const *identifier, bool copy)
 
void giveAppendAttributionLocation (XML_Char const *location, bool copy)
 
void giveDate (XspfDateTime const *date, bool copy)
 
void lendIdentifier (XML_Char const *identifier)
 
void lendLicense (XML_Char const *license)
 
void lendLocation (XML_Char const *location)
 
void lendAppendAttributionIdentifier (XML_Char const *identifier)
 
void lendAppendAttributionLocation (XML_Char const *location)
 
void lendDate (XspfDateTime const *date)
 
void setVersion (int version)
 
XML_Char * stealLicense ()
 
XML_Char * stealLocation ()
 
XML_Char * stealIdentifier ()
 
std::pair< bool, XML_Char * > * stealFirstAttribution ()
 
XspfDateTimestealDate ()
 
XML_Char const * getLicense () const
 
XML_Char const * getLocation () const
 
XML_Char const * getIdentifier () const
 
std::pair< bool, XML_Char const * > * getAttribution (int index) const
 
int getAttributionCount () const
 
XspfDateTime const * getDate () const
 
int getVersion () const
 
- Public Member Functions inherited from XspfData
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
 

Friends

class XspfPropsPrivate
 

Additional Inherited Members

- Static Public Attributes inherited from XspfData
static bool const COPY
 Memory is copied.
 
static bool const TRANSFER
 Memory ownership is transfered.
 
- Protected Member Functions inherited from XspfData
 XspfData ()
 
 XspfData (XspfData const &source)
 
XspfDataoperator= (XspfData const &source)
 
virtual ~XspfData ()
 
- Static Protected Member Functions inherited from XspfData
static XML_Char * stealHelper (XML_Char const *&property, bool own)
 

Detailed Description

Represents the properties of playlist without extensions. This includes all information except the track list.

Definition at line 64 of file XspfProps.h.

Constructor & Destructor Documentation

◆ XspfProps() [1/2]

XspfProps ( )

Creates a new, blank playlist property package.

◆ XspfProps() [2/2]

XspfProps ( XspfProps const &  source)

Copy constructor.

Parameters
sourceSource to copy from

◆ ~XspfProps()

~XspfProps ( )

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

Member Function Documentation

◆ getAttribution()

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

Gets the specific attribution entry from the list. If the list is empty NULL is returned.

NOTE: The returned pair has to be deleted manually!

Returns
Specified attribution entry, can be NULL

◆ getAttributionCount()

int getAttributionCount ( ) const

Returns the number of attributions.

Returns
Number of attributions

◆ getDate()

XspfDateTime const* getDate ( ) const

Returns the date object property.

Returns
Date object, can be NULL

◆ getIdentifier()

XML_Char const* getIdentifier ( ) const

Returns the identifier property.

Returns
Identifier, can be NULL

◆ getLicense()

XML_Char const* getLicense ( ) const

Returns the license property.

Returns
License, can be NULL

◆ getLocation()

XML_Char const* getLocation ( ) const

Returns the location property.

Returns
Location, can be NULL

◆ getVersion()

int getVersion ( ) const

Returns the XSPF version property.

Returns
XSPF version (0 or 1)

◆ giveAppendAttributionIdentifier()

void giveAppendAttributionIdentifier ( XML_Char const *  identifier,
bool  copy 
)

Appends an identifier to the attribution list.

Parameters
identifierIdentifier to append
copyCopy flag

◆ giveAppendAttributionLocation()

void giveAppendAttributionLocation ( XML_Char const *  location,
bool  copy 
)

Appends an location to the attribution list.

Parameters
locationLocation to append
copyCopy flag

◆ giveDate()

void giveDate ( XspfDateTime const *  date,
bool  copy 
)

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

Parameters
dateDate object to set
copyCopy flag

◆ giveIdentifier()

void giveIdentifier ( XML_Char const *  identifier,
bool  copy 
)

Overwrites the identifier 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
identifierIdentifier string to set
copyCopy flag

◆ giveLicense()

void giveLicense ( XML_Char const *  license,
bool  copy 
)

Overwrites the license 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
licenseLicense string to set
copyCopy flag

◆ giveLocation()

void giveLocation ( XML_Char const *  location,
bool  copy 
)

Overwrites the location 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
locationLocation string to set
copyCopy flag

◆ lendAppendAttributionIdentifier()

void lendAppendAttributionIdentifier ( XML_Char const *  identifier)

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

Parameters
identifierIdentifier to append

◆ lendAppendAttributionLocation()

void lendAppendAttributionLocation ( XML_Char const *  location)

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

Parameters
locationLocation to append

◆ lendDate()

void lendDate ( XspfDateTime const *  date)

Overwrites the date property. The date object is only assigned not copied. The ownership is not transferred.

Parameters
dateDate object to set

◆ lendIdentifier()

void lendIdentifier ( XML_Char const *  identifier)

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

Parameters
identifierIdentifier string to set

◆ lendLicense()

void lendLicense ( XML_Char const *  license)

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

Parameters
licenseLicense string to set

◆ lendLocation()

void lendLocation ( XML_Char const *  location)

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

Parameters
locationLocation string to set

◆ operator=()

XspfProps& operator= ( XspfProps const &  source)

Assignment operator.

Parameters
sourceSource to copy from

◆ setVersion()

void setVersion ( int  version)

Overwrites the XSPF version property.

Parameters
versionXSPF version (0 or 1)

◆ stealDate()

XspfDateTime* stealDate ( )

Steals the date object property.

Returns
Date object, can be NULL

◆ stealFirstAttribution()

std::pair<bool, XML_Char *>* stealFirstAttribution ( )

Steals the first attribution entry from the list. If the list is empty NULL is returned.

NOTE: Do not forget to delete the pair!

Returns
First attribution entry, can be NULL

◆ stealIdentifier()

XML_Char* stealIdentifier ( )

Steals the identifier property.

Returns
Identifier URI, can be NULL

◆ stealLicense()

XML_Char* stealLicense ( )

Steals the license property.

Returns
License URI, can be NULL

◆ stealLocation()

XML_Char* stealLocation ( )

Steals the location property.

Returns
Location URI, can be NULL

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