[evolution-data-server/eclient] Prefix common client properties with CLIENT_ and reuse between clients



commit e5b11a489e94edbf320b8a391a9b0d0e7b40ca13
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 10 07:09:38 2011 +0200

    Prefix common client properties with CLIENT_ and reuse between clients

 addressbook/backends/file/e-book-backend-file.c    |    2 +-
 .../backends/google/e-book-backend-google.c        |    2 +-
 .../backends/groupwise/e-book-backend-groupwise.c  |    2 +-
 addressbook/backends/ldap/e-book-backend-ldap.c    |    2 +-
 addressbook/backends/vcf/e-book-backend-vcf.c      |    2 +-
 .../backends/webdav/e-book-backend-webdav.c        |    2 +-
 addressbook/libebook/e-book-client.c               |   18 +++++-------------
 addressbook/libebook/e-book-client.h               |    5 -----
 addressbook/libebook/e-book.c                      |    4 ++--
 addressbook/libedata-book/e-book-backend.c         |    8 ++++----
 addressbook/libedata-book/e-book-backend.h         |   10 +++++-----
 calendar/backends/caldav/e-cal-backend-caldav.c    |    2 +-
 .../backends/contacts/e-cal-backend-contacts.c     |    2 +-
 calendar/backends/file/e-cal-backend-file.c        |    2 +-
 .../backends/groupwise/e-cal-backend-groupwise.c   |    2 +-
 calendar/backends/http/e-cal-backend-http.c        |    2 +-
 calendar/backends/weather/e-cal-backend-weather.c  |    2 +-
 calendar/libecal/e-cal-client.c                    |   20 ++++++--------------
 calendar/libecal/e-cal-client.h                    |    5 -----
 calendar/libecal/e-cal.c                           |    8 ++++----
 calendar/libedata-cal/e-cal-backend.c              |    8 ++++----
 calendar/libedata-cal/e-cal-backend.h              |   10 +++++-----
 libedataserver/e-client.c                          |   16 ++++++++++++++++
 libedataserver/e-client.h                          |    6 ++++++
 tests/libebook/client/test-client-examine.c        |   12 ++++++------
 tests/libecal/client/test-client-examine.c         |   12 ++++++------
 26 files changed, 81 insertions(+), 85 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index ab12c07..ca7cccf 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -1185,7 +1185,7 @@ e_book_backend_file_get_backend_property (EBookBackendSync *backend, EDataBook *
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		*prop_value = g_strdup ("local,do-initial-query,bulk-removes,contact-lists");
 	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS)) {
 		*prop_value = g_strdup (e_contact_field_name (E_CONTACT_FILE_AS));
diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c
index 5976bdf..f922651 100644
--- a/addressbook/backends/google/e-book-backend-google.c
+++ b/addressbook/backends/google/e-book-backend-google.c
@@ -1426,7 +1426,7 @@ e_book_backend_google_get_backend_property (EBookBackend *backend, EDataBook *bo
 
 	g_return_if_fail (prop_name != NULL);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, "net,do-initial-query,contact-lists");
 	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, "");
