diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-17 12:13:56 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-17 12:13:56 +0200 |
commit | 56432d661e34de9aa0d1727fb7b06f19aa18723e (patch) | |
tree | 11cd9f4272afae4867496dc942f35866718d2a7c /libpiano/piano.h | |
parent | dddcf192c7c9d3a4cb19e7523d81ed2b11d560ad (diff) | |
download | pianobar-56432d661e34de9aa0d1727fb7b06f19aa18723e.tar.gz pianobar-56432d661e34de9aa0d1727fb7b06f19aa18723e.tar.bz2 pianobar-56432d661e34de9aa0d1727fb7b06f19aa18723e.zip |
More error handling.
Now we can parse and handle pandora's <fault> messages and abort the parsing
process. Some more fault type should be added, as well as more client support
for those errors.
Diffstat (limited to 'libpiano/piano.h')
-rw-r--r-- | libpiano/piano.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libpiano/piano.h b/libpiano/piano.h index bad8401..b832b69 100644 --- a/libpiano/piano.h +++ b/libpiano/piano.h @@ -139,7 +139,8 @@ struct PianoSearchResult { typedef struct PianoSearchResult PianoSearchResult_t; /* FIXME: more error types (http failed, e.g.) later */ -enum PianoReturn {PIANO_RET_OK, PIANO_RET_ERR}; +enum PianoReturn {PIANO_RET_OK, PIANO_RET_ERR, PIANO_RET_XML_INVALID, + PIANO_RET_AUTH_TOKEN_INVALID, PIANO_RET_AUTH_USER_PASSWORD_INVALID}; typedef enum PianoReturn PianoReturn_t; void PianoInit (PianoHandle_t *); @@ -148,9 +149,9 @@ void PianoDestroyPlaylist (PianoHandle_t *ph); void PianoDestroySearchResult (PianoSearchResult_t *searchResult); void PianoDestroyStation (PianoStation_t *station); void PianoDestroyStations (PianoHandle_t *ph); -void PianoConnect (PianoHandle_t *, char *, char *); +PianoReturn_t PianoConnect (PianoHandle_t *, char *, char *); -void PianoGetStations (PianoHandle_t *ph); +PianoReturn_t PianoGetStations (PianoHandle_t *ph); void PianoGetPlaylist (PianoHandle_t *ph, char *stationId); PianoReturn_t PianoRateTrack (PianoHandle_t *ph, PianoStation_t *station, |