Data Structures | Defines | Typedefs | Enumerations | Functions

api.h File Reference

#include <stddef.h>
#include <stdint.h>

Data Structures

struct  sp_audioformat
struct  sp_audio_buffer_stats
struct  sp_subscribers
struct  sp_offline_sync_status
struct  sp_session_callbacks
struct  sp_session_config
struct  sp_playlist_callbacks
struct  sp_playlistcontainer_callbacks

Defines

#define SPOTIFY_API_VERSION   12
#define SP_TOPLIST_REGION(a, b)   ((a) << 8 | (b))

Typedefs

typedef struct sp_session sp_session
 Representation of a session.
typedef struct sp_track sp_track
 A track handle.
typedef struct sp_album sp_album
 An album handle.
typedef struct sp_artist sp_artist
 An artist handle.
typedef struct sp_artistbrowse sp_artistbrowse
 A handle to an artist browse result.
typedef struct sp_albumbrowse sp_albumbrowse
 A handle to an album browse result.
typedef struct sp_toplistbrowse sp_toplistbrowse
 A handle to a toplist browse result.
typedef struct sp_search sp_search
 A handle to a search result.
typedef struct sp_link sp_link
 A handle to the libspotify internal representation of a URI.
typedef struct sp_image sp_image
 A handle to an image.
typedef struct sp_user sp_user
 A handle to a user.
typedef struct sp_playlist sp_playlist
 A playlist handle.
typedef struct sp_playlistcontainer sp_playlistcontainer
 A playlist container (playlist containing other playlists) handle.
typedef struct sp_inbox sp_inbox
 Add to inbox request handle.
typedef enum sp_error sp_error
typedef enum sp_connectionstate sp_connectionstate
typedef enum sp_sampletype sp_sampletype
typedef struct sp_audioformat sp_audioformat
typedef enum sp_bitrate sp_bitrate
typedef enum sp_playlist_type sp_playlist_type
typedef enum sp_search_type sp_search_type
typedef enum
sp_playlist_offline_status 
sp_playlist_offline_status
typedef enum sp_availability sp_track_availability
typedef enum
sp_track_offline_status 
sp_track_offline_status
typedef enum sp_image_size sp_image_size
typedef struct
sp_audio_buffer_stats 
sp_audio_buffer_stats
typedef struct sp_subscribers sp_subscribers
typedef enum sp_connection_type sp_connection_type
typedef enum sp_connection_rules sp_connection_rules
typedef enum sp_artistbrowse_type sp_artistbrowse_type
typedef struct
sp_offline_sync_status 
sp_offline_sync_status
typedef struct sp_session_callbacks sp_session_callbacks
typedef struct sp_session_config sp_session_config
typedef void albumbrowse_complete_cb (sp_albumbrowse *result, void *userdata)
typedef void artistbrowse_complete_cb (sp_artistbrowse *result, void *userdata)
typedef void image_loaded_cb (sp_image *image, void *userdata)
typedef void search_complete_cb (sp_search *result, void *userdata)
typedef struct
sp_playlist_callbacks 
sp_playlist_callbacks
typedef struct
sp_playlistcontainer_callbacks 
sp_playlistcontainer_callbacks
typedef enum sp_relation_type sp_relation_type
typedef void toplistbrowse_complete_cb (sp_toplistbrowse *result, void *userdata)
typedef void inboxpost_complete_cb (sp_inbox *result, void *userdata)

Enumerations

