[PATCH] libnm-glib cleanups and fixes



>From 9b662ac8676f6a823a1fadee90645c65036e7953 Mon Sep 17 00:00:00 2001
From: Dan Winship <danw gnome org>
Date: Thu, 5 Jan 2012 13:36:03 -0500
Subject: [PATCH 01/12] libnm-glib: Fix _nm_string_array_demarshal

dbus-glib returns 'as' results as G_TYPE_STRV (NULL-terminated
char**), not DBUS_TYPE_G_ARRAY_OF_STRING (GPtrArray of char*).
---
 libnm-glib/nm-types.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libnm-glib/nm-types.c b/libnm-glib/nm-types.c
index 6d76787..8598113 100644
--- a/libnm-glib/nm-types.c
+++ b/libnm-glib/nm-types.c
@@ -172,9 +172,9 @@ nm_string_array_get_type (void)
 gboolean
 _nm_string_array_demarshal (GValue *value, GPtrArray **dest)
 {
-	GPtrArray *array;
+	char **array;
 
-	if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_STRING))
+	if (!G_VALUE_HOLDS (value, G_TYPE_STRV))
 		return FALSE;
 
 	if (*dest) {
@@ -182,13 +182,13 @@ _nm_string_array_demarshal (GValue *value, GPtrArray **dest)
 		*dest = NULL;
 	}
 
-	array = (GPtrArray *) g_value_get_boxed (value);
-	if (array && array->len) {
+	array = (char **) g_value_get_boxed (value);
+	if (array && array[0]) {
 		int i;
 
-		*dest = g_ptr_array_sized_new (array->len);
-		for (i = 0; i < array->len; i++)
-			g_ptr_array_add (*dest, g_strdup (g_ptr_array_index (array, i)));
+		*dest = g_ptr_array_new ();
+		for (i = 0; array[i]; i++)
+			g_ptr_array_add (*dest, g_strdup (array[i]));
 	}
 
 	return TRUE;
-- 
1.7.7.5

>From 4788f6930590ca23475774c2125973169f6cd240 Mon Sep 17 00:00:00 2001
From: Dan Winship <danw gnome org>
Date: Thu, 5 Jan 2012 13:34:58 -0500
Subject: [PATCH 02/12] libnm-glib: implement NMActiveConnection uuid property

This property existed as a #define and a get method, but the actual
GObject property itself was accidentally never implemented.
---
 libnm-glib/nm-active-connection.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/libnm-glib/nm-active-connection.c b/libnm-glib/nm-active-connection.c
index ddde4cc..55c50c9 100644
--- a/libnm-glib/nm-active-connection.c
+++ b/libnm-glib/nm-active-connection.c
@@ -371,6 +371,9 @@ get_property (GObject *object,
 	case PROP_CONNECTION:
 		g_value_set_string (value, nm_active_connection_get_connection (self));
 		break;
+	case PROP_UUID:
+		g_value_set_string (value, nm_active_connection_get_uuid (self));
+		break;
 	case PROP_SPECIFIC_OBJECT:
 		g_value_set_boxed (value, nm_active_connection_get_specific_object (self));
 		break;
@@ -483,6 +486,19 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
 						      G_PARAM_READABLE));
 
 	/**
+	 * NMActiveConnection:uuid:
+	 *
+	 * The active connection's UUID
+	 **/
+	g_object_class_install_property
+		(object_class, PROP_UUID,
+		 g_param_spec_string (NM_ACTIVE_CONNECTION_UUID,
+						      "UUID",
+						      "UUID",
+						      NULL,
+						      G_PARAM_READABLE));
+
+	/**
 	 * NMActiveConnection:specific-object:
 	 *
 	 * The specific object's path of the active connection.
-- 
1.7.7.5

>From ee00af5446ae829b294dffc3ceb035ca851385c9 Mon Sep 17 00:00:00 2001
From: Dan Winship <danw gnome org>
Date: Wed, 4 Jan 2012 13:52:46 -0500
Subject: [PATCH 03/12] libnm-glib: pre-emptively avoid some -Wshadow errors

including <gio/gio.h> will drag in some additional system headers that
result in new -Wshadow warnings. Fix those.
---
 libnm-glib/nm-client.c |    6 +++---
 libnm-glib/nm-client.h |    2 +-
 libnm-glib/nm-types.c  |    8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c
index 918bc99..c622d25 100644
--- a/libnm-glib/nm-client.c
+++ b/libnm-glib/nm-client.c
@@ -1160,14 +1160,14 @@ nm_client_networking_set_enabled (NMClient *client, gboolean enable)
 /**
  * nm_client_sleep:
  * @client: a #NMClient
- * @sleep: %TRUE to put the daemon to sleep
+ * @sleep_: %TRUE to put the daemon to sleep
  *
  * Deprecated; use nm_client_networking_set_enabled() instead.
  **/
 void
