libxspf  1.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Friends
XspfTrack Class Reference

#include <XspfTrack.h>

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

List of all members.

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

Friends

class XspfTrackPrivate

Detailed Description

Represents an XSPF track without extensions.

Definition at line 61 of file XspfTrack.h.


Constructor & Destructor Documentation

XspfTrack ( )

Creates a new, blank track.

XspfTrack ( XspfTrack const &  source)

Copy constructor.

Parameters:
sourceSource to copy from
~XspfTrack ( )

Deletes all memory that has not been stolen before.


Member Function Documentation

XML_Char const* getAlbum ( ) const

Returns the album property.

Returns:
Album, can be NULL
int getDuration ( ) const

Returns the duration property. Durations are measured in milliseconds.

Returns:
Duration, zero-based, -1 if unknown
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
int getIdentifierCount ( ) const

Returns the number of identifiers.

Returns:
Number of identifiers
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
int getLocationCount ( ) const

Returns the number of locations.

Returns:
Number of locations
int getTrackNum ( ) const

Returns the track number property.

Returns:
Track number, one-based, -1 if unknown
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
void giveAppendIdentifier ( XML_Char const *  identifier,
bool  copy 
)

Appends an identifier to the identifier list.

Parameters:
identifierIdentifier to append
copyCopy flag
void giveAppendLocation ( XML_Char const *  location,
bool  copy 
)

Appends an location to the location list.

Parameters:
locationLocation to append
copyCopy flag
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
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
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
XspfTrack& operator= ( XspfTrack const &  source)

Assignment operator.

Parameters:
sourceSource to copy from
void setDuration ( int  duration)

Overwrites the duration property. Durations are in milliseconds.

Parameters:
durationDuration to set
void setTrackNum ( int  trackNum)

Overwrites the track number property.

Parameters:
trackNumTrack number to set
XML_Char* stealAlbum ( )

Steals the album property.

Returns:
Album, can be NULL
XML_Char* stealFirstIdentifier ( )

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

Returns:
First identifier, can be NULL
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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines