Album subsystem


Enumerations

enum  sp_albumtype {
  SP_ALBUMTYPE_ALBUM = 0,
  SP_ALBUMTYPE_SINGLE = 1,
  SP_ALBUMTYPE_COMPILATION = 2,
  SP_ALBUMTYPE_UNKNOWN = 3
}

Functions

bool sp_album_is_loaded (sp_album *album)
bool sp_album_is_available (sp_album *album)
sp_artistsp_album_artist (sp_album *album)
const byte * sp_album_cover (sp_album *album)
const char * sp_album_name (sp_album *album)
int sp_album_year (sp_album *album)
sp_albumtype sp_album_type (sp_album *album)
void sp_album_add_ref (sp_album *album)
void sp_album_release (sp_album *album)

Enumeration Type Documentation

Album types

Enumerator:
SP_ALBUMTYPE_ALBUM  Normal album.
SP_ALBUMTYPE_SINGLE  Single.
SP_ALBUMTYPE_COMPILATION  Compilation.
SP_ALBUMTYPE_UNKNOWN  Unknown type.


Function Documentation

void sp_album_add_ref ( sp_album album  ) 

Increase the reference count of an album

Parameters:
[in] album The album object

sp_artist* sp_album_artist ( sp_album album  ) 

Get the artist associated with the given album

Parameters:
[in] album Album object
Returns:
A reference to the artist. NULL if the metadata has not been loaded yet

const byte* sp_album_cover ( sp_album album  ) 

Return image ID representing the album's coverart.

Parameters:
[in] album Album object
Returns:
ID byte sequence that can be passed to sp_image_create() If the album has no image or the metadata for the album is not loaded yet, this function returns NULL.
See also:
sp_image_create
Examples:
track.c.

bool sp_album_is_available ( sp_album album  ) 

Return true if the album is available in the current region.

Parameters:
[in] album The album
Returns:
True if album is available for playback, otherwise false.
Note:
The album must be loaded or this function will always return false.
See also:
sp_album_is_loaded()

bool sp_album_is_loaded ( sp_album album  ) 

Check if the album object is populated with data

Parameters:
[in] album Album object
Returns:
True if metadata is present, false if not
Examples:
track.c.

const char* sp_album_name ( sp_album album  ) 

Return name of album

Parameters:
[in] album Album object
Returns:
Name of album. Returned string is valid as long as the album object stays allocated and no longer than the next call to sp_session_process_events()
Examples:
browse.c, and search.c.

void sp_album_release ( sp_album album  ) 

Decrease the reference count of an album

Parameters:
[in] album The album object

sp_albumtype sp_album_type ( sp_album album  ) 

Return type of specified album

Parameters:
[in] album Album object
Returns:
sp_albumtype

int sp_album_year ( sp_album album  ) 

Return release year of specified album

Parameters:
[in] album Album object
Returns:
Release year
Examples:
browse.c, and search.c.


Generated on Fri Dec 11 14:32:24 2009.
Copyright © 2006–2009 Spotify Ltd