[evolution-data-server/eclient] Rename EBook/CalView's "set_restriction" to "set_fields_of_interest"



commit b2c04c30292a59a0c4c63a583918b2bf691aab2c
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 20 17:41:15 2011 +0200

    Rename EBook/CalView's "set_restriction" to "set_fields_of_interest"

 addressbook/libebook/e-book-client-view.c    |   21 ++++++++-----
 addressbook/libebook/e-book-client-view.h    |    2 +-
 addressbook/libedata-book/e-data-book-view.c |   40 +++++++++++++-------------
 addressbook/libedata-book/e-data-book-view.h |    2 +-
 addressbook/libegdbus/e-gdbus-book-view.c    |   24 ++++++++--------
 addressbook/libegdbus/e-gdbus-book-view.h    |   16 +++++-----
 calendar/libecal/e-cal-client-view.c         |   20 ++++++++-----
 calendar/libecal/e-cal-client-view.h         |    2 +-
 calendar/libedata-cal/e-data-cal-view.c      |   40 +++++++++++++-------------
 calendar/libedata-cal/e-data-cal-view.h      |    2 +-
 calendar/libegdbus/e-gdbus-cal-view.c        |   24 ++++++++--------
 calendar/libegdbus/e-gdbus-cal-view.h        |   16 +++++-----
 tests/libebook/client/test-client-get-view.c |   10 ++++++-
 tests/libecal/client/test-client-get-view.c  |    6 ++++
 14 files changed, 124 insertions(+), 101 deletions(-)
---
diff --git a/addressbook/libebook/e-book-client-view.c b/addressbook/libebook/e-book-client-view.c
index 28ecd89..8b99cf2 100644
--- a/addressbook/libebook/e-book-client-view.c
+++ b/addressbook/libebook/e-book-client-view.c
@@ -249,19 +249,24 @@ e_book_client_view_stop (EBookClientView *view, GError **error)
 }
 
 /**
- * e_book_client_view_set_restriction:
+ * e_book_client_view_set_fields_of_interest:
  * @view: An #EBookClientView object
- * @only_fields: List of field names to restrict result on
+ * @fields_of_interest: List of field names in which the client is interested
  * @error: A #GError
  *
  * Client can instruct server to which fields it is interested in only, thus
  * the server can return less data over the wire. The server can still return
  * complete objects, this is just a hint to it that the listed fields will
- * be used only. The UID field is returned always. Initial views has no restriction,
- * and using %NULL for @only_fields will unset any previous changes.
+ * be used only. The UID field is returned always. Initial views has no fields
+ * of interest and using %NULL for @fields_of_interest will unset any previous
+ * changes.
+ *
+ * Some backends can use summary information of its cache to create artifical
+ * objects, which will omit stored object parsing. If this cannot be done then
+ * it will simply return object as is stored in the cache.
  **/
 void
-e_book_client_view_set_restriction (EBookClientView *view, const GSList *only_fields, GError **error)
+e_book_client_view_set_fields_of_interest (EBookClientView *view, const GSList *fields_of_interest, GError **error)
 {
 	EBookClientViewPrivate *priv;
 
@@ -274,13 +279,13 @@ e_book_client_view_set_restriction (EBookClientView *view, const GSList *only_fi
 		GError *local_error = NULL;
 		gchar **strv;
 
-		strv = e_client_util_slist_to_strv (only_fields);
-		e_gdbus_book_view_call_set_restriction_sync (priv->gdbus_bookview, (const gchar * const *) strv, NULL, &local_error);
+		strv = e_client_util_slist_to_strv (fields_of_interest);
+		e_gdbus_book_view_call_set_fields_of_interest_sync (priv->gdbus_bookview, (const gchar * const *) strv, NULL, &local_error);
 		g_strfreev (strv);
 
 		e_client_util_unwrap_dbus_error (local_error, error, NULL, 0, 0, FALSE);
 	} else {
-		g_set_error (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR, _("Cannot set restriction, D-Bus proxy gone"));
+		g_set_error (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR, _("Cannot set fields of interest, D-Bus proxy gone"));
 	}
 }
 