-nm_client_sleep (NMClient *client, gboolean sleep)
+nm_client_sleep (NMClient *client, gboolean sleep_)
 {
-	nm_client_networking_set_enabled (client, !sleep);
+	nm_client_networking_set_enabled (client, !sleep_);
 }
 
 /**
diff --git a/libnm-glib/nm-client.h b/libnm-glib/nm-client.h
index c9fd7c1..44f1d2b 100644
--- a/libnm-glib/nm-client.h
+++ b/libnm-glib/nm-client.h
@@ -156,7 +156,7 @@ const char *nm_client_get_version        (NMClient *client);
 NMState   nm_client_get_state            (NMClient *client);
 gboolean  nm_client_get_manager_running  (NMClient *client);
 const GPtrArray *nm_client_get_active_connections (NMClient *client);
-void      nm_client_sleep                (NMClient *client, gboolean sleep);
+void      nm_client_sleep                (NMClient *client, gboolean sleep_);
 
 NMClientPermissionResult nm_client_get_permission_result (NMClient *client,
                                                           NMClientPermission permission);
diff --git a/libnm-glib/nm-types.c b/libnm-glib/nm-types.c
index 8598113..098af8d 100644
--- a/libnm-glib/nm-types.c
+++ b/libnm-glib/nm-types.c
@@ -323,11 +323,11 @@ _nm_ip6_address_array_copy (GPtrArray *src)
 	dest = g_ptr_array_sized_new (src->len);
 	for (i = 0; i < src->len; i++) {
 		struct in6_addr *addr = g_ptr_array_index (src, i);
-		struct in6_addr *dup;
+		struct in6_addr *copy;
 
-		dup = g_malloc0 (sizeof (struct in6_addr));
-		memcpy (dup, addr, sizeof (struct in6_addr));
-		g_ptr_array_add (dest, dup);
+		copy = g_malloc0 (sizeof (struct in6_addr));
+		memcpy (copy, addr, sizeof (struct in6_addr));
+		g_ptr_array_add (dest, copy);
 	}
 	return dest;
 }
-- 
1.7.7.5

>From 77fee04413947545463dbfe08e5575e25313dcce Mon Sep 17 00:00:00 2001
From: Dan Winship <danw gnome org>
Date: Wed, 21 Dec 2011 08:21:00 -0500
Subject: [PATCH 04/12] libnm-glib: remove nm-dbus-utils.[ch]

The code hasn't been used in a very long time.
---
 docs/libnm-glib/Makefile.am |    1 -
 libnm-glib/Makefile.am      |    2 -
 libnm-glib/nm-dbus-utils.c  |  215 -------------------------------------------
 libnm-glib/nm-dbus-utils.h  |   57 -----------
 4 files changed, 0 insertions(+), 275 deletions(-)
 delete mode 100644 libnm-glib/nm-dbus-utils.c
 delete mode 100644 libnm-glib/nm-dbus-utils.h

diff --git a/docs/libnm-glib/Makefile.am b/docs/libnm-glib/Makefile.am
index dcca994..2057e3e 100644
--- a/docs/libnm-glib/Makefile.am
+++ b/docs/libnm-glib/Makefile.am
@@ -30,7 +30,6 @@ CFILE_GLOB=$(top_srcdir)/libnm-glib/*.c
 
 # Header files to ignore when scanning.
 IGNORE_HFILES= \
-	nm-dbus-utils.h \
 	nm-device-private.h \
 	nm-object-cache.h \
 	nm-object-private.h \
diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am
index df98fa1..e6c077a 100644
--- a/libnm-glib/Makefile.am
+++ b/libnm-glib/Makefile.am
@@ -98,7 +98,6 @@ libnmvpn_HEADERS = \
 libnm_glib_la_csources = \
 	nm-object.c \
 	nm-client.c \
-	nm-dbus-utils.c \
 	nm-device.c \
 	nm-device-ethernet.c \
 	nm-device-infiniband.c \
@@ -122,7 +121,6 @@ libnm_glib_la_csources = \
 
 libnm_glib_la_private_headers = \
 	nm-object-private.h \
-	nm-dbus-utils.h \
 	nm-device-private.h \
 	nm-types-private.h \
 	nm-object-cache.h \
diff --git a/libnm-glib/nm-dbus-utils.c b/libnm-glib/nm-dbus-utils.c
deleted file mode 100644
index f641f18..0000000
--- a/libnm-glib/nm-dbus-utils.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * libnm_glib -- Access network status & information from glib applications
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2007 - 2008 Novell, Inc.
- */
-
-#include "nm-dbus-utils.h"
-
-char *
-_nm_dbus_get_string_property (DBusGProxy *proxy,
-							 const char *interface,
-							 const char *prop_name)
-{
-	GError *err = NULL;
-	char *str = NULL;
-	GValue value = {0,};
-
-	g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), NULL);
-
-	if (dbus_g_proxy_call (proxy, "Get", &err,
-						   G_TYPE_STRING, interface,
-						   G_TYPE_STRING, prop_name,
-						   G_TYPE_INVALID,
-						   G_TYPE_VALUE, &value,
-						   G_TYPE_INVALID)) {
-		str = g_strdup (g_value_get_string (&value));
-	} else {
-		g_warning ("Error in device_get_property: %s\n", err->message);
-		g_error_free (err);
-	}
-
-	return str;
-}
-
-char *
-_nm_dbus_get_object_path_property (DBusGProxy *proxy,
-								  const char *interface,
-								  const char *prop_name)
-{
-	GError *err = NULL;
-	char *path = NULL;
-	GValue value = {0,};
-
-	g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), NULL);
-
-	if (dbus_g_proxy_call (proxy, "Get", &err,
-						   G_TYPE_STRING, interface,
-						   G_TYPE_STRING, prop_name,
-						   G_TYPE_INVALID,
-						   G_TYPE_VALUE, &value,
-						   G_TYPE_INVALID)) {
-		path = g_strdup (g_value_get_boxed (&value));
-	} else {
-		g_warning ("Error in device_get_property: %s\n", err->message);
-		g_error_free (err);
-	}
-
-	return path;
-}
-
-gint32
-_nm_dbus_get_int_property (DBusGProxy *proxy,
-						  const char *interface,
-						  const char *prop_name)
-{
-	GError *err = NULL;
-	gint32 i = 0;
-	GValue value = {0,};
-
-	g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), 0);
-
-	if (dbus_g_proxy_call (proxy, "Get", &err,
-						   G_TYPE_STRING, interface,
-						   G_TYPE_STRING, prop_name,
-						   G_TYPE_INVALID,
-						   G_TYPE_VALUE, &value,
-						   G_TYPE_INVALID)) {
-		i = g_value_get_int (&value);
-	} else {
-		g_warning ("Error in device_get_property: %s\n", err->message);
-		g_error_free (err);
-	}
-
-	return i;
-}
-
-guint32
-_nm_dbus_get_uint_property (DBusGProxy *proxy,
-						   const char *interface,
-						   const char *prop_name)
-{
-	GError *err = NULL;
-	guint32 i = 0;
-	GValue value = {0,};
-
-	g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), 0);
-
-	if (dbus_g_proxy_call (proxy, "Get", &err,
-						   G_TYPE_STRING, interface,
-						   G_TYPE_STRING, prop_name,
-						   G_TYPE_INVALID,
-						   G_TYPE_VALUE, &value,
-						   G_TYPE_INVALID)) {
-		i = g_value_get_uint (&value);
-	} else {
-		g_warning ("Error in device_get_property: %s\n", err->message);
-		g_error_free (err);
-	}
-
-	return i;
-}
-
-gboolean
-_nm_dbus_get_property (DBusGProxy *proxy,
-					  const char *interface,
-					  const char *prop_name,
-					  GValue *value)
-{
-	DBusGProxy *properties_proxy;
-	GError *err = NULL;
-	gboolean ret = TRUE;
-
-	g_return_val_if_fail (proxy != NULL, FALSE);
-	g_return_val_if_fail (interface != NULL, FALSE);
-	g_return_val_if_fail (prop_name != NULL, FALSE);
-
-	properties_proxy = dbus_g_proxy_new_from_proxy (proxy,
-													"org.freedesktop.DBus.Properties",
-													dbus_g_proxy_get_path (proxy));
-
-	if (!dbus_g_proxy_call (properties_proxy, "Get", &err,
-							G_TYPE_STRING, interface,
-							G_TYPE_STRING, prop_name,
-							G_TYPE_INVALID,
-							G_TYPE_VALUE, value,
-							G_TYPE_INVALID)) {
-		g_warning ("Error in device_get_property: %s\n", err->message);
-		g_error_free (err);
-		ret = FALSE;
-	}
-
-	g_object_unref (properties_proxy);
-
-	return ret;
-}
-
-void
-_nm_dbus_set_property (DBusGProxy *proxy,
-					  const char *interface,
-					  const char *prop_name,
-					  GValue *value)
-{
-	DBusGProxy *properties_proxy;
-
-	g_return_if_fail (proxy != NULL);
-	g_return_if_fail (interface != NULL);
-	g_return_if_fail (prop_name != NULL);
-
-	properties_proxy = dbus_g_proxy_new_from_proxy (proxy,
-													"org.freedesktop.DBus.Properties",
-													dbus_g_proxy_get_path (proxy));
-
-	dbus_g_proxy_call_no_reply (properties_proxy, "Set",
-								G_TYPE_STRING, interface,
-								G_TYPE_STRING, prop_name,
-								G_TYPE_VALUE, value,
-								G_TYPE_INVALID);
-
-	g_object_unref (properties_proxy);
-}
-
-char *
-_nm_dbus_introspect (DBusGConnection *connection,
-					const char *interface,
-					const char *path)
-{
-	DBusGProxy *remote_object_introspectable;
-	char *introspect_data = NULL;
-	GError *err = NULL;
-
-	g_return_val_if_fail (connection != NULL, NULL);
-	g_return_val_if_fail (interface != NULL, NULL);
-	g_return_val_if_fail (path != NULL, NULL);
-
-	remote_object_introspectable = dbus_g_proxy_new_for_name (connection,
-															  interface,
-															  path,
-															  "org.freedesktop.DBus.Introspectable");
-	if (!dbus_g_proxy_call (remote_object_introspectable, "Introspect", &err,
-							G_TYPE_INVALID,
-							G_TYPE_STRING, &introspect_data, G_TYPE_INVALID)) {
-		g_error ("Failed to complete Introspect %s", err->message);
-		g_error_free (err);
-	}
-
-	g_object_unref (G_OBJECT (remote_object_introspectable));
-
-	return introspect_data;
-}
diff --git a/libnm-glib/nm-dbus-utils.h b/libnm-glib/nm-dbus-utils.h
deleted file mode 100644
index 4002c3a..0000000
--- a/libnm-glib/nm-dbus-utils.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * libnm_glib -- Access network status & information from glib applications
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2007 - 2008 Novell, Inc.
- */
-
-#ifndef NM_UTILS_H
-#define NM_UTILS_H
-
-#include <dbus/dbus-glib.h>
-
-char *_nm_dbus_get_string_property (DBusGProxy *proxy,
-								   const char *interface,
-								   const char *prop_name);
-
-char *_nm_dbus_get_object_path_property (DBusGProxy *proxy,
-										const char *interface,
-										const char *prop_name);
-
-gint32 _nm_dbus_get_int_property (DBusGProxy *proxy,
-								 const char *interface,
-								 const char *prop_name);
-
-guint32 _nm_dbus_get_uint_property (DBusGProxy *proxy,
-								   const char *interface,
-								   const char *prop_name);
-
-gboolean  _nm_dbus_get_property (DBusGProxy *proxy,
-								const char *interface,
-								const char *prop_name,
-								GValue *value);
-void      _nm_dbus_set_property (DBusGProxy *proxy,
-								const char *interface,
-								const char *prop_name,
-								GValue *value);
-
-char     *_nm_dbus_introspect   (DBusGConnection *connection,
-								const char *interface,
-								const char *path);
-
-#endif /* NM_UTILS_H */
-- 
1.7.7.5

