Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [CCode (cheader_filename = "libspotify/api.h")]
- namespace Spotify {
- [CCode (cprefix = "SP_ERROR_", cname = "sp_error")]
- public enum Error {
- OK = 0, ///< No errors encountered
- BAD_API_VERSION = 1, ///< The library version targeted does not match the one you claim you support
- API_INITIALIZATION_FAILED = 2, ///< Initialization of library failed - are cache locations etc. valid?
- TRACK_NOT_PLAYABLE = 3, ///< The track specified for playing cannot be played
- BAD_APPLICATION_KEY = 5, ///< The application key is invalid
- BAD_USERNAME_OR_PASSWORD = 6, ///< Login failed because of bad username and/or password
- USER_BANNED = 7, ///< The specified username is banned
- UNABLE_TO_CONTACT_SERVER = 8, ///< Cannot connect to the Spotify backend system
- CLIENT_TOO_OLD = 9, ///< Client is too old, library will need to be updated
- OTHER_PERMANENT = 10, ///< Some other error occurred, and it is permanent (e.g. trying to relogin will not help)
- BAD_USER_AGENT = 11, ///< The user agent string is invalid or too long
- MISSING_CALLBACK = 12, ///< No valid callback registered to handle events
- INVALID_INDATA = 13, ///< Input data was either missing or invalid
- INDEX_OUT_OF_RANGE = 14, ///< Index out of range
- USER_NEEDS_PREMIUM = 15, ///< The specified user needs a premium account
- OTHER_TRANSIENT = 16, ///< A transient error occurred.
- IS_LOADING = 17, ///< The resource is currently loading
- NO_STREAM_AVAILABLE = 18, ///< Could not find any suitable stream to play
- PERMISSION_DENIED = 19, ///< Requested operation is not allowed
- INBOX_IS_FULL = 20, ///< Target inbox is full
- NO_CACHE = 21, ///< Cache is not enabled
- NO_SUCH_USER = 22, ///< Requested user does not exist
- NO_CREDENTIALS = 23, ///< No credentials are stored
- NETWORK_DISABLED = 24, ///< Network disabled
- INVALID_DEVICE_ID = 25, ///< Invalid device ID
- CANT_OPEN_TRACE_FILE = 26, ///< Unable to open trace file
- APPLICATION_BANNED = 27, ///< This application is no longer allowed to use the Spotify service
- OFFLINE_TOO_MANY_TRACKS = 31, ///< Reached the device limit for number of tracks to download
- OFFLINE_DISK_CACHE = 32, ///< Disk cache is full so no more tracks can be downloaded to offline mode
- OFFLINE_EXPIRED = 33, ///< Offline key has expired, the user needs to go online again
- OFFLINE_NOT_ALLOWED = 34, ///< This user is not allowed to use offline mode
- OFFLINE_LICENSE_LOST = 35, ///< The license for this device has been lost. Most likely because the user used offline on three other device
- OFFLINE_LICENSE_ERROR = 36, ///< The Spotify license server does not respond correctly
- LASTFM_AUTH_ERROR = 39, ///< A LastFM scrobble authentication error has occurred
- INVALID_ARGUMENT = 40, ///< An invalid argument was specified
- SYSTEM_FAILURE = 41;
- [CCode (cname = "sp_error_message")]
- public unowned string message();
- }
- }
Add Comment
Please, Sign In to add comment