libspotify
|
Enumerations | |
enum | sp_linktype { SP_LINKTYPE_INVALID = 0, SP_LINKTYPE_TRACK = 1, SP_LINKTYPE_ALBUM = 2, SP_LINKTYPE_ARTIST = 3, SP_LINKTYPE_SEARCH = 4, SP_LINKTYPE_PLAYLIST = 5, SP_LINKTYPE_PROFILE = 6, SP_LINKTYPE_STARRED = 7, SP_LINKTYPE_LOCALTRACK = 8, SP_LINKTYPE_IMAGE = 9 } |
These functions handle links to Spotify entities in a way that allows you to not care about the textual representation of the link.
enum sp_linktype |
Link types
Increase the reference count of a link
[in] | link | The link object |
The album representation for the given link
[in] | link | The Spotify link whose album you are interested in |
The artist representation for the given link
[in] | link | The Spotify link whose artist you are interested in |
int sp_link_as_string | ( | sp_link * | link, |
char * | buffer, | ||
int | buffer_size | ||
) |
Create a string representation of the given Spotify link
[in] | link | The Spotify link whose string representation you are interested in |
[out] | buffer | The buffer to hold the string representation of link |
[in] | buffer_size | The max size of the buffer that will hold the string representation The resulting string is guaranteed to always be null terminated if buffer_size > 0 |
buffer_size
, output was truncated. The track representation for the given link
[in] | link | The Spotify link whose track you are interested in |
The track and offset into track representation for the given link
[in] | link | The Spotify link whose track you are interested in |
[out] | offset | Pointer to offset into track (in milliseconds). If the link does not contain an offset this will be set to 0. |
The user representation for the given link
[in] | link | The Spotify link whose user you are interested in |
Create a link object from an album
[in] | album | An album object |
sp_link* sp_link_create_from_album_cover | ( | sp_album * | album, |
sp_image_size | size | ||
) |
Create an image link object from an album
[in] | album | An album object |
[in] | size | The desired size of the image |
Creates a link object from an artist
[in] | artist | An artist object |
sp_link* sp_link_create_from_artist_portrait | ( | sp_artist * | artist, |
sp_image_size | size | ||
) |
Creates a link object pointing to an artist portrait
[in] | artist | Artist browse object |
[in] | size | The desired size of the image |
sp_link* sp_link_create_from_artistbrowse_portrait | ( | sp_artistbrowse * | arb, |
int | index | ||
) |
Creates a link object from an artist portrait
[in] | arb | Artist browse object |
[in] | index | The index of the portrait. Should be in the interval [0, sp_artistbrowse_num_portraits() - 1] |
Create a link object representing the given image
[in] | image | Image object |
sp_link* sp_link_create_from_playlist | ( | sp_playlist * | playlist | ) |
Create a link object representing the given playlist
[in] | playlist | Playlist object |
Generate a link object representing the current search
[in] | search | Search object |
sp_link* sp_link_create_from_string | ( | const char * | link | ) |
Create a Spotify link given a string
[in] | link | A string representation of a Spotify link |
Generates a link object from a track
[in] | track | A track object |
[in] | offset | Offset in track in ms. |
Create a link object representing the given playlist
[in] | user | User object |
sp_linktype sp_link_type | ( | sp_link * | link | ) |
The link type of the specified link
[in] | link | The Spotify link whose type you are interested in |