>From 05ce09fecd95cd8b45f4c45c5fa37cf01c0b5a7c Mon Sep 17 00:00:00 2001
From: Dan Winship <danw gnome org>
Date: Mon, 9 Jan 2012 11:15:59 -0500
Subject: [PATCH 05/12] libnm-glib: don't use client-side generated dbus-glib
 bindings

Most of the code was using dbus_g_proxy_call() directly, but there
were some leftover uses of the generated bindings. Make things more
consistent by using dbus_g_proxy_call() everywhere, and stop building
the -bindings.h files.
---
 libnm-glib/Makefile.am            |   70 +-------------------------------
 libnm-glib/nm-access-point.c      |    2 -
 libnm-glib/nm-active-connection.c |    2 -
 libnm-glib/nm-client.c            |   82 +++++++++++++++++++++++-------------
 libnm-glib/nm-device-bt.c         |    2 -
 libnm-glib/nm-device-ethernet.c   |    2 -
 libnm-glib/nm-device-infiniband.c |    2 -
 libnm-glib/nm-device-wifi.c       |    7 ++-
 libnm-glib/nm-device-wimax.c      |    7 ++-
 libnm-glib/nm-device.c            |   14 ++++---
 libnm-glib/nm-remote-connection.c |   75 ++++++++++++++++++++++-----------
 libnm-glib/nm-remote-settings.c   |   16 ++++---
 libnm-glib/nm-vpn-connection.c    |    1 -
 13 files changed, 128 insertions(+), 154 deletions(-)

diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am
index e6c077a..318a463 100644
--- a/libnm-glib/Makefile.am
+++ b/libnm-glib/Makefile.am
@@ -7,24 +7,7 @@ INCLUDES = \
 	-I$(top_builddir)/marshallers
 
 BUILT_SOURCES = \
-	nm-access-point-bindings.h \
-	nm-client-bindings.h \
-	nm-device-bindings.h \
-	nm-device-ethernet-bindings.h \
-	nm-device-infiniband-bindings.h \
-	nm-device-wifi-bindings.h \
-	nm-device-bt-bindings.h \
-	nm-settings-connection-bindings.h \
-	nm-device-wimax-bindings.h \
-	nm-device-modem-bindings.h \
-	nm-settings-bindings.h \
-	nm-vpn-connection-bindings.h \
 	nm-vpn-plugin-glue.h \
-	nm-active-connection-bindings.h \
-	nm-ip4-config-bindings.h \
-	nm-dhcp4-config-bindings.h \
-	nm-ip6-config-bindings.h \
-	nm-dhcp6-config-bindings.h \
 	nm-secret-agent-glue.h
 
 
@@ -182,63 +165,12 @@ libnm_glib_test_la_LIBADD = \
 
 #####################################################
 
-nm-client-bindings.h: $(top_srcdir)/introspection/nm-manager.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_client --mode=glib-client --output=$@ $<
-
-nm-device-bindings.h: $(top_srcdir)/introspection/nm-device.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_device --mode=glib-client --output=$@ $<
-
-nm-device-ethernet-bindings.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-client --output=$@ $<
-
-nm-device-infiniband-bindings.h: $(top_srcdir)/introspection/nm-device-infiniband.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_infiniband --mode=glib-client --output=$@ $<
-
-nm-device-wifi-bindings.h: $(top_srcdir)/introspection/nm-device-wifi.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_wifi --mode=glib-client --output=$@ $<
-
-nm-device-bt-bindings.h: $(top_srcdir)/introspection/nm-device-bt.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_bt --mode=glib-client --output=$@ $<
-
-nm-access-point-bindings.h: $(top_srcdir)/introspection/nm-access-point.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_access_point --mode=glib-client --output=$@ $<
-
-nm-settings-bindings.h: $(top_srcdir)/introspection/nm-settings.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-client --output=$@ $<
-
-nm-settings-connection-bindings.h: $(top_srcdir)/introspection/nm-settings-connection.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_settings_connection --mode=glib-client --output=$@ $<
-
-nm-vpn-connection-bindings.h: $(top_srcdir)/introspection/nm-vpn-connection.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-client --output=$@ $<
-
 nm-vpn-plugin-glue.h: $(top_srcdir)/introspection/nm-vpn-plugin.xml
 	$(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_plugin --mode=glib-server --output=$@ $<
 
-nm-active-connection-bindings.h: $(top_srcdir)/introspection/nm-active-connection.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_active_connection --mode=glib-client --output=$@ $<
-
-nm-ip4-config-bindings.h: $(top_srcdir)/introspection/nm-ip4-config.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_ip4_config --mode=glib-client --output=$@ $<
-
-nm-dhcp4-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp4-config.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp4_config --mode=glib-client --output=$@ $<
-
-nm-ip6-config-bindings.h: $(top_srcdir)/introspection/nm-ip6-config.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_ip6_config --mode=glib-client --output=$@ $<
-
-nm-dhcp6-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp6-config.xml
-	$(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp6_config --mode=glib-client --output=$@ $<
-
 nm-secret-agent-glue.h: $(top_srcdir)/introspection/nm-secret-agent.xml
 	$(AM_V_GEN) dbus-binding-tool --prefix=nm_secret_agent --mode=glib-server --output=$@ $<
 
-nm-device-wimax-bindings.h: $(top_srcdir)/introspection/nm-device-wimax.xml
-	dbus-binding-tool --prefix=nm_device_wimax --mode=glib-client --output=$@ $<
-
-nm-device-modem-bindings.h: $(top_srcdir)/introspection/nm-device-modem.xml
-	dbus-binding-tool --prefix=nm_device_modem --mode=glib-client --output=$@ $<
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libnm-glib.pc libnm-glib-vpn.pc
 
@@ -246,7 +178,7 @@ DISTCLEANFILES = libnm-glib.pc libnm-glib.pc
 
 EXTRA_DIST = libnm-glib.pc.in libnm-glib-vpn.pc.in libnm-glib.ver libnm-glib-vpn.ver
 
-CLEANFILES = $(BUILT_SOURCES) *-bindings.h *-glue.h
+CLEANFILES = $(BUILT_SOURCES)
 
 -include $(INTROSPECTION_MAKEFILE)
 INTROSPECTION_GIRS =
diff --git a/libnm-glib/nm-access-point.c b/libnm-glib/nm-access-point.c
index 7e342e6..1632059 100644
--- a/libnm-glib/nm-access-point.c
+++ b/libnm-glib/nm-access-point.c
@@ -36,8 +36,6 @@
 #include "nm-types-private.h"
 #include "nm-object-private.h"
 
-#include "nm-access-point-bindings.h"
-
 G_DEFINE_TYPE (NMAccessPoint, nm_access_point, NM_TYPE_OBJECT)
 
 #define NM_ACCESS_POINT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACCESS_POINT, NMAccessPointPrivate))
diff --git a/libnm-glib/nm-active-connection.c b/libnm-glib/nm-active-connection.c
index 55c50c9..4b2c642 100644
--- a/libnm-glib/nm-active-connection.c
+++ b/libnm-glib/nm-active-connection.c
@@ -30,8 +30,6 @@
 #include "nm-device.h"
 #include "nm-connection.h"
 
-#include "nm-active-connection-bindings.h"
-
 G_DEFINE_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_OBJECT)
 
 #define NM_ACTIVE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionPrivate))
diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c
index c622d25..897de6c 100644
--- a/libnm-glib/nm-client.c
+++ b/libnm-glib/nm-client.c
@@ -37,8 +37,6 @@
 #include "nm-object-cache.h"
 #include "nm-dbus-glib-types.h"
 
-#include "nm-client-bindings.h"
-
 void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
 
 G_DEFINE_TYPE (NMClient, nm_client, NM_TYPE_OBJECT)
@@ -461,14 +459,19 @@ get_permissions_sync (NMClient *self)
 
 static void
 get_permissions_reply (DBusGProxy *proxy,
-                       GHashTable *permissions,
-                       GError *error,
+                       DBusGProxyCall *call,
                        gpointer user_data)
 {
 	NMClient *self = NM_CLIENT (user_data);
+	GHashTable *permissions;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, call, &error,
+	                       DBUS_TYPE_G_MAP_OF_STRING, &permissions,
+	                       G_TYPE_INVALID);
 	NM_CLIENT_GET_PRIVATE (self)->perm_call = NULL;
 	update_permissions (NM_CLIENT (user_data), error ? NULL : permissions);
+	g_clear_error (&error);
 }
 
 static void