diff --git a/addressbook/libebook/e-book-client-view.h b/addressbook/libebook/e-book-client-view.h
index ef814c5..c11495d 100644
--- a/addressbook/libebook/e-book-client-view.h
+++ b/addressbook/libebook/e-book-client-view.h
@@ -62,7 +62,7 @@ struct _EBookClientViewClass {
 GType			e_book_client_view_get_type		(void);
 struct _EBookClient *	e_book_client_view_get_client		(EBookClientView *view);
 gboolean		e_book_client_view_is_running		(EBookClientView *view);
-void			e_book_client_view_set_restriction	(EBookClientView *view, const GSList *only_fields, GError **error);
+void			e_book_client_view_set_fields_of_interest(EBookClientView *view, const GSList *fields_of_interest, GError **error);
 void			e_book_client_view_start		(EBookClientView *view, GError **error);
 void			e_book_client_view_stop			(EBookClientView *view, GError **error);
 
diff --git a/addressbook/libedata-book/e-data-book-view.c b/addressbook/libedata-book/e-data-book-view.c
index 685d784..6666cb5 100644
--- a/addressbook/libedata-book/e-data-book-view.c
+++ b/addressbook/libedata-book/e-data-book-view.c
@@ -60,8 +60,8 @@ struct _EDataBookViewPrivate {
 
 	guint flush_id;
 
-	/* restriction which fields is listener interested in */
-	GHashTable *only_fields;
+	/* which fields is listener interested in */
+	GHashTable *fields_of_interest;
 };
 
 static void e_data_book_view_dispose (GObject *object);
@@ -284,32 +284,32 @@ notify_add (EDataBookView *view, const gchar *id, const gchar *vcard)
 }
 
 static gboolean
-impl_DataBookView_setRestriction (EGdbusBookView *object, GDBusMethodInvocation *invocation, const gchar * const *in_only_fields, EDataBookView *view)
+impl_DataBookView_setFieldsOfInterest (EGdbusBookView *object, GDBusMethodInvocation *invocation, const gchar * const *in_fields_of_interest, EDataBookView *view)
 {
 	EDataBookViewPrivate *priv;
 	gint ii;
 
-	g_return_val_if_fail (in_only_fields != NULL, TRUE);
+	g_return_val_if_fail (in_fields_of_interest != NULL, TRUE);
 
 	priv = view->priv;
 
-	if (priv->only_fields)
-		g_hash_table_destroy (priv->only_fields);
-	priv->only_fields = NULL;
+	if (priv->fields_of_interest)
+		g_hash_table_destroy (priv->fields_of_interest);
+	priv->fields_of_interest = NULL;
 
-	for (ii = 0; in_only_fields[ii]; ii++) {
-		const gchar *field = in_only_fields[ii];
+	for (ii = 0; in_fields_of_interest[ii]; ii++) {
+		const gchar *field = in_fields_of_interest[ii];
 
 		if (!*field)
 			continue;
 
-		if (!priv->only_fields)
-			priv->only_fields = g_hash_table_new_full (str_ic_hash, str_ic_equal, g_free, NULL);
+		if (!priv->fields_of_interest)
+			priv->fields_of_interest = g_hash_table_new_full (str_ic_hash, str_ic_equal, g_free, NULL);
 
-		g_hash_table_insert (priv->only_fields, g_strdup (field), GINT_TO_POINTER (1));
+		g_hash_table_insert (priv->fields_of_interest, g_strdup (field), GINT_TO_POINTER (1));
 	}
 
-	e_gdbus_book_view_complete_set_restriction (object, invocation, NULL);
+	e_gdbus_book_view_complete_set_fields_of_interest (object, invocation, NULL);
 
 	return TRUE;
 }
@@ -672,9 +672,9 @@ e_data_book_view_init (EDataBookView *book_view)
 	g_signal_connect (priv->gdbus_object, "handle-start", G_CALLBACK (impl_DataBookView_start), book_view);
 	g_signal_connect (priv->gdbus_object, "handle-stop", G_CALLBACK (impl_DataBookView_stop), book_view);
 	g_signal_connect (priv->gdbus_object, "handle-dispose", G_CALLBACK (impl_DataBookView_dispose), book_view);
-	g_signal_connect (priv->gdbus_object, "handle-set-restriction", G_CALLBACK (impl_DataBookView_setRestriction), book_view);
+	g_signal_connect (priv->gdbus_object, "handle-set-fields-of-interest", G_CALLBACK (impl_DataBookView_setFieldsOfInterest), book_view);
 
-	priv->only_fields = NULL;
+	priv->fields_of_interest = NULL;
 	priv->running = FALSE;
 	priv->pending_mutex = g_mutex_new ();
 
@@ -741,8 +741,8 @@ e_data_book_view_finalize (GObject *object)
 	g_array_free (priv->removes, TRUE);
 	g_free (priv->card_query);
 
-	if (priv->only_fields)
-		g_hash_table_destroy (priv->only_fields);
+	if (priv->fields_of_interest)
+		g_hash_table_destroy (priv->fields_of_interest);
 
 	g_mutex_free (priv->pending_mutex);
 
@@ -802,7 +802,7 @@ e_data_book_view_get_backend (EDataBookView *book_view)
 }
 
 /**
- * e_data_book_view_get_restriction:
+ * e_data_book_view_get_fields_of_interest:
  * @view: A view object.
  *
  * Returns: Hash table of field names which the listener is interested in.
@@ -814,11 +814,11 @@ e_data_book_view_get_backend (EDataBookView *book_view)
  * compared case insensitively.
  **/
 /* const */ GHashTable *
