summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Reitter <treitter@gmail.com>2009-12-11 10:54:06 -0800
committerTravis Reitter <treitter@gmail.com>2009-12-11 16:32:04 -0800
commitab30df78aebea4b2ee8400b0ae60a9f0ea1b524f (patch)
treec3680d059303e0c89c7a9e6213f6b0bfdaa7f343
parent6653c2c542a7f08154734ca506f63c86c6fbdf39 (diff)
downloadevolution-data-server-ab30df78aebea4b2ee8400b0ae60a9f0ea1b524f.tar.gz
Port the e-book 'close' method to gdbus.
-rw-r--r--addressbook/libebook/e-book.c3
-rw-r--r--addressbook/libebook/e-data-book-gdbus-bindings.h14
2 files changed, 14 insertions, 3 deletions
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index 3ee1ce584..8f55cc55e 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 7b685a4fd..248bb8a91 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)
{