@@ -478,9 +481,9 @@ client_recheck_permissions (DBusGProxy *proxy, gpointer user_data)
 	NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (self);
 
 	if (!priv->perm_call) {
-		priv->perm_call = org_freedesktop_NetworkManager_get_permissions_async (NM_CLIENT_GET_PRIVATE (self)->client_proxy,
-	                                                                            get_permissions_reply,
-	                                                                            self);
+		priv->perm_call = dbus_g_proxy_begin_call (NM_CLIENT_GET_PRIVATE (self)->client_proxy, "GetPermissions",
+		                                           get_permissions_reply, self, NULL,
+		                                           G_TYPE_INVALID);
 	}
 }
 
@@ -508,7 +511,10 @@ nm_client_get_devices (NMClient *client)
 	if (priv->devices)
 		return handle_ptr_array_return (priv->devices);
 
-	if (!org_freedesktop_NetworkManager_get_devices (priv->client_proxy, &temp, &error)) {
+	if (!dbus_g_proxy_call (priv->client_proxy, "GetDevices", &error,
+	                        G_TYPE_INVALID,
+	                        DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &temp,
+	                        G_TYPE_INVALID)) {
 		g_warning ("%s: error getting devices: %s\n", __func__, error->message);
 		g_error_free (error);
 		return NULL;
@@ -664,17 +670,22 @@ recheck_pending_activations (NMClient *self)
 
 static void
 activate_cb (DBusGProxy *proxy,
-             char *path,
-             GError *error,
+             DBusGProxyCall *call,
              gpointer user_data)
 {
 	ActivateInfo *info = user_data;
+	char *path;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, call, &error,
+	                       DBUS_TYPE_G_OBJECT_PATH, &path,
+	                       G_TYPE_INVALID);
 	if (error) {
 		activate_info_complete (info, NULL, error);
 		activate_info_free (info);
+		g_clear_error (&error);
 	} else {
-		info->active_path = g_strdup (path);
+		info->active_path = path;
 		recheck_pending_activations (info->client);
 	}
 }
@@ -726,29 +737,34 @@ nm_client_activate_connection (NMClient *client,
 	priv = NM_CLIENT_GET_PRIVATE (client);
 	priv->pending_activations = g_slist_prepend (priv->pending_activations, info);
 
-	org_freedesktop_NetworkManager_activate_connection_async (priv->client_proxy,
-	                                                          nm_connection_get_path (connection),
-	                                                          device ? nm_object_get_path (NM_OBJECT (device)) : "/",
-	                                                          specific_object ? specific_object : "/",
-	                                                          activate_cb,
-	                                                          info);
+	dbus_g_proxy_begin_call (priv->client_proxy, "ActivateConnection",
+	                         activate_cb, info, NULL,
+	                         DBUS_TYPE_G_OBJECT_PATH, nm_connection_get_path (connection),
+	                         DBUS_TYPE_G_OBJECT_PATH, device ? nm_object_get_path (NM_OBJECT (device)) : "/",
+	                         DBUS_TYPE_G_OBJECT_PATH, specific_object ? specific_object : "/",
+	                         G_TYPE_INVALID);
 }
 
 static void
 add_activate_cb (DBusGProxy *proxy,
-                 char *connection_path,
-                 char *active_path,
-                 GError *error,
+                 DBusGProxyCall *call,
                  gpointer user_data)
 {
 	ActivateInfo *info = user_data;
+	char *connection_path;
+	char *active_path;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, call, &error,
+	                       DBUS_TYPE_G_OBJECT_PATH, &connection_path,
+	                       DBUS_TYPE_G_OBJECT_PATH, &active_path,
+	                       G_TYPE_INVALID);
 	if (error) {
 		activate_info_complete (info, NULL, error);
 		activate_info_free (info);
 	} else {
-		info->new_connection_path = g_strdup (connection_path);
-		info->active_path = g_strdup (active_path);
+		info->new_connection_path = connection_path;
+		info->active_path = active_path;
 		recheck_pending_activations (info->client);
 	}
 }
