[evolution-data-server] EClient: Adding E_CLIENT_ERROR_OUT_OF_SYNC



commit b8d36184a1ab2b4c706935dfa2fee934f0452e2e
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Thu Jan 24 14:56:10 2013 +0900

    EClient: Adding E_CLIENT_ERROR_OUT_OF_SYNC
    
    An error to descibe out of sync data between the client and backend.

 addressbook/libebook/e-book-client.c    |    1 +
 addressbook/libebook/e-book-types.h     |    3 ++-
 addressbook/libedata-book/e-data-book.c |    6 ++++--
 libedataserver/e-client.c               |    2 ++
 libedataserver/e-client.h               |    3 ++-
 5 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index c3fc92f..4767464 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -150,6 +150,7 @@ unwrap_dbus_error (GError *error,
 		{ err ("NotOpened",				E_CLIENT_ERROR_NOT_OPENED) },
 		{ err ("UnsupportedField",			E_CLIENT_ERROR_OTHER_ERROR) },
 		{ err ("InvalidServerVersion",			E_CLIENT_ERROR_OTHER_ERROR) },
+		{ err ("OutOfSync",			        E_CLIENT_ERROR_OUT_OF_SYNC) },
 		{ err ("OtherError",				E_CLIENT_ERROR_OTHER_ERROR) }
 	};
 	#undef err
diff --git a/addressbook/libebook/e-book-types.h b/addressbook/libebook/e-book-types.h
index d366f04..f7d896f 100644
--- a/addressbook/libebook/e-book-types.h
+++ b/addressbook/libebook/e-book-types.h
@@ -84,7 +84,8 @@ typedef enum {
 	E_DATA_BOOK_STATUS_NO_SPACE,
 	E_DATA_BOOK_STATUS_INVALID_ARG,
 	E_DATA_BOOK_STATUS_NOT_SUPPORTED,
-	E_DATA_BOOK_STATUS_NOT_OPENED
+	E_DATA_BOOK_STATUS_NOT_OPENED,
+	E_DATA_BOOK_STATUS_OUT_OF_SYNC
 } EDataBookStatus;
 
 #ifndef EDS_DISABLE_DEPRECATED
diff --git a/addressbook/libedata-book/e-data-book.c b/addressbook/libedata-book/e-data-book.c
index 5518e2f..120f1ab 100644
--- a/addressbook/libedata-book/e-data-book.c
+++ b/addressbook/libedata-book/e-data-book.c
@@ -435,7 +435,8 @@ e_data_book_status_to_string (EDataBookStatus status)
 		{ E_DATA_BOOK_STATUS_INVALID_ARG,			N_("Invalid argument") },
 		/* Translators: The string for NOT_SUPPORTED error */
 		{ E_DATA_BOOK_STATUS_NOT_SUPPORTED,			N_("Not supported") },
-		{ E_DATA_BOOK_STATUS_NOT_OPENED,			N_("Backend is not opened yet") }
+		{ E_DATA_BOOK_STATUS_NOT_OPENED,			N_("Backend is not opened yet") },
+		{ E_DATA_BOOK_STATUS_OUT_OF_SYNC,                       N_("Object is out of sync") }
 	};
 
 	for (i = 0; i < G_N_ELEMENTS (statuses); i++) {
@@ -477,7 +478,8 @@ e_data_book_error_quark (void)
 		{ E_DATA_BOOK_STATUS_NO_SPACE,				ERR_PREFIX "NoSpace" },
 		{ E_DATA_BOOK_STATUS_INVALID_ARG,			ERR_PREFIX "InvalidArg" },
 		{ E_DATA_BOOK_STATUS_NOT_SUPPORTED,			ERR_PREFIX "NotSupported" },
-		{ E_DATA_BOOK_STATUS_NOT_OPENED,			ERR_PREFIX "NotOpened" }
+		{ E_DATA_BOOK_STATUS_NOT_OPENED,			ERR_PREFIX "NotOpened" },
+		{ E_DATA_BOOK_STATUS_OUT_OF_SYNC,                       ERR_PREFIX "OutOfSync" }
 	};
 
 	#undef ERR_PREFIX
diff --git a/libedataserver/e-client.c b/libedataserver/e-client.c
index 576060f..2ae8121 100644
--- a/libedataserver/e-client.c
+++ b/libedataserver/e-client.c
@@ -168,6 +168,8 @@ e_client_error_to_string (EClientError code)
 		return _("Other error");
 	case E_CLIENT_ERROR_NOT_OPENED:
 		return _("Backend is not opened yet");
+	case E_CLIENT_ERROR_OUT_OF_SYNC:
+		return _("Object is out of sync");
 	}
 
 	return _("Unknown error");
diff --git a/libedataserver/e-client.h b/libedataserver/e-client.h
index 9cee6b6..595d856 100644
--- a/libedataserver/e-client.h
+++ b/libedataserver/e-client.h
@@ -148,7 +148,8 @@ typedef enum {
 	E_CLIENT_ERROR_QUERY_REFUSED,
 	E_CLIENT_ERROR_DBUS_ERROR,
 	E_CLIENT_ERROR_OTHER_ERROR,
-	E_CLIENT_ERROR_NOT_OPENED
+	E_CLIENT_ERROR_NOT_OPENED,
+	E_CLIENT_ERROR_OUT_OF_SYNC
 } EClientError;
 
 const gchar *	e_client_error_to_string	(EClientError code);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]