Enumerations | Functions

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, sp_image_size size)
const char * sp_album_name (sp_album *album)
int sp_album_year (sp_album *album)
sp_albumtype sp_album_type (sp_album *album)
sp_error sp_album_add_ref (sp_album *album)
sp_error 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

sp_error sp_album_add_ref ( sp_album album  ) 

Increase the reference count of an album

Parameters:
[in] album The album object
Returns:
One of the following errors, from sp_error SP_ERROR_OK
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
Examples:
toplist.c.
const byte* sp_album_cover ( sp_album album,
sp_image_size  size 
)

Return image ID representing the album's coverart.

Parameters:
[in] album Album object
[in] size The desired size of the image
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
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
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, search.c, and toplist.c.
sp_error sp_album_release ( sp_album album  ) 

Decrease the reference count of an album

Parameters:
[in] album The album object
Returns:
One of the following errors, from sp_error SP_ERROR_OK
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 Wed Jun 13 2012 14:22:40.
Copyright © 2006–2012 Spotify Ltd