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

#include <XspfTrack.h>

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

Public Member Functions

 XspfTrack ()
 
 XspfTrack (XspfTrack const &source)
 
XspfTrackoperator= (XspfTrack const &source)
 
 ~XspfTrack ()
 
void giveAlbum (XML_Char const *album, bool copy)
 
void giveAppendIdentifier (XML_Char const *identifier, bool copy)
 
void giveAppendLocation (XML_Char const *location, bool copy)
 
void lendAlbum (XML_Char const *album)
 
void lendAppendLocation (XML_Char const *location)
 
void lendAppendIdentifier (XML_Char const *identifier)
 
void setTrackNum (int trackNum)
 
void setDuration (int duration)
 
XML_Char * stealAlbum ()
 
XML_Char * stealFirstIdentifier ()
 
XML_Char * stealFirstLocation ()
 
XML_Char const * getAlbum () const
 
XML_Char const * getIdentifier (int index) const
 
XML_Char const * getLocation (int index) const
 
int getIdentifierCount () const
 
int getLocationCount () const
 
int getDuration () const
 
int getTrackNum () 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 XspfTrackPrivate
 

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 an XSPF track without extensions.

Definition at line 61 of file XspfTrack.h.

Constructor & Destructor Documentation

◆ XspfTrack() [1/2]

XspfTrack ( )

Creates a new, blank track.

◆ XspfTrack() [2/2]

XspfTrack ( XspfTrack const &  source)

Copy constructor.

Parameters
sourceSource to copy from

◆ ~XspfTrack()

~XspfTrack ( )

Deletes all memory that has not been stolen before.

Member Function Documentation

◆ getAlbum()

XML_Char const* getAlbum ( ) const

Returns the album property.

Returns
Album, can be NULL

◆ getDuration()

int getDuration ( ) const

Returns the duration property. Durations are measured in milliseconds.

Returns
Duration, zero-based, -1 if unknown

◆ getIdentifier()

XML_Char const* getIdentifier ( int  index) const

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

Returns
Specified identifier, can be NULL

◆ getIdentifierCount()

int getIdentifierCount ( ) const

Returns the number of identifiers.

Returns
Number of identifiers

◆ getLocation()

XML_Char const* getLocation ( int  index) const

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

Returns
Specified location, can be NULL

◆ getLocationCount()

int getLocationCount ( ) const

Returns the number of locations.

Returns
Number of locations

◆ getTrackNum()

int getTrackNum ( ) const

Returns the track number property.

Returns
Track number, one-based, -1 if unknown

◆ giveAlbum()

void giveAlbum ( XML_Char const *  album,
bool  copy 
)

Overwrites the album 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
albumAlbum string to set
copyCopy flag

◆ giveAppendIdentifier()

void giveAppendIdentifier ( XML_Char const *  identifier,
bool  copy 
)

Appends an identifier to the identifier list.

Parameters
identifierIdentifier to append
copyCopy flag

◆ giveAppendLocation()

void giveAppendLocation ( XML_Char const *  location,
bool  copy 
)

Appends an location to the location list.

Parameters
locationLocation to append
copyCopy flag

◆ lendAlbum()

void lendAlbum ( XML_Char const *  album)

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

Parameters
albumAlbum string to set

◆ lendAppendIdentifier()

void lendAppendIdentifier ( XML_Char const *  identifier)

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

Parameters
identifierIdentifier to append

◆ lendAppendLocation()

void lendAppendLocation ( XML_Char const *  location)

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

Parameters
locationLocation to append

◆ operator=()

XspfTrack& operator= ( XspfTrack const &  source)

Assignment operator.

Parameters
sourceSource to copy from

◆ setDuration()

void setDuration ( int  duration)

Overwrites the duration property. Durations are in milliseconds.

Parameters
durationDuration to set

◆ setTrackNum()

void setTrackNum ( int  trackNum)

Overwrites the track number property.

Parameters
trackNumTrack number to set

◆ stealAlbum()

XML_Char* stealAlbum ( )

Steals the album property.

Returns
Album, can be NULL

◆ stealFirstIdentifier()

XML_Char* stealFirstIdentifier ( )

Steals the first identifier from the list. If the list is empty NULL is returned.

Returns
First identifier, can be NULL

◆ stealFirstLocation()

XML_Char* stealFirstLocation ( )

Steals the first location from the list. If the list is empty NULL is returned.

Returns
First location, can be NULL

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