enum  sp_error {
  SP_ERROR_OK = 0,
  SP_ERROR_BAD_API_VERSION = 1,
  SP_ERROR_API_INITIALIZATION_FAILED = 2,
  SP_ERROR_TRACK_NOT_PLAYABLE = 3,
  SP_ERROR_BAD_APPLICATION_KEY = 5,
  SP_ERROR_BAD_USERNAME_OR_PASSWORD = 6,
  SP_ERROR_USER_BANNED = 7,
  SP_ERROR_UNABLE_TO_CONTACT_SERVER = 8,
  SP_ERROR_CLIENT_TOO_OLD = 9,
  SP_ERROR_OTHER_PERMANENT = 10,
  SP_ERROR_BAD_USER_AGENT = 11,
  SP_ERROR_MISSING_CALLBACK = 12,
  SP_ERROR_INVALID_INDATA = 13,
  SP_ERROR_INDEX_OUT_OF_RANGE = 14,
  SP_ERROR_USER_NEEDS_PREMIUM = 15,
  SP_ERROR_OTHER_TRANSIENT = 16,
  SP_ERROR_IS_LOADING = 17,
  SP_ERROR_NO_STREAM_AVAILABLE = 18,
  SP_ERROR_PERMISSION_DENIED = 19,
  SP_ERROR_INBOX_IS_FULL = 20,
  SP_ERROR_NO_CACHE = 21,
  SP_ERROR_NO_SUCH_USER = 22,
  SP_ERROR_NO_CREDENTIALS = 23,
  SP_ERROR_NETWORK_DISABLED = 24,
  SP_ERROR_INVALID_DEVICE_ID = 25,
  SP_ERROR_CANT_OPEN_TRACE_FILE = 26,
  SP_ERROR_APPLICATION_BANNED = 27,
  SP_ERROR_OFFLINE_TOO_MANY_TRACKS = 31,
  SP_ERROR_OFFLINE_DISK_CACHE = 32,
  SP_ERROR_OFFLINE_EXPIRED = 33,
  SP_ERROR_OFFLINE_NOT_ALLOWED = 34,
  SP_ERROR_OFFLINE_LICENSE_LOST = 35,
  SP_ERROR_OFFLINE_LICENSE_ERROR = 36,
  SP_ERROR_LASTFM_AUTH_ERROR = 39,
  SP_ERROR_INVALID_ARGUMENT = 40,
  SP_ERROR_SYSTEM_FAILURE = 41
}
enum  sp_connectionstate {
  SP_CONNECTION_STATE_LOGGED_OUT = 0,
  SP_CONNECTION_STATE_LOGGED_IN = 1,
  SP_CONNECTION_STATE_DISCONNECTED = 2,
  SP_CONNECTION_STATE_UNDEFINED = 3,
  SP_CONNECTION_STATE_OFFLINE = 4
}
enum  sp_sampletype { SP_SAMPLETYPE_INT16_NATIVE_ENDIAN = 0 }
enum  sp_bitrate {
  SP_BITRATE_160k = 0,
  SP_BITRATE_320k = 1,
  SP_BITRATE_96k = 2
}
enum  sp_playlist_type {
  SP_PLAYLIST_TYPE_PLAYLIST = 0,
  SP_PLAYLIST_TYPE_START_FOLDER = 1,
  SP_PLAYLIST_TYPE_END_FOLDER = 2,
  SP_PLAYLIST_TYPE_PLACEHOLDER = 3
}
enum  sp_search_type
enum  sp_playlist_offline_status {
  SP_PLAYLIST_OFFLINE_STATUS_NO = 0,
  SP_PLAYLIST_OFFLINE_STATUS_YES = 1,
  SP_PLAYLIST_OFFLINE_STATUS_DOWNLOADING = 2,
  SP_PLAYLIST_OFFLINE_STATUS_WAITING = 3
}
enum  sp_availability {
  SP_TRACK_AVAILABILITY_UNAVAILABLE = 0,
  SP_TRACK_AVAILABILITY_AVAILABLE = 1,
  SP_TRACK_AVAILABILITY_NOT_STREAMABLE = 2,
  SP_TRACK_AVAILABILITY_BANNED_BY_ARTIST = 3
}
enum  sp_track_offline_status {
  SP_TRACK_OFFLINE_NO = 0,
  SP_TRACK_OFFLINE_WAITING = 1,
  SP_TRACK_OFFLINE_DOWNLOADING = 2,
  SP_TRACK_OFFLINE_DONE = 3,
  SP_TRACK_OFFLINE_ERROR = 4,
  SP_TRACK_OFFLINE_DONE_EXPIRED = 5,
  SP_TRACK_OFFLINE_LIMIT_EXCEEDED = 6,
  SP_TRACK_OFFLINE_DONE_RESYNC = 7
}
enum  sp_image_size {
  SP_IMAGE_SIZE_NORMAL = 0,
  SP_IMAGE_SIZE_SMALL = 1,
  SP_IMAGE_SIZE_LARGE = 2
}
enum  sp_connection_type {
  SP_CONNECTION_TYPE_UNKNOWN = 0,
  SP_CONNECTION_TYPE_NONE = 1,
  SP_CONNECTION_TYPE_MOBILE = 2,
  SP_CONNECTION_TYPE_MOBILE_ROAMING = 3,
  SP_CONNECTION_TYPE_WIFI = 4,
  SP_CONNECTION_TYPE_WIRED = 5
}
enum  sp_connection_rules {
  SP_CONNECTION_RULE_NETWORK = 0x1,
  SP_CONNECTION_RULE_NETWORK_IF_ROAMING = 0x2,
  SP_CONNECTION_RULE_ALLOW_SYNC_OVER_MOBILE = 0x4,
  SP_CONNECTION_RULE_ALLOW_SYNC_OVER_WIFI = 0x8
}
enum  sp_artistbrowse_type {
  SP_ARTISTBROWSE_FULL,
  SP_ARTISTBROWSE_NO_TRACKS,
  SP_ARTISTBROWSE_NO_ALBUMS
}
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
}
enum  sp_albumtype {
  SP_ALBUMTYPE_ALBUM = 0,
  SP_ALBUMTYPE_SINGLE = 1,
  SP_ALBUMTYPE_COMPILATION = 2,
  SP_ALBUMTYPE_UNKNOWN = 3
}
enum  sp_imageformat {
  SP_IMAGE_FORMAT_UNKNOWN = -1,
  SP_IMAGE_FORMAT_JPEG = 0
}
enum  sp_relation_type {
  SP_RELATION_TYPE_UNKNOWN = 0,
  SP_RELATION_TYPE_NONE = 1,
  SP_RELATION_TYPE_UNIDIRECTIONAL = 2,
  SP_RELATION_TYPE_BIDIRECTIONAL = 3
}
enum  sp_toplisttype {
  SP_TOPLIST_TYPE_ARTISTS = 0,
  SP_TOPLIST_TYPE_ALBUMS = 1,
  SP_TOPLIST_TYPE_TRACKS = 2
}
enum  sp_toplistregion {
  SP_TOPLIST_REGION_EVERYWHERE = 0,
  SP_TOPLIST_REGION_USER = 1
}