@@ -803,12 +819,12 @@ nm_client_add_and_activate_connection (NMClient *client,
 	priv = NM_CLIENT_GET_PRIVATE (client);
 	priv->pending_activations = g_slist_prepend (priv->pending_activations, info);
 
-	org_freedesktop_NetworkManager_add_and_activate_connection_async (priv->client_proxy,
-	                                                                  hash,
-	                                                                  nm_object_get_path (NM_OBJECT (device)),
-	                                                                  specific_object ? specific_object : "/",
-	                                                                  add_activate_cb,
-	                                                                  info);
+	dbus_g_proxy_begin_call (priv->client_proxy, "AddAndActivateConnection",
+	                         add_activate_cb, info, NULL,
+	                         DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, hash,
+	                         DBUS_TYPE_G_OBJECT_PATH, nm_object_get_path (NM_OBJECT (device)),
+	                         DBUS_TYPE_G_OBJECT_PATH, specific_object ? specific_object : "/",
+	                         G_TYPE_INVALID);
 	g_hash_table_unref (hash);
 }
 
@@ -838,7 +854,10 @@ nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active)
 	// FIXME: return errors
 	priv = NM_CLIENT_GET_PRIVATE (client);
 	path = nm_object_get_path (NM_OBJECT (active));
-	if (!org_freedesktop_NetworkManager_deactivate_connection (priv->client_proxy, path, &error)) {
+	if (!dbus_g_proxy_call (priv->client_proxy, "DeactivateConnection", &error,
+	                        DBUS_TYPE_G_OBJECT_PATH, path,
+	                        G_TYPE_INVALID,
+	                        G_TYPE_INVALID)) {
 		g_warning ("Could not deactivate connection '%s': %s", path, error->message);
 		g_error_free (error);
 	}
@@ -1151,7 +1170,10 @@ nm_client_networking_set_enabled (NMClient *client, gboolean enable)
 
 	g_return_if_fail (NM_IS_CLIENT (client));
 
-	if (!org_freedesktop_NetworkManager_enable (NM_CLIENT_GET_PRIVATE (client)->client_proxy, enable, &err)) {
+	if (!dbus_g_proxy_call (NM_CLIENT_GET_PRIVATE (client)->client_proxy, "Enable", &err,
+	                        G_TYPE_BOOLEAN, enable,
+	                        G_TYPE_INVALID,
+	                        G_TYPE_INVALID)) {
 		g_warning ("Error enabling/disabling networking: %s", err->message);
 		g_error_free (err);
 	}
diff --git a/libnm-glib/nm-device-bt.c b/libnm-glib/nm-device-bt.c
index a306bb7..14c21ae 100644
--- a/libnm-glib/nm-device-bt.c
+++ b/libnm-glib/nm-device-bt.c
@@ -32,8 +32,6 @@
 #include "nm-device-private.h"
 #include "nm-object-private.h"
 
-#include "nm-device-bt-bindings.h"
-
 G_DEFINE_TYPE (NMDeviceBt, nm_device_bt, NM_TYPE_DEVICE)
 
 #define NM_DEVICE_BT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_BT, NMDeviceBtPrivate))
diff --git a/libnm-glib/nm-device-ethernet.c b/libnm-glib/nm-device-ethernet.c
index 5801321..912ba6a 100644
--- a/libnm-glib/nm-device-ethernet.c
+++ b/libnm-glib/nm-device-ethernet.c
@@ -33,8 +33,6 @@
 #include "nm-device-private.h"
 #include "nm-object-private.h"
 
-#include "nm-device-ethernet-bindings.h"
-
 G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
 
 #define NM_DEVICE_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetPrivate))
diff --git a/libnm-glib/nm-device-infiniband.c b/libnm-glib/nm-device-infiniband.c
index 183c14d..0887f63 100644
--- a/libnm-glib/nm-device-infiniband.c
+++ b/libnm-glib/nm-device-infiniband.c
@@ -34,8 +34,6 @@
 #include "nm-device-private.h"
 #include "nm-object-private.h"
 
-#include "nm-device-infiniband-bindings.h"
-
 G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE)
 
 #define NM_DEVICE_INFINIBAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandPrivate))
diff --git a/libnm-glib/nm-device-wifi.c b/libnm-glib/nm-device-wifi.c
index 7768985..9b87a52 100644
--- a/libnm-glib/nm-device-wifi.c
+++ b/libnm-glib/nm-device-wifi.c
@@ -36,8 +36,6 @@
 #include "nm-dbus-glib-types.h"
 #include "nm-types-private.h"
 
-#include "nm-device-wifi-bindings.h"
-
 G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
 
 #define NM_DEVICE_WIFI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIFI, NMDeviceWifiPrivate))
@@ -335,7 +333,10 @@ nm_device_wifi_get_access_points (NMDeviceWifi *device)
 	if (priv->aps)
 		return handle_ptr_array_return (priv->aps);
 
-	if (!org_freedesktop_NetworkManager_Device_Wireless_get_access_points (priv->proxy, &temp, &error)) {
+	if (!dbus_g_proxy_call (priv->proxy, "GetAccessPoints", &error,
+	                        G_TYPE_INVALID,
+	                        DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &temp,
+	                        G_TYPE_INVALID)) {
 		g_warning ("%s: error getting access points: %s", __func__, error->message);
 		g_error_free (error);
 		return NULL;
diff --git a/libnm-glib/nm-device-wimax.c b/libnm-glib/nm-device-wimax.c
index 4844a0e..f83d413 100644
--- a/libnm-glib/nm-device-wimax.c
+++ b/libnm-glib/nm-device-wimax.c
@@ -34,8 +34,6 @@
 #include "nm-dbus-glib-types.h"
 #include "nm-types-private.h"
 
-#include "nm-device-wimax-bindings.h"
-
 G_DEFINE_TYPE (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE)
 
 #define NM_DEVICE_WIMAX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxPrivate))
@@ -217,7 +215,10 @@ nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
 	if (priv->nsps)
 		return handle_ptr_array_return (priv->nsps);
 
-	if (!org_freedesktop_NetworkManager_Device_WiMax_get_nsp_list (priv->proxy, &temp, &error)) {
+	if (!dbus_g_proxy_call (priv->proxy, "GetNspList", &error,
+	                        G_TYPE_INVALID,
+	                        DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &temp,
+	                        G_TYPE_INVALID)) {
 		g_warning ("%s: error getting NSPs: %s", __func__, error->message);
 		g_error_free (error);
 		return NULL;
diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c
index 1d2ba56..6b783dc 100644
--- a/libnm-glib/nm-device.c
+++ b/libnm-glib/nm-device.c
@@ -39,8 +39,6 @@
 #include "nm-marshal.h"
 #include "nm-dbus-glib-types.h"
 
-#include "nm-device-bindings.h"
-
 G_DEFINE_TYPE (NMDevice, nm_device, NM_TYPE_OBJECT)
 
 #define NM_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE, NMDevicePrivate))
@@ -1518,11 +1516,14 @@ typedef struct {
 
 static void
 deactivate_cb (DBusGProxy *proxy,
-               GError *error,
+               DBusGProxyCall *call,
                gpointer user_data)
 {
 	DeactivateInfo *info = user_data;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, call, &error,
+	                       G_TYPE_INVALID);
 	if (info->fn)
 		info->fn (info->device, error, info->user_data);
 	else if (error) {
@@ -1532,6 +1533,7 @@ deactivate_cb (DBusGProxy *proxy,
 		           error ? error->code : -1,
 		           error && error->message ? error->message : "(unknown)");
 	}
+	g_clear_error (&error);
 
 	g_object_unref (info->device);
 	g_slice_free (DeactivateInfo, info);
@@ -1562,9 +1564,9 @@ nm_device_disconnect (NMDevice *device,
 	info->user_data = user_data;
 	info->device = g_object_ref (device);
 
-	org_freedesktop_NetworkManager_Device_disconnect_async (NM_DEVICE_GET_PRIVATE (device)->proxy,
-	                                                        deactivate_cb,
-	                                                        info);
+	dbus_g_proxy_begin_call (NM_DEVICE_GET_PRIVATE (device)->proxy, "Disconnect",
+	                         deactivate_cb, info, NULL,
+	                         G_TYPE_INVALID);
 }
 
 /**
diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c
index 9e190d9..91d3d46 100644
--- a/libnm-glib/nm-remote-connection.c
+++ b/libnm-glib/nm-remote-connection.c
@@ -29,7 +29,6 @@
 #include "nm-remote-connection.h"
 #include "nm-remote-connection-private.h"
 #include "nm-dbus-glib-types.h"
-#include "nm-settings-connection-bindings.h"
 
 #define NM_REMOTE_CONNECTION_BUS "bus"
 
@@ -89,13 +88,17 @@ remote_call_complete (NMRemoteConnection *self, RemoteCall *call)
 }
 
 static void
-update_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
+update_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_data)
 {
 	RemoteCall *call = user_data;
 	NMRemoteConnectionCommitFunc func = (NMRemoteConnectionCommitFunc) call->callback;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, proxy_call, &error,
+	                       G_TYPE_INVALID);
 	if (func != NULL)
 		(*func)(call->self, error, call->user_data);
+	g_clear_error (&error);
 	remote_call_complete (call->self, call);
 }
 
@@ -131,10 +134,10 @@ nm_remote_connection_commit_changes (NMRemoteConnection *self,
 
 	settings = nm_connection_to_hash (NM_CONNECTION (self), NM_SETTING_HASH_FLAG_ALL);
 
-	call->call = org_freedesktop_NetworkManager_Settings_Connection_update_async (priv->proxy,
-	                                                                              settings,
-	                                                                              update_cb,
-	                                                                              call);
+	call->call = dbus_g_proxy_begin_call (priv->proxy, "Update",
+	                                      update_cb, call, NULL,
+	                                      DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, settings,
+	                                      G_TYPE_INVALID);
 	g_assert (call->call);
 	priv->calls = g_slist_append (priv->calls, call);
 
@@ -142,13 +145,17 @@ nm_remote_connection_commit_changes (NMRemoteConnection *self,
 }
 
 static void
-delete_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
+delete_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_data)
 {
 	RemoteCall *call = user_data;
 	NMRemoteConnectionDeleteFunc func = (NMRemoteConnectionDeleteFunc) call->callback;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, proxy_call, &error,
+	                       G_TYPE_INVALID);
 	if (func != NULL)
 		(*func)(call->self, error, call->user_data);
+	g_clear_error (&error);
 	remote_call_complete (call->self, call);
 }
 
@@ -178,20 +185,26 @@ nm_remote_connection_delete (NMRemoteConnection *self,
 	call->callback = (GFunc) callback;
 	call->user_data = user_data;
 
-	call->call = org_freedesktop_NetworkManager_Settings_Connection_delete_async (priv->proxy,
-	                                                                              delete_cb,
-	                                                                              call);
+	call->call = dbus_g_proxy_begin_call (priv->proxy, "Delete",
+	                                      delete_cb, call, NULL,
+	                                      G_TYPE_INVALID);
 	g_assert (call->call);
 	priv->calls = g_slist_append (priv->calls, call);
 }
 
 static void
-get_secrets_cb (DBusGProxy *proxy, GHashTable *secrets, GError *error, gpointer user_data)
+get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_data)
 {
 	RemoteCall *call = user_data;
 	NMRemoteConnectionGetSecretsFunc func = (NMRemoteConnectionGetSecretsFunc) call->callback;
+	GHashTable *secrets;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, proxy_call, &error,
+	                       DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &secrets,
+	                       G_TYPE_INVALID);
 	(*func)(call->self, error ? NULL : secrets, error, call->user_data);
+	g_clear_error (&error);
 	remote_call_complete (call->self, call);
 }
 
@@ -225,10 +238,10 @@ nm_remote_connection_get_secrets (NMRemoteConnection *self,
 	call->callback = (GFunc) callback;
 	call->user_data = user_data;
 
-	call->call = org_freedesktop_NetworkManager_Settings_Connection_get_secrets_async (priv->proxy,
-	                                                                                   setting_name,
-	                                                                                   get_secrets_cb,
-	                                                                                   call);
+	call->call = dbus_g_proxy_begin_call (priv->proxy, "GetSecrets",
+	                                      get_secrets_cb, call, NULL,
+	                                      G_TYPE_STRING, setting_name,
+	                                      G_TYPE_INVALID);
 	g_assert (call->call);
 	priv->calls = g_slist_append (priv->calls, call);
 }
@@ -256,14 +269,20 @@ replace_settings (NMRemoteConnection *self, GHashTable *new_settings)
 
 static void
 init_get_settings_cb (DBusGProxy *proxy,
-                      GHashTable *new_settings,
-                      GError *error,
+                      DBusGProxyCall *call,
                       gpointer user_data)
 {
 	NMRemoteConnection *self = user_data;
 	NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
+	GHashTable *new_settings;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, call, &error,
+	                       DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &new_settings,
+	                       G_TYPE_INVALID);
 	if (error) {
+		g_error_free (error);
+
 		/* Connection doesn't exist, or isn't visible to this user */
 		if (dbus_g_error_has_name (error, "org.freedesktop.NetworkManager.Settings.PermissionDenied"))
 			priv->init_result = NM_REMOTE_CONNECTION_INIT_RESULT_INVISIBLE;
@@ -282,16 +301,22 @@ init_get_settings_cb (DBusGProxy *proxy,
 
 static void
 updated_get_settings_cb (DBusGProxy *proxy,
-                         GHashTable *new_settings,
-                         GError *error,
+                         DBusGProxyCall *call,
                          gpointer user_data)
 {
 	NMRemoteConnection *self = user_data;
 	NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
+	GHashTable *new_settings;
+	GError *error = NULL;
 
+	dbus_g_proxy_end_call (proxy, call, &error,
+	                       DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &new_settings,
+	                       G_TYPE_INVALID);
 	if (error) {
 		GHashTable *hash;
 
+		g_error_free (error);
+
 		/* Connection is no longer visible to this user.  Let the settings
 		 * service handle this via 'visible'.  The settings service will emit
 		 * the "removed" signal for us since it handles the lifetime of this
@@ -322,9 +347,9 @@ updated_cb (DBusGProxy *proxy, gpointer user_data)
 	NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
 
 	/* The connection got updated; request the replacement settings */
-	org_freedesktop_NetworkManager_Settings_Connection_get_settings_async (priv->proxy,
-	                                                                       updated_get_settings_cb,
-	                                                                       self);
+	dbus_g_proxy_begin_call (priv->proxy, "GetSettings",
+	                         updated_get_settings_cb, self, NULL,
+	                         G_TYPE_INVALID);
 }
 
 static void
@@ -386,9 +411,9 @@ constructor (GType type,
 	dbus_g_proxy_add_signal (priv->proxy, "Removed", G_TYPE_INVALID);
 	dbus_g_proxy_connect_signal (priv->proxy, "Removed", G_CALLBACK (removed_cb), object, NULL);
 
-	org_freedesktop_NetworkManager_Settings_Connection_get_settings_async (priv->proxy,
-	                                                                       init_get_settings_cb,
-	                                                                       object);
+	dbus_g_proxy_begin_call (priv->proxy, "GetSettings",
+	                         init_get_settings_cb, object, NULL,
+	                         G_TYPE_INVALID);
 	return object;
 }
 
diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c
index 7658623..60c13c8 100644
--- a/libnm-glib/nm-remote-settings.c
+++ b/libnm-glib/nm-remote-settings.c
@@ -28,7 +28,6 @@
 #include "nm-marshal.h"
 #include "nm-dbus-glib-types.h"
 #include "nm-remote-settings.h"
-#include "nm-settings-bindings.h"
 #include "nm-remote-connection-private.h"
 
 G_DEFINE_TYPE (NMRemoteSettings, nm_remote_settings, G_TYPE_OBJECT)
@@ -392,15 +391,18 @@ new_connection_cb (DBusGProxy *proxy, const char *path, gpointer user_data)
 
 static void
 fetch_connections_done (DBusGProxy *proxy,
-                        GPtrArray *connections,
-                        GError *error,
+                        DBusGProxyCall *call,
                         gpointer user_data)
 {
 	NMRemoteSettings *self = NM_REMOTE_SETTINGS (user_data);
 	NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (self);
+	GPtrArray *connections;
+	GError *error = NULL;
 	int i;
 
-	if (error) {
+	if (!dbus_g_proxy_end_call (proxy, call, &error, 
+	                            DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &connections,
+	                            G_TYPE_INVALID)) {
 		/* Ignore settings service spawn errors */
 		if (   !g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN)
 		    && !g_error_matches (error, DBUS_GERROR, DBUS_GERROR_NAME_HAS_NO_OWNER)) {
@@ -440,9 +442,9 @@ fetch_connections (gpointer user_data)
 
 	priv->fetch_id = 0;
 
-	org_freedesktop_NetworkManager_Settings_list_connections_async (priv->proxy,
-	                                                                fetch_connections_done,
-	                                                                self);
+	dbus_g_proxy_begin_call (priv->proxy, "ListConnections",
+	                         fetch_connections_done, self, NULL,
+	                         G_TYPE_INVALID);
 	return FALSE;
 }
 
diff --git a/libnm-glib/nm-vpn-connection.c b/libnm-glib/nm-vpn-connection.c
index 8c0a847..2a83cae 100644
--- a/libnm-glib/nm-vpn-connection.c
+++ b/libnm-glib/nm-vpn-connection.c
@@ -25,7 +25,6 @@
 #include "nm-vpn-connection.h"
 #include "NetworkManager.h"
 #include "nm-utils.h"
-#include "nm-vpn-connection-bindings.h"
 #include "nm-marshal.h"
 #include "nm-object-private.h"
 #include "nm-active-connection.h"
-- 
1.7.7.5



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