-e_data_book_view_get_restriction (EDataBookView *view)
+e_data_book_view_get_fields_of_interest (EDataBookView *view)
 {
 	g_return_val_if_fail (E_IS_DATA_BOOK_VIEW (view), NULL);
 
-	return view->priv->only_fields;
+	return view->priv->fields_of_interest;
 }
 
 /**
diff --git a/addressbook/libedata-book/e-data-book-view.h b/addressbook/libedata-book/e-data-book-view.h
index 40ef59d..9a19aad 100644
--- a/addressbook/libedata-book/e-data-book-view.h
+++ b/addressbook/libedata-book/e-data-book-view.h
@@ -70,7 +70,7 @@ void			e_data_book_view_notify_progress        (EDataBookView *book_view, guint
 void			e_data_book_view_ref			(EDataBookView *book_view);
 void			e_data_book_view_unref			(EDataBookView *book_view);
 
-/* const */ GHashTable *e_data_book_view_get_restriction	(EDataBookView *view);
+/* const */ GHashTable *e_data_book_view_get_fields_of_interest	(EDataBookView *view);
 
 G_END_DECLS
 
diff --git a/addressbook/libegdbus/e-gdbus-book-view.c b/addressbook/libegdbus/e-gdbus-book-view.c
index dfa40a5..d73ae51 100644
--- a/addressbook/libegdbus/e-gdbus-book-view.c
+++ b/addressbook/libegdbus/e-gdbus-book-view.c
@@ -43,7 +43,7 @@ enum
 	__START_METHOD,
 	__STOP_METHOD,
 	__DISPOSE_METHOD,
-	__SET_RESTRICTION_METHOD,
+	__SET_FIELDS_OF_INTEREST_METHOD,
 	__LAST_SIGNAL
 };
 
@@ -108,10 +108,10 @@ e_gdbus_book_view_default_init (EGdbusBookViewIface *iface)
 	E_INIT_GDBUS_SIGNAL_STRV	(EGdbusBookViewIface, "Complete",	complete, __COMPLETE_SIGNAL)
 
 	/* GObject signals definitions for D-Bus methods: */
-	E_INIT_GDBUS_METHOD_VOID	(EGdbusBookViewIface, "start",		start, __START_METHOD)
-	E_INIT_GDBUS_METHOD_VOID	(EGdbusBookViewIface, "stop",		stop, __STOP_METHOD)
-	E_INIT_GDBUS_METHOD_VOID	(EGdbusBookViewIface, "dispose",	dispose, __DISPOSE_METHOD)
-	E_INIT_GDBUS_METHOD_STRV	(EGdbusBookViewIface, "setRestriction",	set_restriction, __SET_RESTRICTION_METHOD)
+	E_INIT_GDBUS_METHOD_VOID	(EGdbusBookViewIface, "start",			start, __START_METHOD)
+	E_INIT_GDBUS_METHOD_VOID	(EGdbusBookViewIface, "stop",			stop, __STOP_METHOD)
+	E_INIT_GDBUS_METHOD_VOID	(EGdbusBookViewIface, "dispose",		dispose, __DISPOSE_METHOD)
+	E_INIT_GDBUS_METHOD_STRV	(EGdbusBookViewIface, "setFieldsOfInterest",	set_fields_of_interest, __SET_FIELDS_OF_INTEREST_METHOD)
 }
 
 void
@@ -169,21 +169,21 @@ e_gdbus_book_view_call_dispose_sync (GDBusProxy *proxy, GCancellable *cancellabl
 }
 
 void
