From 56432d661e34de9aa0d1727fb7b06f19aa18723e Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 17 Jun 2008 12:13:56 +0200 Subject: More error handling. Now we can parse and handle pandora's messages and abort the parsing process. Some more fault type should be added, as well as more client support for those errors. --- libpiano/piano.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libpiano/piano.h') 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, -- cgit v1.2.3