[frogr] Added new location specific errors to FspError
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Added new location specific errors to FspError
- Date: Sun, 14 Aug 2011 23:56:40 +0000 (UTC)
commit c25a66be02379165189f5bffb62f856f190ffde5
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Sun Aug 14 19:28:12 2011 +0200
Added new location specific errors to FspError
src/flicksoup/fsp-error.c | 17 +++++++++++++++++
src/flicksoup/fsp-error.h | 4 ++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/flicksoup/fsp-error.c b/src/flicksoup/fsp-error.c
index 8f75d0f..9bc18f7 100644
--- a/src/flicksoup/fsp-error.c
+++ b/src/flicksoup/fsp-error.c
@@ -128,6 +128,19 @@ static const FspError set_license_translations [N_SPECIFIC_ERRORS] = {
FSP_ERROR_UNKNOWN, /* 9 */
};
+static const FspError set_location_translations [N_SPECIFIC_ERRORS] = {
+ FSP_ERROR_UNKNOWN, /* 0 */
+ FSP_ERROR_PHOTO_NOT_FOUND, /* 1 */
+ FSP_ERROR_MISSING_DATA, /* 2 */
+ FSP_ERROR_LOCATION_INVALID_LATITUDE, /* 3 */
+ FSP_ERROR_LOCATION_INVALID_LONGITUDE, /* 4 */
+ FSP_ERROR_LOCATION_INVALID_ACCURACY, /* 5 */
+ FSP_ERROR_SERVER_ERROR, /* 6 */
+ FSP_ERROR_UNKNOWN, /* 7 */
+ FSP_ERROR_UNKNOWN, /* 8 */
+ FSP_ERROR_UNKNOWN, /* 9 */
+};
+
static const FspError general_translations [N_GENERAL_ERRORS] = {
FSP_ERROR_UNKNOWN, /* 10 */
FSP_ERROR_UNKNOWN, /* 11 */
@@ -292,6 +305,10 @@ fsp_error_get_from_response_code (FspErrorMethod method, gint code)
retval = set_license_translations[code];
break;
+ case FSP_ERROR_METHOD_SET_LOCATION:
+ retval = set_location_translations[code];
+ break;
+
default:
retval = FSP_ERROR_UNKNOWN;
}
diff --git a/src/flicksoup/fsp-error.h b/src/flicksoup/fsp-error.h
index f3ba521..69b30d0 100644
--- a/src/flicksoup/fsp-error.h
+++ b/src/flicksoup/fsp-error.h
@@ -64,6 +64,10 @@ typedef enum {
FSP_ERROR_GROUP_PHOTO_ALREADY_IN_QUEUE,
FSP_ERROR_GROUP_CONTENT_NOT_ALLOWED,
+ FSP_ERROR_LOCATION_INVALID_LATITUDE,
+ FSP_ERROR_LOCATION_INVALID_LONGITUDE,
+ FSP_ERROR_LOCATION_INVALID_ACCURACY,
+
FSP_ERROR_USER_NOT_FOUND,
FSP_ERROR_LICENSE_NOT_FOUND,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]