diff --git a/addressbook/backends/groupwise/e-book-backend-groupwise.c b/addressbook/backends/groupwise/e-book-backend-groupwise.c
index 536ca32..3ab40fc 100644
--- a/addressbook/backends/groupwise/e-book-backend-groupwise.c
+++ b/addressbook/backends/groupwise/e-book-backend-groupwise.c
@@ -3561,7 +3561,7 @@ e_book_backend_groupwise_get_backend_property (EBookBackend *backend, EDataBook
 
 	g_return_if_fail (prop_name != NULL);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		/* do-initialy-query is enabled for system address book also, so that we get the
 		 * book_view, which is needed for displaying cache update progress.
 		 * and null query is handled for system address book.
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index ca29071..fe68f79 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -5110,7 +5110,7 @@ e_book_backend_ldap_get_backend_property (EBookBackend *backend, EDataBook *book
 {
 	g_return_if_fail (prop_name != NULL);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		if (can_browse (backend) || E_BOOK_BACKEND_LDAP (backend)->priv->marked_for_offline)
 			e_data_book_respond_get_backend_property (book, opid, NULL, "net,anon-access,contact-lists,do-initial-query");
 		else
diff --git a/addressbook/backends/vcf/e-book-backend-vcf.c b/addressbook/backends/vcf/e-book-backend-vcf.c
index daa64c8..a06bf00 100644
--- a/addressbook/backends/vcf/e-book-backend-vcf.c
+++ b/addressbook/backends/vcf/e-book-backend-vcf.c
@@ -644,7 +644,7 @@ e_book_backend_vcf_get_backend_property (EBookBackendSync *backend, EDataBook *b
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		*prop_value = g_strdup ("local,do-initial-query,contact-lists");
 	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS)) {
 		*prop_value = g_strdup (e_contact_field_name (E_CONTACT_FILE_AS));
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c
index 85827ee..7c04eb4 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -1305,7 +1305,7 @@ e_book_backend_webdav_get_backend_property (EBookBackend *backend, EDataBook *bo
 {
 	g_return_if_fail (prop_name != NULL);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, "net,do-initial-query,contact-lists");
 	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, e_contact_field_name (E_CONTACT_FILE_AS));
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index ce30a87..d070f29 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -50,18 +50,6 @@ G_DEFINE_TYPE (EBookClient, e_book_client, E_TYPE_CLIENT)
 
 /**
  * Well-known book backend properties:
- * @BOOK_BACKEND_PROPERTY_LOADED: Is set to "TRUE" or "FALSE" depending
- *   on the backend's loaded state.
- * @BOOK_BACKEND_PROPERTY_ONLINE: Is set to "TRUE" or "FALSE" depending
- *   on the backend's loaded state. See also e_client_is_online().
- * @BOOK_BACKEND_PROPERTY_READONLY: Is set to "TRUE" or "FALSE" depending
- *   on the backend's readonly state. See also e_client_is_readonly().
- * @BOOK_BACKEND_PROPERTY_CACHE_DIR: Local folder with cached data used
- *   by the backend.
- * @BOOK_BACKEND_PROPERTY_CAPABILITIES: Retrieves comma-separated list
- *   of	capabilities supported by the backend. Preferred method of retreiving
- *   and working with capabilities is e_client_get_capabilities() and
- *   e_client_check_capability().
  * @BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS: Retrieves comma-separated list
  *   of required fields by the backend. Use e_client_util_parse_comma_strings()
  *   to parse returned string value into a #GSList. These fields are required
@@ -74,6 +62,10 @@ G_DEFINE_TYPE (EBookClient, e_book_client, E_TYPE_CLIENT)
  *   of supported authentication methods by the backend.
  *   Use e_client_util_parse_comma_strings() to parse returned string value
  *   into a #GSList.
+ *
+ * See also: @CLIENT_BACKEND_PROPERTY_LOADED,
+ *   @CLIENT_BACKEND_PROPERTY_ONLINE, @CLIENT_BACKEND_PROPERTY_READONLY
+ *   @CLIENT_BACKEND_PROPERTY_CACHE_DIR, @CLIENT_BACKEND_PROPERTY_CAPABILITIES
  **/
 
 GQuark
@@ -2027,7 +2019,7 @@ book_client_retrieve_capabilities (EClient *client)
 	if (!book_client->priv->gdbus_book)
 		return NULL;
 
-	e_gdbus_book_call_get_backend_property_sync (book_client->priv->gdbus_book, BOOK_BACKEND_PROPERTY_CAPABILITIES, &capabilities, NULL, &error);
+	e_gdbus_book_call_get_backend_property_sync (book_client->priv->gdbus_book, CLIENT_BACKEND_PROPERTY_CAPABILITIES, &capabilities, NULL, &error);
 
 	if (error) {
 		g_debug ("%s: Failed to retrieve capabilitites: %s", G_STRFUNC, error->message);
diff --git a/addressbook/libebook/e-book-client.h b/addressbook/libebook/e-book-client.h
index a800f36..5c8910e 100644
--- a/addressbook/libebook/e-book-client.h
+++ b/addressbook/libebook/e-book-client.h
@@ -38,11 +38,6 @@ G_BEGIN_DECLS
 #define E_IS_BOOK_CLIENT_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_BOOK_CLIENT))
 #define E_BOOK_CLIENT_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_BOOK_CLIENT, EBookClientClass))
 
-#define BOOK_BACKEND_PROPERTY_LOADED			"loaded"
-#define BOOK_BACKEND_PROPERTY_ONLINE			"online"
-#define BOOK_BACKEND_PROPERTY_READONLY			"readonly"
-#define BOOK_BACKEND_PROPERTY_CACHE_DIR			"cache-dir"
-#define BOOK_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
 #define BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS		"required-fields"
 #define BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS		"supported-fields"
 #define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS	"supported-auth-methods"
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index 2d14d30..bc666e8 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -52,7 +52,7 @@
 #include "e-gdbus-book-factory.h"
 #include "e-gdbus-book-view.h"
 
-#define BOOK_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
+#define CLIENT_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
 #define BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS		"required-fields"
 #define BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS		"supported-fields"
 #define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS	"supported-auth-methods"
@@ -2916,7 +2916,7 @@ e_book_get_static_capabilities (EBook *book,
 	if (!book->priv->cap_queried) {
 		gchar *cap = NULL;
 
-		if (!e_gdbus_book_call_get_backend_property_sync (book->priv->gdbus_book, BOOK_BACKEND_PROPERTY_CAPABILITIES, &cap, NULL, error)) {
+		if (!e_gdbus_book_call_get_backend_property_sync (book->priv->gdbus_book, CLIENT_BACKEND_PROPERTY_CAPABILITIES, &cap, NULL, error)) {
 			return NULL;
 		}
 
diff --git a/addressbook/libedata-book/e-book-backend.c b/addressbook/libedata-book/e-book-backend.c
index 3536824..3c272be 100644
--- a/addressbook/libedata-book/e-book-backend.c
+++ b/addressbook/libedata-book/e-book-backend.c
@@ -77,13 +77,13 @@ book_backend_get_backend_property (EBookBackend *backend, EDataBook *book, guint
 	g_return_if_fail (book != NULL);
 	g_return_if_fail (prop_name != NULL);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_LOADED)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_LOADED)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, e_book_backend_is_loaded (backend) ? "TRUE" : "FALSE");
-	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_ONLINE)) {
+	} else if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_ONLINE)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, backend->priv->online ? "TRUE" : "FALSE");
-	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_READONLY)) {
+	} else if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_READONLY)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, e_book_backend_is_readonly (backend) ? "TRUE" : "FALSE");
-	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CACHE_DIR)) {
+	} else if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CACHE_DIR)) {
 		e_data_book_respond_get_backend_property (book, opid, NULL, e_book_backend_get_cache_dir (backend));
 	} else {
 		e_data_book_respond_get_backend_property (book, opid, e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_NOT_SUPPORTED, _("Unknown book property '%s'"), prop_name), NULL);