-e_gdbus_book_view_call_set_restriction (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_view_call_set_fields_of_interest (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
 {
-	e_gdbus_proxy_method_call_strv ("setRestriction", proxy, in_only_fields, cancellable, callback, user_data);
+	e_gdbus_proxy_method_call_strv ("setFieldsOfInterest", proxy, in_only_fields, cancellable, callback, user_data);
 }
 
 gboolean
-e_gdbus_book_view_call_set_restriction_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_view_call_set_fields_of_interest_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
 {
 	return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
 }
 
 gboolean
-e_gdbus_book_view_call_set_restriction_sync (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GError **error)
+e_gdbus_book_view_call_set_fields_of_interest_sync (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GError **error)
 {
-	return e_gdbus_proxy_method_call_sync_strv__void ("setRestriction", proxy, in_only_fields, cancellable, error);
+	return e_gdbus_proxy_method_call_sync_strv__void ("setFieldsOfInterest", proxy, in_only_fields, cancellable, error);
 }
 
 void
@@ -225,14 +225,14 @@ E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (book_view, Complete, error, "as")
 E_DECLARE_GDBUS_SYNC_METHOD_0	(book_view, start)
 E_DECLARE_GDBUS_SYNC_METHOD_0	(book_view, stop)
 E_DECLARE_GDBUS_SYNC_METHOD_0	(book_view, dispose)
-E_DECLARE_GDBUS_SYNC_METHOD_1	(book_view, setRestriction, only_fields, "as")
+E_DECLARE_GDBUS_SYNC_METHOD_1	(book_view, setFieldsOfInterest, fields_of_interest, "as")
 
 static const GDBusMethodInfo * const e_gdbus_book_view_method_info_pointers[] =
 {
 	&E_DECLARED_GDBUS_METHOD_INFO_NAME (book_view, start),
 	&E_DECLARED_GDBUS_METHOD_INFO_NAME (book_view, stop),
 	&E_DECLARED_GDBUS_METHOD_INFO_NAME (book_view, dispose),
-	&E_DECLARED_GDBUS_METHOD_INFO_NAME (book_view, setRestriction),
+	&E_DECLARED_GDBUS_METHOD_INFO_NAME (book_view, setFieldsOfInterest),
 	NULL
 };
 
diff --git a/addressbook/libegdbus/e-gdbus-book-view.h b/addressbook/libegdbus/e-gdbus-book-view.h
index e959afd..3f750da 100644
--- a/addressbook/libegdbus/e-gdbus-book-view.h
+++ b/addressbook/libegdbus/e-gdbus-book-view.h
@@ -115,7 +115,7 @@ struct _EGdbusBookViewIface
 	gboolean (*handle_start)		(EGdbusBookView *object, GDBusMethodInvocation *invocation);
 	gboolean (*handle_stop)			(EGdbusBookView *object, GDBusMethodInvocation *invocation);
 	gboolean (*handle_dispose)		(EGdbusBookView *object, GDBusMethodInvocation *invocation);
-	gboolean (*handle_set_restriction)	(EGdbusBookView *object, GDBusMethodInvocation *invocation, const gchar * const *in_only_fields);
+	gboolean (*handle_set_fields_of_interest)(EGdbusBookView *object, GDBusMethodInvocation *invocation, const gchar * const *in_only_fields);
 };
 
 /* D-Bus Methods */
@@ -131,15 +131,15 @@ void		e_gdbus_book_view_call_dispose		(GDBusProxy *proxy, GCancellable *cancella
 gboolean	e_gdbus_book_view_call_dispose_finish	(GDBusProxy *proxy, GAsyncResult *result, GError **error);
 gboolean	e_gdbus_book_view_call_dispose_sync	(GDBusProxy *proxy, GCancellable *cancellable, GError **error);
 
-void		e_gdbus_book_view_call_set_restriction		(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
-gboolean	e_gdbus_book_view_call_set_restriction_finish	(GDBusProxy *proxy, GAsyncResult *result, GError **error);
-gboolean	e_gdbus_book_view_call_set_restriction_sync	(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GError **error);
+void		e_gdbus_book_view_call_set_fields_of_interest		(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean	e_gdbus_book_view_call_set_fields_of_interest_finish	(GDBusProxy *proxy, GAsyncResult *result, GError **error);
+gboolean	e_gdbus_book_view_call_set_fields_of_interest_sync	(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GError **error);
 
 /* D-Bus Methods Completion Helpers */
-#define e_gdbus_book_view_complete_start		e_gdbus_complete_sync_method_void
-#define e_gdbus_book_view_complete_stop			e_gdbus_complete_sync_method_void
-#define e_gdbus_book_view_complete_dispose		e_gdbus_complete_sync_method_void
-#define e_gdbus_book_view_complete_set_restriction	e_gdbus_complete_sync_method_void
+#define e_gdbus_book_view_complete_start			e_gdbus_complete_sync_method_void
+#define e_gdbus_book_view_complete_stop				e_gdbus_complete_sync_method_void
+#define e_gdbus_book_view_complete_dispose			e_gdbus_complete_sync_method_void
+#define e_gdbus_book_view_complete_set_fields_of_interest	e_gdbus_complete_sync_method_void
 
 
 /* D-Bus Signal Emission Helpers */
diff --git a/calendar/libecal/e-cal-client-view.c b/calendar/libecal/e-cal-client-view.c
index 8a56e76..079e72a 100644
--- a/calendar/libecal/e-cal-client-view.c
+++ b/calendar/libecal/e-cal-client-view.c
@@ -486,20 +486,24 @@ e_cal_client_view_stop (ECalClientView *view, GError **error)
 }
 
 /**
- * e_cal_client_view_set_restriction:
+ * e_cal_client_view_set_fields_of_interest:
  * @view: An #ECalClientView object
- * @only_fields: List of field names to restrict result on
+ * @fields_of_interest: List of field names in which the client is interested
  * @error: A #GError
  *
  * Client can instruct server to which fields it is interested in only, thus
  * the server can return less data over the wire. The server can still return
  * complete objects, this is just a hint to it that the listed fields will
- * be used only. The UID/RID fields are returned always. Initial views has
- * no restriction, and using %NULL for @only_fields will unset any previous
+ * be used only. The UID/RID fields are returned always. Initial views has no fields
+ * of interest and using %NULL for @fields_of_interest will unset any previous
  * changes.
+ *
+ * Some backends can use summary information of its cache to create artifical
+ * objects, which will omit stored object parsing. If this cannot be done then
+ * it will simply return object as is stored in the cache.
  **/
 void
-e_cal_client_view_set_restriction (ECalClientView *view, const GSList *only_fields, GError **error)
+e_cal_client_view_set_fields_of_interest (ECalClientView *view, const GSList *fields_of_interest, GError **error)
 {
 	ECalClientViewPrivate *priv;
 
@@ -512,12 +516,12 @@ e_cal_client_view_set_restriction (ECalClientView *view, const GSList *only_fiel
 		GError *local_error = NULL;
 		gchar **strv;
 
-		strv = e_client_util_slist_to_strv (only_fields);
-		e_gdbus_cal_view_call_set_restriction_sync (priv->gdbus_calview, (const gchar * const *) strv, NULL, &local_error);
+		strv = e_client_util_slist_to_strv (fields_of_interest);
+		e_gdbus_cal_view_call_set_fields_of_interest_sync (priv->gdbus_calview, (const gchar * const *) strv, NULL, &local_error);
 		g_strfreev (strv);
 
 		e_client_util_unwrap_dbus_error (local_error, error, NULL, 0, 0, FALSE);
 	} else {
-		g_set_error (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR, _("Cannot set restriction, D-Bus proxy gone"));
+		g_set_error (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR, _("Cannot set fields of interest, D-Bus proxy gone"));
 	}
 }
diff --git a/calendar/libecal/e-cal-client-view.h b/calendar/libecal/e-cal-client-view.h
index 811339a..fe3cf27 100644
--- a/calendar/libecal/e-cal-client-view.h
+++ b/calendar/libecal/e-cal-client-view.h
@@ -59,7 +59,7 @@ struct _ECalClientViewClass {
 GType			e_cal_client_view_get_type		(void);
 struct _ECalClient *	e_cal_client_view_get_client		(ECalClientView *view);
 gboolean		e_cal_client_view_is_running		(ECalClientView *view);
-void			e_cal_client_view_set_restriction	(ECalClientView *view, const GSList *only_fields, GError **error);
+void			e_cal_client_view_set_fields_of_interest(ECalClientView *view, const GSList *fields_of_interest, GError **error);
 void			e_cal_client_view_start			(ECalClientView *view, GError **error);
 void			e_cal_client_view_stop			(ECalClientView *view, GError **error);
 
diff --git a/calendar/libedata-cal/e-data-cal-view.c b/calendar/libedata-cal/e-data-cal-view.c
index 3a9ea41..a9c7357 100644
--- a/calendar/libedata-cal/e-data-cal-view.c
+++ b/calendar/libedata-cal/e-data-cal-view.c
@@ -62,8 +62,8 @@ struct _EDataCalViewPrivate {
 	GMutex *pending_mutex;
 	guint flush_id;
 
-	/* restriction which fields is listener interested in */
-	GHashTable *only_fields;
+	/* which fields is listener interested in */
+	GHashTable *fields_of_interest;
 };
 
 G_DEFINE_TYPE (EDataCalView, e_data_cal_view, G_TYPE_OBJECT);
@@ -389,32 +389,32 @@ impl_DataCalView_dispose (EGdbusCalView *object, GDBusMethodInvocation *invocati
 }
 
 static gboolean
-impl_DataCalView_setRestriction (EGdbusCalView *object, GDBusMethodInvocation *invocation, const gchar * const *in_only_fields, EDataCalView *view)
+impl_DataCalView_setFieldsOfInterest (EGdbusCalView *object, GDBusMethodInvocation *invocation, const gchar * const *in_fields_of_interest, EDataCalView *view)
 {
 	EDataCalViewPrivate *priv;
 	gint ii;
 
-	g_return_val_if_fail (in_only_fields != NULL, TRUE);
+	g_return_val_if_fail (in_fields_of_interest != NULL, TRUE);
 
 	priv = view->priv;
 
-	if (priv->only_fields)
-		g_hash_table_destroy (priv->only_fields);
-	priv->only_fields = NULL;
+	if (priv->fields_of_interest)
+		g_hash_table_destroy (priv->fields_of_interest);
+	priv->fields_of_interest = NULL;
 
-	for (ii = 0; in_only_fields[ii]; ii++) {
-		const gchar *field = in_only_fields[ii];
+	for (ii = 0; in_fields_of_interest[ii]; ii++) {
+		const gchar *field = in_fields_of_interest[ii];
 
 		if (!*field)
 			continue;
 
-		if (!priv->only_fields)
-			priv->only_fields = g_hash_table_new_full (str_ic_hash, str_ic_equal, g_free, NULL);
+		if (!priv->fields_of_interest)
+			priv->fields_of_interest = g_hash_table_new_full (str_ic_hash, str_ic_equal, g_free, NULL);
 
-		g_hash_table_insert (priv->only_fields, g_strdup (field), GINT_TO_POINTER (1));
+		g_hash_table_insert (priv->fields_of_interest, g_strdup (field), GINT_TO_POINTER (1));
 	}
 
-	e_gdbus_cal_view_complete_set_restriction (object, invocation, NULL);
+	e_gdbus_cal_view_complete_set_fields_of_interest (object, invocation, NULL);
 
 	return TRUE;
 }
@@ -476,14 +476,14 @@ e_data_cal_view_init (EDataCalView *view)
 	g_signal_connect (priv->gdbus_object, "handle-start", G_CALLBACK (impl_DataCalView_start), view);
 	g_signal_connect (priv->gdbus_object, "handle-stop", G_CALLBACK (impl_DataCalView_stop), view);
 	g_signal_connect (priv->gdbus_object, "handle-dispose", G_CALLBACK (impl_DataCalView_dispose), view);
-	g_signal_connect (priv->gdbus_object, "handle-set-restriction", G_CALLBACK (impl_DataCalView_setRestriction), view);
+	g_signal_connect (priv->gdbus_object, "handle-set-fields-of-interest", G_CALLBACK (impl_DataCalView_setFieldsOfInterest), view);
 
 	priv->backend = NULL;
 	priv->started = FALSE;
 	priv->stopped = FALSE;
 	priv->complete = FALSE;
 	priv->sexp = NULL;
-	priv->only_fields = NULL;
+	priv->fields_of_interest = NULL;
 
 	priv->adds = g_array_sized_new (TRUE, TRUE, sizeof (gchar *), THRESHOLD_ITEMS);
 	priv->changes = g_array_sized_new (TRUE, TRUE, sizeof (gchar *), THRESHOLD_ITEMS);
@@ -552,8 +552,8 @@ e_data_cal_view_finalize (GObject *object)
 
 	g_hash_table_destroy (priv->ids);
 
-	if (priv->only_fields)
-		g_hash_table_destroy (priv->only_fields);
+	if (priv->fields_of_interest)
+		g_hash_table_destroy (priv->fields_of_interest);
 
 	g_mutex_free (priv->pending_mutex);
 
@@ -670,7 +670,7 @@ e_data_cal_view_is_completed (EDataCalView *view)
 }
 
 /**
- * e_data_cal_view_get_restriction:
+ * e_data_cal_view_get_fields_of_interest:
  * @view: A view object.
  *
  * Returns: Hash table of field names which the listener is interested in.
@@ -682,11 +682,11 @@ e_data_cal_view_is_completed (EDataCalView *view)
  * compared case insensitively.
  **/
 /* const */ GHashTable *
-e_data_cal_view_get_restriction (EDataCalView *view)
+e_data_cal_view_get_fields_of_interest (EDataCalView *view)
 {
 	g_return_val_if_fail (E_IS_DATA_CAL_VIEW (view), NULL);
 
-	return view->priv->only_fields;
+	return view->priv->fields_of_interest;
 }
 
 /**
diff --git a/calendar/libedata-cal/e-data-cal-view.h b/calendar/libedata-cal/e-data-cal-view.h
index 044ddec..0be824b 100644
--- a/calendar/libedata-cal/e-data-cal-view.h
+++ b/calendar/libedata-cal/e-data-cal-view.h
@@ -57,7 +57,7 @@ gboolean		e_data_cal_view_object_matches			(EDataCalView *view, const gchar *obj
 gboolean		e_data_cal_view_is_started			(EDataCalView *view);
 gboolean		e_data_cal_view_is_completed			(EDataCalView *view);
 gboolean		e_data_cal_view_is_stopped			(EDataCalView *view);
-/* const */ GHashTable *e_data_cal_view_get_restriction			(EDataCalView *view);
+/* const */ GHashTable *e_data_cal_view_get_fields_of_interest		(EDataCalView *view);
 
 void			e_data_cal_view_notify_objects_added		(EDataCalView *view, const GSList *objects);
 void			e_data_cal_view_notify_objects_added_1		(EDataCalView *view, const gchar *object);
diff --git a/calendar/libegdbus/e-gdbus-cal-view.c b/calendar/libegdbus/e-gdbus-cal-view.c
index be0eb1c..efb3e86 100644
--- a/calendar/libegdbus/e-gdbus-cal-view.c
+++ b/calendar/libegdbus/e-gdbus-cal-view.c
@@ -43,7 +43,7 @@ enum
 	__START_METHOD,
 	__STOP_METHOD,
 	__DISPOSE_METHOD,
-	__SET_RESTRICTION_METHOD,
+	__SET_FIELDS_OF_INTEREST_METHOD,
 	__LAST_SIGNAL
 };
 
@@ -108,10 +108,10 @@ e_gdbus_cal_view_default_init (EGdbusCalViewIface *iface)
 	E_INIT_GDBUS_SIGNAL_STRV	(EGdbusCalViewIface, "Complete",	complete, __COMPLETE_SIGNAL)
 
 	/* GObject signals definitions for D-Bus methods: */
-	E_INIT_GDBUS_METHOD_VOID	(EGdbusCalViewIface, "start",		start, __START_METHOD)
-	E_INIT_GDBUS_METHOD_VOID	(EGdbusCalViewIface, "stop",		stop, __STOP_METHOD)
-	E_INIT_GDBUS_METHOD_VOID	(EGdbusCalViewIface, "dispose",		dispose, __DISPOSE_METHOD)
-	E_INIT_GDBUS_METHOD_STRV	(EGdbusCalViewIface, "setRestriction",	set_restriction, __SET_RESTRICTION_METHOD)
+	E_INIT_GDBUS_METHOD_VOID	(EGdbusCalViewIface, "start",			start, __START_METHOD)
+	E_INIT_GDBUS_METHOD_VOID	(EGdbusCalViewIface, "stop",			stop, __STOP_METHOD)
+	E_INIT_GDBUS_METHOD_VOID	(EGdbusCalViewIface, "dispose",			dispose, __DISPOSE_METHOD)
+	E_INIT_GDBUS_METHOD_STRV	(EGdbusCalViewIface, "setFieldsOfInterest",	set_fields_of_interest, __SET_FIELDS_OF_INTEREST_METHOD)
 }
 
 void
@@ -169,21 +169,21 @@ e_gdbus_cal_view_call_dispose_sync (GDBusProxy *proxy, GCancellable *cancellable
 }
 
 void
-e_gdbus_cal_view_call_set_restriction (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_view_call_set_fields_of_interest (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
 {
-	e_gdbus_proxy_method_call_strv ("setRestriction", proxy, in_only_fields, cancellable, callback, user_data);
+	e_gdbus_proxy_method_call_strv ("setFieldsOfInterest", proxy, in_only_fields, cancellable, callback, user_data);
 }
 
 gboolean
-e_gdbus_cal_view_call_set_restriction_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_view_call_set_fields_of_interest_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
 {
 	return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
 }
 
 gboolean
-e_gdbus_cal_view_call_set_restriction_sync (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GError **error)
+e_gdbus_cal_view_call_set_fields_of_interest_sync (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GError **error)
 {
-	return e_gdbus_proxy_method_call_sync_strv__void ("setRestriction", proxy, in_only_fields, cancellable, error);
+	return e_gdbus_proxy_method_call_sync_strv__void ("setFieldsOfInterest", proxy, in_only_fields, cancellable, error);
 }
 
 void
@@ -225,14 +225,14 @@ E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (cal_view, Complete, error, "as")
 E_DECLARE_GDBUS_SYNC_METHOD_0	(cal_view, start)
 E_DECLARE_GDBUS_SYNC_METHOD_0	(cal_view, stop)
 E_DECLARE_GDBUS_SYNC_METHOD_0	(cal_view, dispose)
-E_DECLARE_GDBUS_SYNC_METHOD_1	(cal_view, setRestriction, only_fields, "as")
+E_DECLARE_GDBUS_SYNC_METHOD_1	(cal_view, setFieldsOfInterest, fields_of_interest, "as")
 
 static const GDBusMethodInfo * const e_gdbus_cal_view_method_info_pointers[] =
 {
 	&E_DECLARED_GDBUS_METHOD_INFO_NAME (cal_view, start),
 	&E_DECLARED_GDBUS_METHOD_INFO_NAME (cal_view, stop),
 	&E_DECLARED_GDBUS_METHOD_INFO_NAME (cal_view, dispose),
-	&E_DECLARED_GDBUS_METHOD_INFO_NAME (cal_view, setRestriction),
+	&E_DECLARED_GDBUS_METHOD_INFO_NAME (cal_view, setFieldsOfInterest),
 	NULL
 };
 
diff --git a/calendar/libegdbus/e-gdbus-cal-view.h b/calendar/libegdbus/e-gdbus-cal-view.h
index fa2751b..c2a5345 100644
--- a/calendar/libegdbus/e-gdbus-cal-view.h
+++ b/calendar/libegdbus/e-gdbus-cal-view.h
@@ -108,7 +108,7 @@ struct _EGdbusCalViewIface
 	gboolean (*handle_start)		(EGdbusCalView *object, GDBusMethodInvocation *invocation);
 	gboolean (*handle_stop)			(EGdbusCalView *object, GDBusMethodInvocation *invocation);
 	gboolean (*handle_dispose)		(EGdbusCalView *object, GDBusMethodInvocation *invocation);
-	gboolean (*handle_set_restriction)	(EGdbusCalView *object, GDBusMethodInvocation *invocation, const gchar * const *in_only_fields);
+	gboolean (*handle_set_fields_of_interest)(EGdbusCalView *object, GDBusMethodInvocation *invocation, const gchar * const *in_only_fields);
 };
 
 /* D-Bus Methods */
@@ -124,15 +124,15 @@ void		e_gdbus_cal_view_call_dispose		(GDBusProxy *proxy, GCancellable *cancellab
 gboolean	e_gdbus_cal_view_call_dispose_finish	(GDBusProxy *proxy, GAsyncResult *result, GError **error);
 gboolean	e_gdbus_cal_view_call_dispose_sync	(GDBusProxy *proxy, GCancellable *cancellable, GError **error);
 
-void		e_gdbus_cal_view_call_set_restriction		(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
-gboolean	e_gdbus_cal_view_call_set_restriction_finish	(GDBusProxy *proxy, GAsyncResult *result, GError **error);
-gboolean	e_gdbus_cal_view_call_set_restriction_sync	(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GError **error);
+void		e_gdbus_cal_view_call_set_fields_of_interest		(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
+gboolean	e_gdbus_cal_view_call_set_fields_of_interest_finish	(GDBusProxy *proxy, GAsyncResult *result, GError **error);
+gboolean	e_gdbus_cal_view_call_set_fields_of_interest_sync	(GDBusProxy *proxy, const gchar * const *in_only_fileds, GCancellable *cancellable, GError **error);
 
 /* D-Bus Methods Completion Helpers */
-#define e_gdbus_cal_view_complete_start			e_gdbus_complete_sync_method_void
-#define e_gdbus_cal_view_complete_stop			e_gdbus_complete_sync_method_void
-#define e_gdbus_cal_view_complete_dispose		e_gdbus_complete_sync_method_void
-#define e_gdbus_cal_view_complete_set_restriction	e_gdbus_complete_sync_method_void
+#define e_gdbus_cal_view_complete_start				e_gdbus_complete_sync_method_void
+#define e_gdbus_cal_view_complete_stop				e_gdbus_complete_sync_method_void
+#define e_gdbus_cal_view_complete_dispose			e_gdbus_complete_sync_method_void
+#define e_gdbus_cal_view_complete_set_fields_of_interest	e_gdbus_complete_sync_method_void
 
 /* D-Bus Signal Emission Helpers */
 void e_gdbus_cal_view_emit_objects_added	(EGdbusCalView *object, const gchar * const *arg_objects);
diff --git a/tests/libebook/client/test-client-get-view.c b/tests/libebook/client/test-client-get-view.c
index 4d2563a..de7829f 100644
--- a/tests/libebook/client/test-client-get-view.c
+++ b/tests/libebook/client/test-client-get-view.c
@@ -38,11 +38,19 @@ complete (EBookClientView *view, const GError *error)
 static void
 setup_and_start_view (EBookClientView *view)
 {
+	GError *error = NULL;
+
 	g_signal_connect (view, "objects-added", G_CALLBACK (objects_added), NULL);
 	g_signal_connect (view, "objects-removed", G_CALLBACK (objects_removed), NULL);
 	g_signal_connect (view, "complete", G_CALLBACK (complete), NULL);
 
-	e_book_client_view_start (view, NULL);
+	e_book_client_view_set_fields_of_interest (view, NULL, &error);
+	if (error)
+		report_error ("set fields of interest", &error);
+
+	e_book_client_view_start (view, &error);
+	if (error)
+		report_error ("start view", &error);
 }
 
 static void
diff --git a/tests/libecal/client/test-client-get-view.c b/tests/libecal/client/test-client-get-view.c
index 4ce3456..2142b22 100644
--- a/tests/libecal/client/test-client-get-view.c
+++ b/tests/libecal/client/test-client-get-view.c
@@ -147,6 +147,9 @@ async_get_view_ready (GObject *source_object, GAsyncResult *result, gpointer use
 
 	g_object_set_data_full (G_OBJECT (cal_client), "cal-view", view, g_object_unref);
 
+	e_cal_client_view_set_fields_of_interest (view, NULL, &error);
+	if (error)
+		report_error ("set fields of interest", &error);
 	e_cal_client_view_start (view, NULL);
 
 	alter_cal_client (cal_client);
@@ -194,6 +197,9 @@ main (gint argc, gchar **argv)
 	g_signal_connect (view, "objects_removed", G_CALLBACK (objects_removed_cb), cal_client);
 	g_signal_connect (view, "complete", G_CALLBACK (complete_cb), cal_client);
 
+	e_cal_client_view_set_fields_of_interest (view, NULL, &error);
+	if (error)
+		report_error ("set fields of interest", &error);
 	e_cal_client_view_start (view, NULL);
 
 	start_in_thread_with_main_loop (alter_cal_client, cal_client);



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