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_RESOURCE_NOT_LOADED = 4, 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_PERMAMENT = 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 } |
Functions | |
const char * | sp_error_message (sp_error error) |
enum sp_error |
Error codes returned by various functions
const char* sp_error_message | ( | sp_error | error | ) |
Convert a numeric libspotify error code to a text string
Here is a snippet from session_ready.c:
sp_error error = sp_session_logout(session); if (SP_ERROR_OK != error) { fprintf(stderr, "failed to log out from Spotify: %s\n", sp_error_message(error)); g_exit_code = 5; return; }
[in] | error | The error code to lookup |