diff --git a/addressbook/libedata-book/e-book-backend.h b/addressbook/libedata-book/e-book-backend.h
index 50caa08..9e9c3a7 100644
--- a/addressbook/libedata-book/e-book-backend.h
+++ b/addressbook/libedata-book/e-book-backend.h
@@ -41,11 +41,11 @@ G_BEGIN_DECLS
 #define E_IS_BOOK_BACKEND_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_BOOK_BACKEND))
 #define E_BOOK_BACKEND_GET_CLASS(k) (G_TYPE_INSTANCE_GET_CLASS ((k), E_TYPE_BOOK_BACKEND, EBookBackendClass))
 
-#define BOOK_BACKEND_PROPERTY_LOADED			"loaded"
-#define BOOK_BACKEND_PROPERTY_ONLINE			"online"
-#define BOOK_BACKEND_PROPERTY_READONLY			"readonly"
-#define BOOK_BACKEND_PROPERTY_CACHE_DIR			"cache-dir"
-#define BOOK_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
+#define CLIENT_BACKEND_PROPERTY_LOADED			"loaded"
+#define CLIENT_BACKEND_PROPERTY_ONLINE			"online"
+#define CLIENT_BACKEND_PROPERTY_READONLY		"readonly"
+#define CLIENT_BACKEND_PROPERTY_CACHE_DIR		"cache-dir"
+#define CLIENT_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
 #define BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS		"required-fields"
 #define BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS		"supported-fields"
 #define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS	"supported-auth-methods"
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index aba825c..20020a7 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -2204,7 +2204,7 @@ caldav_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellab
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		ESource *source;
 		GString *caps;
 		gchar *usermail;
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index 1b276d9..42052e3 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -798,7 +798,7 @@ e_cal_backend_contacts_get_backend_property (ECalBackendSync *backend, EDataCal
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		*prop_value = NULL;
 	} else if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS) ||
 		   g_str_equal (prop_name, CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS)) {
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 9a55bbc..b1189ee 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -400,7 +400,7 @@ e_cal_backend_file_get_backend_property (ECalBackendSync *backend, EDataCal *cal
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		*prop_value = g_strdup (CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS ","
 					CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
 					CAL_STATIC_CAPABILITY_DELEGATE_SUPPORTED ","
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c
index 9717140..413ffe0 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c
@@ -1255,7 +1255,7 @@ e_cal_backend_groupwise_get_backend_property (ECalBackendSync *backend, EDataCal
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		*prop_value = g_strdup (CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS ","
 					CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY ","
 					CAL_STATIC_CAPABILITY_REMOVE_ALARMS ","
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index f9cf520..41becd9 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -163,7 +163,7 @@ e_cal_backend_http_get_backend_property (ECalBackendSync *backend, EDataCal *cal
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		*prop_value = g_strdup (CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS ","
 					CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED);
 	} else if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS) ||
diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c
index db652e0..98657ef 100644
--- a/calendar/backends/weather/e-cal-backend-weather.c
+++ b/calendar/backends/weather/e-cal-backend-weather.c
@@ -460,7 +460,7 @@ e_cal_backend_weather_get_backend_property (ECalBackendSync *backend, EDataCal *
 	g_return_val_if_fail (prop_name != NULL, FALSE);
 	g_return_val_if_fail (prop_value != NULL, FALSE);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		*prop_value = g_strdup (CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT ","
 					CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS ","
 					CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS ","
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index bd95a3f..87e7365 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -67,18 +67,6 @@ G_DEFINE_TYPE (ECalClient, e_cal_client, E_TYPE_CLIENT)
 
 /**
  * Well-known calendar backend properties:
- * @CAL_BACKEND_PROPERTY_LOADED: Is set to "TRUE" or "FALSE" depending
- *   on the backend's loaded state.
- * @CAL_BACKEND_PROPERTY_ONLINE: Is set to "TRUE" or "FALSE" depending
- *   on the backend's loaded state. See also e_client_is_online().
- * @CAL_BACKEND_PROPERTY_READONLY: Is set to "TRUE" or "FALSE" depending
- *   on the backend's readonly state. See also e_client_is_readonly().
- * @CAL_BACKEND_PROPERTY_CACHE_DIR: Local folder with cached data used
- *   by the backend.
- * @CAL_BACKEND_PROPERTY_CAPABILITIES: Retrieves comma-separated list
- *   of	capabilities supported by the backend. Preferred method of retreiving
- *   and working with capabilities is e_client_get_capabilities() and
- *   e_client_check_capability().
  * @CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS: Contains default calendar's email
  *   address suggested by the backend.
  * @CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS: Contains default alarm email
@@ -87,6 +75,10 @@ G_DEFINE_TYPE (ECalClient, e_cal_client, E_TYPE_CLIENT)
  *   of an #icalcomponent with the default values for properties needed.
  *   Preferred way of retrieving this property is by
  *   calling e_cal_client_get_default_object().
+ *
+ * See also: @CLIENT_BACKEND_PROPERTY_LOADED,
+ *   @CLIENT_BACKEND_PROPERTY_ONLINE, @CLIENT_BACKEND_PROPERTY_READONLY
+ *   @CLIENT_BACKEND_PROPERTY_CACHE_DIR, @CLIENT_BACKEND_PROPERTY_CAPABILITIES
  **/
 
 /**
@@ -938,7 +930,7 @@ e_cal_client_get_local_attachment_store (ECalClient *client)
 	if (client->priv->cache_dir || !client->priv->gdbus_cal)
 		return client->priv->cache_dir;
 
-	e_gdbus_cal_call_get_backend_property_sync (client->priv->gdbus_cal, CAL_BACKEND_PROPERTY_CACHE_DIR, &cache_dir, NULL, &error);
+	e_gdbus_cal_call_get_backend_property_sync (client->priv->gdbus_cal, CLIENT_BACKEND_PROPERTY_CACHE_DIR, &cache_dir, NULL, &error);
 
 	if (error == NULL) {
 		client->priv->cache_dir = cache_dir;
@@ -3994,7 +3986,7 @@ cal_client_retrieve_capabilities (EClient *client)
 	if (!cal_client->priv->gdbus_cal)
 		return NULL;
 
-	e_gdbus_cal_call_get_backend_property_sync (cal_client->priv->gdbus_cal, CAL_BACKEND_PROPERTY_CAPABILITIES, &capabilities, NULL, &error);
+	e_gdbus_cal_call_get_backend_property_sync (cal_client->priv->gdbus_cal, CLIENT_BACKEND_PROPERTY_CAPABILITIES, &capabilities, NULL, &error);
 
 	if (error) {
 		g_debug ("%s: Failed to retrieve capabilitites: %s", G_STRFUNC, error->message);
diff --git a/calendar/libecal/e-cal-client.h b/calendar/libecal/e-cal-client.h
index 4f38284..ec43d75 100644
--- a/calendar/libecal/e-cal-client.h
+++ b/calendar/libecal/e-cal-client.h
@@ -39,11 +39,6 @@ G_BEGIN_DECLS
 #define E_IS_CAL_CLIENT_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CAL_CLIENT))
 #define E_CAL_CLIENT_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CAL_CLIENT, ECalClientClass))
 
-#define CAL_BACKEND_PROPERTY_LOADED			"loaded"
-#define CAL_BACKEND_PROPERTY_ONLINE			"online"
-#define CAL_BACKEND_PROPERTY_READONLY			"readonly"
-#define CAL_BACKEND_PROPERTY_CACHE_DIR			"cache-dir"
-#define CAL_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
 #define CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS		"cal-email-address"
 #define CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS	"alarm-email-address"
 #define CAL_BACKEND_PROPERTY_DEFAULT_OBJECT		"default-object"
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index eee4375..a93f7ca 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -59,8 +59,8 @@
 #include "e-gdbus-cal-view.h"
 #include "e-gdbus-cal-factory.h"
 
-#define CAL_BACKEND_PROPERTY_CACHE_DIR			"cache-dir"
-#define CAL_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
+#define CLIENT_BACKEND_PROPERTY_CACHE_DIR		"cache-dir"
+#define CLIENT_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
 #define CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS		"cal-email-address"
 #define CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS	"alarm-email-address"
 #define CAL_BACKEND_PROPERTY_DEFAULT_OBJECT		"default-object"
@@ -1084,7 +1084,7 @@ set_local_attachment_store (ECal *ecal)
 	GError *error = NULL;
 
 	e_gdbus_cal_call_get_backend_property_sync (
-		ecal->priv->gdbus_cal, CAL_BACKEND_PROPERTY_CACHE_DIR, &cache_dir, NULL, &error);
+		ecal->priv->gdbus_cal, CLIENT_BACKEND_PROPERTY_CACHE_DIR, &cache_dir, NULL, &error);
 
 	if (error == NULL)
 		ecal->priv->local_attachment_store = cache_dir;
@@ -2117,7 +2117,7 @@ load_capabilities (ECal *ecal, GError **error)
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_OK, error);
 	}
 
-	if (!e_gdbus_cal_call_get_backend_property_sync (priv->gdbus_cal, CAL_BACKEND_PROPERTY_CAPABILITIES, &priv->capabilities, NULL, error)) {
+	if (!e_gdbus_cal_call_get_backend_property_sync (priv->gdbus_cal, CLIENT_BACKEND_PROPERTY_CAPABILITIES, &priv->capabilities, NULL, error)) {
 		UNLOCK_CACHE ();
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
 	}
diff --git a/calendar/libedata-cal/e-cal-backend.c b/calendar/libedata-cal/e-cal-backend.c
index 453f676..87d3687 100644
--- a/calendar/libedata-cal/e-cal-backend.c
+++ b/calendar/libedata-cal/e-cal-backend.c
@@ -192,13 +192,13 @@ cal_backend_get_backend_property (ECalBackend *backend, EDataCal *cal, guint32 o
 	g_return_if_fail (cal != NULL);
 	g_return_if_fail (prop_name != NULL);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_LOADED)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_LOADED)) {
 		e_data_cal_respond_get_backend_property (cal, opid, NULL, e_cal_backend_is_loaded (backend) ? "TRUE" : "FALSE");
-	} else if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_ONLINE)) {
+	} else if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_ONLINE)) {
 		e_data_cal_respond_get_backend_property (cal, opid, NULL, backend->priv->online ? "TRUE" : "FALSE");
-	} else if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_READONLY)) {
+	} else if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_READONLY)) {
 		e_data_cal_respond_get_backend_property (cal, opid, NULL, e_cal_backend_is_readonly (backend) ? "TRUE" : "FALSE");
-	} else if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CACHE_DIR)) {
+	} else if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CACHE_DIR)) {
 		e_data_cal_respond_get_backend_property (cal, opid, NULL, e_cal_backend_get_cache_dir (backend));
 	} else {
 		e_data_cal_respond_get_backend_property (cal, opid, e_data_cal_create_error_fmt (NotSupported, _("Unknown calendar property '%s'"), prop_name), NULL);
diff --git a/calendar/libedata-cal/e-cal-backend.h b/calendar/libedata-cal/e-cal-backend.h
index a540d4d..6ce39ca 100644
--- a/calendar/libedata-cal/e-cal-backend.h
+++ b/calendar/libedata-cal/e-cal-backend.h
@@ -43,11 +43,11 @@ G_BEGIN_DECLS
 #define E_IS_CAL_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_BACKEND))
 #define E_CAL_BACKEND_GET_CLASS(obj)  (E_CAL_BACKEND_CLASS (G_OBJECT_GET_CLASS (obj)))
 
-#define CAL_BACKEND_PROPERTY_LOADED			"loaded"
-#define CAL_BACKEND_PROPERTY_ONLINE			"online"
-#define CAL_BACKEND_PROPERTY_READONLY			"readonly"
-#define CAL_BACKEND_PROPERTY_CACHE_DIR			"cache-dir"
-#define CAL_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
+#define CLIENT_BACKEND_PROPERTY_LOADED			"loaded"
+#define CLIENT_BACKEND_PROPERTY_ONLINE			"online"
+#define CLIENT_BACKEND_PROPERTY_READONLY		"readonly"
+#define CLIENT_BACKEND_PROPERTY_CACHE_DIR		"cache-dir"
+#define CLIENT_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
 #define CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS		"cal-email-address"
 #define CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS	"alarm-email-address"
 #define CAL_BACKEND_PROPERTY_DEFAULT_OBJECT		"default-object"
diff --git a/libedataserver/e-client.c b/libedataserver/e-client.c
index eb66a76..798d0b9 100644
--- a/libedataserver/e-client.c
+++ b/libedataserver/e-client.c
@@ -71,6 +71,22 @@ static EOperationPool *ops_pool = NULL;
 
 G_DEFINE_ABSTRACT_TYPE (EClient, e_client, G_TYPE_OBJECT)
 
+/**
+ * Well-known client backend properties, which are common for each #EClient:
+ * @CLIENT_BACKEND_PROPERTY_LOADED: Is set to "TRUE" or "FALSE" depending
+ *   on the backend's loaded state.
+ * @CLIENT_BACKEND_PROPERTY_ONLINE: Is set to "TRUE" or "FALSE" depending
+ *   on the backend's loaded state. See also e_client_is_online().
+ * @CLIENT_BACKEND_PROPERTY_READONLY: Is set to "TRUE" or "FALSE" depending
+ *   on the backend's readonly state. See also e_client_is_readonly().
+ * @CLIENT_BACKEND_PROPERTY_CACHE_DIR: Local folder with cached data used
+ *   by the backend.
+ * @CLIENT_BACKEND_PROPERTY_CAPABILITIES: Retrieves comma-separated list
+ *   of	capabilities supported by the backend. Preferred method of retreiving
+ *   and working with capabilities is e_client_get_capabilities() and
+ *   e_client_check_capability().
+ **/
+
 GQuark
 e_client_error_quark (void)
 {
diff --git a/libedataserver/e-client.h b/libedataserver/e-client.h
index e0a1dd1..accdf91 100644
--- a/libedataserver/e-client.h
+++ b/libedataserver/e-client.h
@@ -36,6 +36,12 @@
 #define E_IS_CLIENT_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CLIENT))
 #define E_CLIENT_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CLIENT, EClientClass))
 
+#define CLIENT_BACKEND_PROPERTY_LOADED			"loaded"
+#define CLIENT_BACKEND_PROPERTY_ONLINE			"online"
+#define CLIENT_BACKEND_PROPERTY_READONLY		"readonly"
+#define CLIENT_BACKEND_PROPERTY_CACHE_DIR		"cache-dir"
+#define CLIENT_BACKEND_PROPERTY_CAPABILITIES		"capabilities"
+
 #define E_CLIENT_ERROR		e_client_error_quark ()
 
 GQuark e_client_error_quark (void) G_GNUC_CONST;
diff --git a/tests/libebook/client/test-client-examine.c b/tests/libebook/client/test-client-examine.c
index 2f38b71..731eb9f 100644
--- a/tests/libebook/client/test-client-examine.c
+++ b/tests/libebook/client/test-client-examine.c
@@ -14,11 +14,11 @@ get_known_prop_names (void)
 {
 	GSList *prop_names = NULL;
 
-	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_LOADED);
-	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_ONLINE);
-	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_READONLY);
-	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_CACHE_DIR);
-	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_CAPABILITIES);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_LOADED);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_ONLINE);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_READONLY);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_CACHE_DIR);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_CAPABILITIES);
 	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS);
 	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS);
 	prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS);
