From 46abfd7b12613aa565beaf163a0679f59e03480a Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 5 Oct 2008 08:40:22 +0200 Subject: piano: New error READONLY_MODE --- libpiano/src/main.c | 4 ++++ libpiano/src/piano.h | 2 +- libpiano/src/xml.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'libpiano') diff --git a/libpiano/src/main.c b/libpiano/src/main.c index 2653853..de954ec 100644 --- a/libpiano/src/main.c +++ b/libpiano/src/main.c @@ -860,6 +860,10 @@ const char *PianoErrorToStr (PianoReturn_t ret) { return "Protocol incompatible. Please upgrade " PACKAGE_NAME "."; break; + case PIANO_RET_READONLY_MODE: + return "Request cannot be completed at this time, please try " + "again later."; + default: return "No error message available."; break; diff --git a/libpiano/src/piano.h b/libpiano/src/piano.h index 8160b2c..f311743 100644 --- a/libpiano/src/piano.h +++ b/libpiano/src/piano.h @@ -153,7 +153,7 @@ typedef struct PianoSearchResult PianoSearchResult_t; enum PianoReturn {PIANO_RET_OK, PIANO_RET_ERR, PIANO_RET_XML_INVALID, PIANO_RET_AUTH_TOKEN_INVALID, PIANO_RET_AUTH_USER_PASSWORD_INVALID, PIANO_RET_NET_ERROR, PIANO_RET_NOT_AUTHORIZED, - PIANO_RET_PROTOCOL_INCOMPATIBLE}; + PIANO_RET_PROTOCOL_INCOMPATIBLE, PIANO_RET_READONLY_MODE}; typedef enum PianoReturn PianoReturn_t; void PianoInit (PianoHandle_t *); diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 73f9030..2b33fe3 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -68,6 +68,8 @@ void PianoXmlIsFaultCb (const char *key, const xmlNode *value, void *data) { } else if (strcmp ("INCOMPATIBLE_VERSION", matchStr) == 0) { *ret = PIANO_RET_PROTOCOL_INCOMPATIBLE; + } else if (strcmp ("READONLY_MODE", matchStr) == 0) { + *ret = PIANO_RET_READONLY_MODE; } else { *ret = PIANO_RET_ERR; printf (PACKAGE ": Unknown error %s in %s\n", -- cgit v1.2.3