Functions

const char * sp_error_message (sp_error error)
sp_error sp_session_create (const sp_session_config *config, sp_session **sess)
sp_error sp_session_release (sp_session *sess)
sp_error sp_session_login (sp_session *session, const char *username, const char *password, bool remember_me, const char *blob)
sp_error sp_session_relogin (sp_session *session)
int sp_session_remembered_user (sp_session *session, char *buffer, size_t buffer_size)
const char * sp_session_user_name (sp_session *session)
sp_error sp_session_forget_me (sp_session *session)
sp_usersp_session_user (sp_session *session)
sp_error sp_session_logout (sp_session *session)
sp_error sp_session_flush_caches (sp_session *session)
sp_connectionstate sp_session_connectionstate (sp_session *session)
void * sp_session_userdata (sp_session *session)
sp_error sp_session_set_cache_size (sp_session *session, size_t size)
sp_error sp_session_process_events (sp_session *session, int *next_timeout)
sp_error sp_session_player_load (sp_session *session, sp_track *track)
sp_error sp_session_player_seek (sp_session *session, int offset)
sp_error sp_session_player_play (sp_session *session, bool play)
sp_error sp_session_player_unload (sp_session *session)
sp_error sp_session_player_prefetch (sp_session *session, sp_track *track)
sp_playlistcontainersp_session_playlistcontainer (sp_session *session)
sp_playlistsp_session_inbox_create (sp_session *session)
sp_playlistsp_session_starred_create (sp_session *session)
sp_playlistsp_session_starred_for_user_create (sp_session *session, const char *canonical_username)
sp_playlistcontainersp_session_publishedcontainer_for_user_create (sp_session *session, const char *canonical_username)
sp_error sp_session_preferred_bitrate (sp_session *session, sp_bitrate bitrate)
sp_error sp_session_preferred_offline_bitrate (sp_session *session, sp_bitrate bitrate, bool allow_resync)
bool sp_session_get_volume_normalization (sp_session *session)
sp_error sp_session_set_volume_normalization (sp_session *session, bool on)
sp_error sp_session_set_private_session (sp_session *session, bool enabled)
bool sp_session_is_private_session (sp_session *session)
sp_error sp_session_set_scrobbling (sp_session *session, sp_social_provider provider, sp_scrobbling_state state)
sp_error sp_session_is_scrobbling (sp_session *session, sp_social_provider provider, sp_scrobbling_state *state)
sp_error sp_session_is_scrobbling_possible (sp_session *session, sp_social_provider provider, bool *out)
sp_error sp_session_set_social_credentials (sp_session *session, sp_social_provider provider, const char *username, const char *password)
sp_error sp_session_set_connection_type (sp_session *session, sp_connection_type type)
sp_error sp_session_set_connection_rules (sp_session *session, sp_connection_rules rules)
int sp_offline_tracks_to_sync (sp_session *session)
int sp_offline_num_playlists (sp_session *session)
bool sp_offline_sync_get_status (sp_session *session, sp_offline_sync_status *status)
int sp_offline_time_left (sp_session *session)
int sp_session_user_country (sp_session *session)
sp_linksp_link_create_from_string (const char *link)
sp_linksp_link_create_from_track (sp_track *track, int offset)
sp_linksp_link_create_from_album (sp_album *album)
sp_linksp_link_create_from_album_cover (sp_album *album, sp_image_size size)
sp_linksp_link_create_from_artist (sp_artist *artist)
sp_linksp_link_create_from_artist_portrait (sp_artist *artist, sp_image_size size)
sp_linksp_link_create_from_artistbrowse_portrait (sp_artistbrowse *arb, int index)
sp_linksp_link_create_from_search (sp_search *search)
sp_linksp_link_create_from_playlist (sp_playlist *playlist)
sp_linksp_link_create_from_user (sp_user *user)
sp_linksp_link_create_from_image (sp_image *image)
int sp_link_as_string (sp_link *link, char *buffer, int buffer_size)
sp_linktype sp_link_type (sp_link *link)
sp_tracksp_link_as_track (sp_link *link)
sp_tracksp_link_as_track_and_offset (sp_link *link, int *offset)
sp_albumsp_link_as_album (sp_link *link)
sp_artistsp_link_as_artist (sp_link *link)
sp_usersp_link_as_user (sp_link *link)
sp_error sp_link_add_ref (sp_link *link)
sp_error sp_link_release (sp_link *link)
bool sp_track_is_loaded (sp_track *track)
sp_error sp_track_error (sp_track *track)
sp_track_offline_status sp_track_offline_get_status (sp_track *track)
sp_track_availability sp_track_get_availability (sp_session *session, sp_track *track)
bool sp_track_is_local (sp_session *session, sp_track *track)
bool sp_track_is_autolinked (sp_session *session, sp_track *track)
sp_tracksp_track_get_playable (sp_session *session, sp_track *track)
bool sp_track_is_placeholder (sp_track *track)
bool sp_track_is_starred (sp_session *session, sp_track *track)
sp_error sp_track_set_starred (sp_session *session, sp_track *const *tracks, int num_tracks, bool star)
int sp_track_num_artists (sp_track *track)
sp_artistsp_track_artist (sp_track *track, int index)
sp_albumsp_track_album (sp_track *track)
const char * sp_track_name (sp_track *track)
int sp_track_duration (sp_track *track)
int sp_track_popularity (sp_track *track)
int sp_track_disc (sp_track *track)
int sp_track_index (sp_track *track)
sp_tracksp_localtrack_create (const char *artist, const char *title, const char *album, int length)
sp_error sp_track_add_ref (sp_track *track)
sp_error sp_track_release (sp_track *track)
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)
const char * sp_artist_name (sp_artist *artist)
bool sp_artist_is_loaded (sp_artist *artist)
const byte * sp_artist_portrait (sp_artist *artist, sp_image_size size)
sp_error sp_artist_add_ref (sp_artist *artist)
sp_error sp_artist_release (sp_artist *artist)
sp_albumbrowsesp_albumbrowse_create (sp_session *session, sp_album *album, albumbrowse_complete_cb *callback, void *userdata)
bool sp_albumbrowse_is_loaded (sp_albumbrowse *alb)
sp_error sp_albumbrowse_error (sp_albumbrowse *alb)
sp_albumsp_albumbrowse_album (sp_albumbrowse *alb)
sp_artistsp_albumbrowse_artist (sp_albumbrowse *alb)
int sp_albumbrowse_num_copyrights (sp_albumbrowse *alb)
const char * sp_albumbrowse_copyright (sp_albumbrowse *alb, int index)
int sp_albumbrowse_num_tracks (sp_albumbrowse *alb)
sp_tracksp_albumbrowse_track (sp_albumbrowse *alb, int index)
const char * sp_albumbrowse_review (sp_albumbrowse *alb)
int sp_albumbrowse_backend_request_duration (sp_albumbrowse *alb)
sp_error sp_albumbrowse_add_ref (sp_albumbrowse *alb)
sp_error sp_albumbrowse_release (sp_albumbrowse *alb)
sp_artistbrowsesp_artistbrowse_create (sp_session *session, sp_artist *artist, sp_artistbrowse_type type, artistbrowse_complete_cb *callback, void *userdata)
bool sp_artistbrowse_is_loaded (sp_artistbrowse *arb)
sp_error sp_artistbrowse_error (sp_artistbrowse *arb)
sp_artistsp_artistbrowse_artist (sp_artistbrowse *arb)
int sp_artistbrowse_num_portraits (sp_artistbrowse *arb)
const byte * sp_artistbrowse_portrait (sp_artistbrowse *arb, int index)
int sp_artistbrowse_num_tracks (sp_artistbrowse *arb)
sp_tracksp_artistbrowse_track (sp_artistbrowse *arb, int index)
int sp_artistbrowse_num_tophit_tracks (sp_artistbrowse *arb)
sp_tracksp_artistbrowse_tophit_track (sp_artistbrowse *arb, int index)
int sp_artistbrowse_num_albums (sp_artistbrowse *arb)
sp_albumsp_artistbrowse_album (sp_artistbrowse *arb, int index)
int sp_artistbrowse_num_similar_artists (sp_artistbrowse *arb)
sp_artistsp_artistbrowse_similar_artist (sp_artistbrowse *arb, int index)
const char * sp_artistbrowse_biography (sp_artistbrowse *arb)
int sp_artistbrowse_backend_request_duration (sp_artistbrowse *arb)
sp_error sp_artistbrowse_add_ref (sp_artistbrowse *arb)
sp_error sp_artistbrowse_release (sp_artistbrowse *arb)
sp_imagesp_image_create (sp_session *session, const byte image_id[20])
sp_imagesp_image_create_from_link (sp_session *session, sp_link *l)
sp_error sp_image_add_load_callback (sp_image *image, image_loaded_cb *callback, void *userdata)
sp_error sp_image_remove_load_callback (sp_image *image, image_loaded_cb *callback, void *userdata)
bool sp_image_is_loaded (sp_image *image)
sp_error sp_image_error (sp_image *image)
sp_imageformat sp_image_format (sp_image *image)
const void * sp_image_data (sp_image *image, size_t *data_size)
const byte * sp_image_image_id (sp_image *image)
sp_error sp_image_add_ref (sp_image *image)
sp_error sp_image_release (sp_image *image)
sp_searchsp_search_create (sp_session *session, const char *query, int track_offset, int track_count, int album_offset, int album_count, int artist_offset, int artist_count, int playlist_offset, int playlist_count, sp_search_type search_type, search_complete_cb *callback, void *userdata)
bool sp_search_is_loaded (sp_search *search)
sp_error sp_search_error (sp_search *search)
int sp_search_num_tracks (sp_search *search)
sp_tracksp_search_track (sp_search *search, int index)
int sp_search_num_albums (sp_search *search)
sp_albumsp_search_album (sp_search *search, int index)
int sp_search_num_playlists (sp_search *search)
const char * sp_search_playlist_name (sp_search *search, int index)
const char * sp_search_playlist_uri (sp_search *search, int index)
const char * sp_search_playlist_image_uri (sp_search *search, int index)
int sp_search_num_artists (sp_search *search)
sp_artistsp_search_artist (sp_search *search, int index)
const char * sp_search_query (sp_search *search)
const char * sp_search_did_you_mean (sp_search *search)
int sp_search_total_tracks (sp_search *search)
int sp_search_total_albums (sp_search *search)
int sp_search_total_artists (sp_search *search)
int sp_search_total_playlists (sp_search *search)
sp_error sp_search_add_ref (sp_search *search)
sp_error sp_search_release (sp_search *search)
bool sp_playlist_is_loaded (sp_playlist *playlist)
sp_error sp_playlist_add_callbacks (sp_playlist *playlist, sp_playlist_callbacks *callbacks, void *userdata)
sp_error sp_playlist_remove_callbacks (sp_playlist *playlist, sp_playlist_callbacks *callbacks, void *userdata)
int sp_playlist_num_tracks (sp_playlist *playlist)
sp_tracksp_playlist_track (sp_playlist *playlist, int index)
int sp_playlist_track_create_time (sp_playlist *playlist, int index)
sp_usersp_playlist_track_creator (sp_playlist *playlist, int index)
bool sp_playlist_track_seen (sp_playlist *playlist, int index)
sp_error sp_playlist_track_set_seen (sp_playlist *playlist, int index, bool seen)
const char * sp_playlist_track_message (sp_playlist *playlist, int index)
const char * sp_playlist_name (sp_playlist *playlist)
sp_error sp_playlist_rename (sp_playlist *playlist, const char *new_name)
sp_usersp_playlist_owner (sp_playlist *playlist)
bool sp_playlist_is_collaborative (sp_playlist *playlist)
sp_error sp_playlist_set_collaborative (sp_playlist *playlist, bool collaborative)
sp_error sp_playlist_set_autolink_tracks (sp_playlist *playlist, bool link)
const char * sp_playlist_get_description (sp_playlist *playlist)
bool sp_playlist_get_image (sp_playlist *playlist, byte image[20])
bool sp_playlist_has_pending_changes (sp_playlist *playlist)
sp_error sp_playlist_add_tracks (sp_playlist *playlist, sp_track *const *tracks, int num_tracks, int position, sp_session *session)
sp_error sp_playlist_remove_tracks (sp_playlist *playlist, const int *tracks, int num_tracks)
sp_error sp_playlist_reorder_tracks (sp_playlist *playlist, const int *tracks, int num_tracks, int new_position)
unsigned int sp_playlist_num_subscribers (sp_playlist *playlist)
sp_subscriberssp_playlist_subscribers (sp_playlist *playlist)
sp_error sp_playlist_subscribers_free (sp_subscribers *subscribers)
sp_error sp_playlist_update_subscribers (sp_session *session, sp_playlist *playlist)
bool sp_playlist_is_in_ram (sp_session *session, sp_playlist *playlist)
sp_error sp_playlist_set_in_ram (sp_session *session, sp_playlist *playlist, bool in_ram)
sp_playlistsp_playlist_create (sp_session *session, sp_link *link)
sp_error sp_playlist_set_offline_mode (sp_session *session, sp_playlist *playlist, bool offline)
sp_playlist_offline_status sp_playlist_get_offline_status (sp_session *session, sp_playlist *playlist)
int sp_playlist_get_offline_download_completed (sp_session *session, sp_playlist *playlist)
sp_error sp_playlist_add_ref (sp_playlist *playlist)
sp_error sp_playlist_release (sp_playlist *playlist)
sp_error sp_playlistcontainer_add_callbacks (sp_playlistcontainer *pc, sp_playlistcontainer_callbacks *callbacks, void *userdata)
sp_error sp_playlistcontainer_remove_callbacks (sp_playlistcontainer *pc, sp_playlistcontainer_callbacks *callbacks, void *userdata)
int sp_playlistcontainer_num_playlists (sp_playlistcontainer *pc)
bool sp_playlistcontainer_is_loaded (sp_playlistcontainer *pc)
sp_playlistsp_playlistcontainer_playlist (sp_playlistcontainer *pc, int index)
sp_playlist_type sp_playlistcontainer_playlist_type (sp_playlistcontainer *pc, int index)
sp_error sp_playlistcontainer_playlist_folder_name (sp_playlistcontainer *pc, int index, char *buffer, int buffer_size)
sp_uint64 sp_playlistcontainer_playlist_folder_id (sp_playlistcontainer *pc, int index)
sp_playlistsp_playlistcontainer_add_new_playlist (sp_playlistcontainer *pc, const char *name)
sp_playlistsp_playlistcontainer_add_playlist (sp_playlistcontainer *pc, sp_link *link)
sp_error sp_playlistcontainer_remove_playlist (sp_playlistcontainer *pc, int index)
sp_error sp_playlistcontainer_move_playlist (sp_playlistcontainer *pc, int index, int new_position, bool dry_run)
sp_error sp_playlistcontainer_add_folder (sp_playlistcontainer *pc, int index, const char *name)
sp_usersp_playlistcontainer_owner (sp_playlistcontainer *pc)
sp_error sp_playlistcontainer_add_ref (sp_playlistcontainer *pc)
sp_error sp_playlistcontainer_release (sp_playlistcontainer *pc)
int sp_playlistcontainer_get_unseen_tracks (sp_playlistcontainer *pc, sp_playlist *playlist, sp_track **tracks, int num_tracks)
int sp_playlistcontainer_clear_unseen_tracks (sp_playlistcontainer *pc, sp_playlist *playlist)
const char * sp_user_canonical_name (sp_user *user)
const char * sp_user_display_name (sp_user *user)
bool sp_user_is_loaded (sp_user *user)
sp_error sp_user_add_ref (sp_user *user)
sp_error sp_user_release (sp_user *user)
sp_toplistbrowsesp_toplistbrowse_create (sp_session *session, sp_toplisttype type, sp_toplistregion region, const char *username, toplistbrowse_complete_cb *callback, void *userdata)
bool sp_toplistbrowse_is_loaded (sp_toplistbrowse *tlb)
sp_error sp_toplistbrowse_error (sp_toplistbrowse *tlb)
sp_error sp_toplistbrowse_add_ref (sp_toplistbrowse *tlb)
sp_error sp_toplistbrowse_release (sp_toplistbrowse *tlb)
int sp_toplistbrowse_num_artists (sp_toplistbrowse *tlb)
sp_artistsp_toplistbrowse_artist (sp_toplistbrowse *tlb, int index)
int sp_toplistbrowse_num_albums (sp_toplistbrowse *tlb)
sp_albumsp_toplistbrowse_album (sp_toplistbrowse *tlb, int index)
int sp_toplistbrowse_num_tracks (sp_toplistbrowse *tlb)
sp_tracksp_toplistbrowse_track (sp_toplistbrowse *tlb, int index)
int sp_toplistbrowse_backend_request_duration (sp_toplistbrowse *tlb)
sp_inboxsp_inbox_post_tracks (sp_session *session, const char *user, sp_track *const *tracks, int num_tracks, const char *message, inboxpost_complete_cb *callback, void *userdata)
sp_error sp_inbox_error (sp_inbox *inbox)
sp_error sp_inbox_add_ref (sp_inbox *inbox)
sp_error sp_inbox_release (sp_inbox *inbox)
const char * sp_build_id (void)

Detailed Description

Public API for libspotify

Note:
All input strings are expected to be in UTF-8
All output strings are in UTF-8.
All usernames are valid XMPP nodeprep identifiers: http://tools.ietf.org/html/rfc3920#appendix-A If you need to store user data, we strongly advise you to use the canonical form of the username.

Function Documentation

const char* sp_build_id ( void   ) 

Return the libspotify build ID

This might be useful to have available for display somewhere in your user interface.


Generated on Wed May 23 2012 09:09:03.
Copyright © 2006–2012 Spotify Ltd