@@ -56,7 +56,7 @@ print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data
 
 	g_print ("\t   %s: ", (const gchar *) prop_name);
 
-	if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_CAPABILITIES) ||
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES) ||
 	    g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS) ||
 	    g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS) ||
 	    g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
diff --git a/tests/libecal/client/test-client-examine.c b/tests/libecal/client/test-client-examine.c
index 7a0b9e5..bc690d2 100644
--- a/tests/libecal/client/test-client-examine.c
+++ b/tests/libecal/client/test-client-examine.c
@@ -14,11 +14,11 @@ get_known_prop_names (void)
 {
 	GSList *prop_names = NULL;
 
-	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_LOADED);
-	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_ONLINE);
-	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_READONLY);
-	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_CACHE_DIR);
-	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_CAPABILITIES);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_LOADED);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_ONLINE);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_READONLY);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_CACHE_DIR);
+	prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_CAPABILITIES);
 	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS);
 	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS);
 	prop_names = g_slist_append (prop_names, (gpointer) CAL_BACKEND_PROPERTY_DEFAULT_OBJECT);
@@ -77,7 +77,7 @@ print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data
 
 	g_print ("\t   %s: ", (const gchar *) prop_name);
 
-	if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAPABILITIES)) {
+	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
 		GSList *values = e_client_util_parse_comma_strings (prop_value), *v;
 
 		



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