rotrevrep

Untitled

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