[evolution-data-server/treitter-client-gdbus] Port the e-book 'close' method to gdbus.



commit ab30df78aebea4b2ee8400b0ae60a9f0ea1b524f
Author: Travis Reitter <treitter gmail com>
Date:   Fri Dec 11 10:54:06 2009 -0800

    Port the e-book 'close' method to gdbus.

 addressbook/libebook/e-book.c                     |    3 ---
 addressbook/libebook/e-data-book-gdbus-bindings.h |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index 3ee1ce5..8f55cc5 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -128,7 +128,6 @@ e_book_dispose (GObject *object)
 
 	if (book->priv->proxy) {
 		LOCK_CONN ();
-		org_gnome_evolution_dataserver_addressbook_Book_close (book->priv->proxy, NULL);
 		g_object_unref (book->priv->proxy);
 		book->priv->proxy = NULL;
 		UNLOCK_CONN ();
@@ -137,9 +136,7 @@ e_book_dispose (GObject *object)
 		g_object_weak_unref (G_OBJECT (book->priv->gdbus_proxy), proxy_destroyed, book);
 
 		LOCK_CONN ();
-		/* FIXME: do this with the new bindings
 		e_data_book_gdbus_close_sync (book->priv->gdbus_proxy, NULL);
-		*/
 		g_object_unref (book->priv->gdbus_proxy);
 		book->priv->gdbus_proxy = NULL;
 		UNLOCK_CONN ();
diff --git a/addressbook/libebook/e-data-book-gdbus-bindings.h b/addressbook/libebook/e-data-book-gdbus-bindings.h
index 7b685a4..248bb8a 100644
--- a/addressbook/libebook/e-data-book-gdbus-bindings.h
+++ b/addressbook/libebook/e-data-book-gdbus-bindings.h
@@ -83,6 +83,20 @@ e_data_book_gdbus_open (GDBusProxy     *proxy,
 }
 
 static gboolean
+e_data_book_gdbus_close_sync (GDBusProxy      *proxy,
+			      GError         **error)
+{
+	GVariant *parameters;
+	GVariant *retvals;
+
+	parameters = g_variant_new ("()");
+	retvals = g_dbus_proxy_invoke_method_sync (proxy, "close", parameters,
+							-1, NULL, error);
+
+	return demarshal_retvals__VOID (retvals);
+}
+
+static gboolean
 e_data_book_gdbus_remove_sync (GDBusProxy  *proxy,
 			       GError     **error)
 {



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