diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2010-03-29 19:19:45 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2010-03-29 19:19:45 +0100 |
commit | ba286a7f4b52f9c35d2062a9cc5c7181cc6573c9 (patch) | |
tree | aaf93d45cb89c3127f029e77d0e5a9d180a99223 /gdata/gdata-service.h | |
parent | b193da507a63da2fe1e0f7dc44aae9949f4d7545 (diff) | |
download | libgdata-ba286a7f4b52f9c35d2062a9cc5c7181cc6573c9.tar.gz |
[core] Improve error reporting when there's no network connection
Add GDATA_SERVICE_ERROR_NETWORK_ERROR and GDATA_SERVICE_ERROR_PROXY_ERROR,
to be returned by all network operations (authentication, queries,
insertions, updates and deletions) in case of a local network error or a
proxy error, respectively.
Diffstat (limited to 'gdata/gdata-service.h')
-rw-r--r-- | gdata/gdata-service.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdata/gdata-service.h b/gdata/gdata-service.h index 35d15f63..a2ac3c57 100644 --- a/gdata/gdata-service.h +++ b/gdata/gdata-service.h @@ -36,6 +36,7 @@ G_BEGIN_DECLS * @GDATA_OPERATION_DELETION: a deletion of a #GDataEntry * @GDATA_OPERATION_DOWNLOAD: a download of a file * @GDATA_OPERATION_UPLOAD: an upload of a file + * @GDATA_OPERATION_AUTHENTICATION: authentication with the service * * Representations of the different operations performed by the library. * @@ -47,12 +48,13 @@ typedef enum { GDATA_OPERATION_UPDATE, GDATA_OPERATION_DELETION, GDATA_OPERATION_DOWNLOAD, - GDATA_OPERATION_UPLOAD + GDATA_OPERATION_UPLOAD, + GDATA_OPERATION_AUTHENTICATION } GDataOperationType; /** * GDataServiceError: - * @GDATA_SERVICE_ERROR_UNAVAILABLE: The service is unavailable due to maintainence or other reasons + * @GDATA_SERVICE_ERROR_UNAVAILABLE: The service is unavailable due to maintainence or other reasons (e.g. network errors at the server end) * @GDATA_SERVICE_ERROR_PROTOCOL_ERROR: The client or server unexpectedly strayed from the protocol (fatal error) * @GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED: An entry has already been inserted, and cannot be re-inserted * @GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED: The user attempted to do something which required authentication, and they weren't authenticated @@ -61,6 +63,8 @@ typedef enum { * and uploading the modified entry * @GDATA_SERVICE_ERROR_FORBIDDEN: Generic error for a forbidden action (not due to having insufficient permissions) * @GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER: A given query parameter was invalid for the query type + * @GDATA_SERVICE_ERROR_NETWORK_ERROR: The service is unavailable due to local network errors (e.g. no Internet connection) + * @GDATA_SERVICE_ERROR_PROXY_ERROR: The service is unavailable due to proxy network errors (e.g. proxy unreachable) * * Error codes for #GDataService operations. **/ @@ -72,7 +76,9 @@ typedef enum { GDATA_SERVICE_ERROR_NOT_FOUND, GDATA_SERVICE_ERROR_CONFLICT, GDATA_SERVICE_ERROR_FORBIDDEN, - GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER + GDATA_SERVICE_ERROR_BAD_QUERY_PARAMETER, + GDATA_SERVICE_ERROR_NETWORK_ERROR, + GDATA_SERVICE_ERROR_PROXY_ERROR } GDataServiceError; /** |