summaryrefslogtreecommitdiff
path: root/libpiano/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2010-02-01 17:19:13 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2010-02-01 17:19:13 +0100
commit06286692dc96e28379f16d81352e4c370d36bb73 (patch)
tree9b94e0ca8e7a44f917bd2a8113df2866f20ca7c2 /libpiano/src
parent8799be1f775d7e71cf6d9463cac8079186ef6481 (diff)
downloadpianobar-06286692dc96e28379f16d81352e4c370d36bb73.tar.gz
pianobar-06286692dc96e28379f16d81352e4c370d36bb73.tar.bz2
pianobar-06286692dc96e28379f16d81352e4c370d36bb73.zip
piano: New error PLAYLIST_END
See bug #10
Diffstat (limited to 'libpiano/src')
-rw-r--r--libpiano/src/piano.c4
-rw-r--r--libpiano/src/piano.h2
-rw-r--r--libpiano/src/xml.c2
3 files changed, 7 insertions, 1 deletions
diff --git a/libpiano/src/piano.c b/libpiano/src/piano.c
index fafac25..5173562 100644
--- a/libpiano/src/piano.c
+++ b/libpiano/src/piano.c
@@ -867,6 +867,10 @@ const char *PianoErrorToStr (PianoReturn_t ret) {
return "Out of sync. Please correct your system's time.";
break;
+ case PIANO_RET_PLAYLIST_END:
+ return "Playlist end.";
+ break;
+
default:
return "No error message available.";
break;
diff --git a/libpiano/src/piano.h b/libpiano/src/piano.h
index 5505a8c..ef93c09 100644
--- a/libpiano/src/piano.h
+++ b/libpiano/src/piano.h
@@ -104,7 +104,7 @@ typedef enum {PIANO_RET_OK, PIANO_RET_ERR, PIANO_RET_XML_INVALID,
PIANO_RET_PROTOCOL_INCOMPATIBLE, PIANO_RET_READONLY_MODE,
PIANO_RET_STATION_CODE_INVALID, PIANO_RET_IP_REJECTED,
PIANO_RET_STATION_NONEXISTENT, PIANO_RET_OUT_OF_MEMORY,
- PIANO_RET_OUT_OF_SYNC} PianoReturn_t;
+ PIANO_RET_OUT_OF_SYNC, PIANO_RET_PLAYLIST_END} PianoReturn_t;
void PianoInit (PianoHandle_t *);
void PianoDestroy (PianoHandle_t *);
diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c
index 764e07a..e3c1749 100644
--- a/libpiano/src/xml.c
+++ b/libpiano/src/xml.c
@@ -83,6 +83,8 @@ static void PianoXmlIsFaultCb (const char *key, const ezxml_t value,
*ret = PIANO_RET_STATION_NONEXISTENT;
} else if (strcmp ("OUT_OF_SYNC", matchStart) == 0) {
*ret = PIANO_RET_OUT_OF_SYNC;
+ } else if (strcmp ("PLAYLIST_END", matchStart) == 0) {
+ *ret = PIANO_RET_PLAYLIST_END;
} else {
*ret = PIANO_RET_ERR;
printf (PACKAGE ": Unknown error %s in %s\n",