summaryrefslogtreecommitdiff
path: root/libnm-glib
diff options
context:
space:
mode:
authorDan Winship <danw@redhat.com>2015-04-13 10:28:17 -0400
committerDan Winship <danw@redhat.com>2015-07-24 13:25:47 -0400
commitdd0e19895532504e6de615d18a761457ec685b58 (patch)
tree5df8230a545e0bd0fe6be3835962ddcdff00a088 /libnm-glib
parentf2174b623f814115207331f4ad0d3e944d1f323b (diff)
downloadNetworkManager-dd0e19895532504e6de615d18a761457ec685b58.tar.gz
include: add nm-dbus-compat.h
Add a file containing the defines like DBUS_INTERFACE_DBUS from dbus-shared.h, and use it from the gdbus-using files. Also, convert a bunch of other places that were previously hardcoding the string values to use the defines instead, and fix the ifcfg-rh plugin to properly namespace its own D-Bus-related defines.
Diffstat (limited to 'libnm-glib')
-rw-r--r--libnm-glib/nm-active-connection.c4
-rw-r--r--libnm-glib/nm-device.c4
-rw-r--r--libnm-glib/nm-object.c2
-rw-r--r--libnm-glib/nm-remote-settings.c2
-rw-r--r--libnm-glib/nm-vpn-plugin.c6
5 files changed, 9 insertions, 9 deletions
diff --git a/libnm-glib/nm-active-connection.c b/libnm-glib/nm-active-connection.c
index 7067a1100d..e5f474f7eb 100644
--- a/libnm-glib/nm-active-connection.c
+++ b/libnm-glib/nm-active-connection.c
@@ -120,7 +120,7 @@ _nm_active_connection_type_for_path (DBusGConnection *connection,
GValue value = G_VALUE_INIT;
GType type;
- proxy = _nm_dbus_new_proxy_for_connection (connection, path, "org.freedesktop.DBus.Properties");
+ proxy = _nm_dbus_new_proxy_for_connection (connection, path, DBUS_INTERFACE_PROPERTIES);
if (!proxy) {
g_warning ("%s: couldn't create D-Bus object proxy.", __func__);
return G_TYPE_INVALID;
@@ -197,7 +197,7 @@ _nm_active_connection_type_for_path_async (DBusGConnection *connection,
async_data->callback = callback;
async_data->user_data = user_data;
- proxy = _nm_dbus_new_proxy_for_connection (connection, path, "org.freedesktop.DBus.Properties");
+ proxy = _nm_dbus_new_proxy_for_connection (connection, path, DBUS_INTERFACE_PROPERTIES);
dbus_g_proxy_begin_call (proxy, "Get",
async_got_type, async_data, NULL,
G_TYPE_STRING, NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c
index bd5d16374e..731edb6927 100644
--- a/libnm-glib/nm-device.c
+++ b/libnm-glib/nm-device.c
@@ -887,7 +887,7 @@ _nm_device_type_for_path (DBusGConnection *connection,
GValue value = G_VALUE_INIT;
NMDeviceType nm_dtype;
- proxy = _nm_dbus_new_proxy_for_connection (connection, path, "org.freedesktop.DBus.Properties");
+ proxy = _nm_dbus_new_proxy_for_connection (connection, path, DBUS_INTERFACE_PROPERTIES);
if (!proxy) {
g_warning ("%s: couldn't create D-Bus object proxy.", __func__);
return G_TYPE_INVALID;
@@ -987,7 +987,7 @@ _nm_device_type_for_path_async (DBusGConnection *connection,
async_data->callback = callback;
async_data->user_data = user_data;
- proxy = _nm_dbus_new_proxy_for_connection (connection, path, "org.freedesktop.DBus.Properties");
+ proxy = _nm_dbus_new_proxy_for_connection (connection, path, DBUS_INTERFACE_PROPERTIES);
dbus_g_proxy_begin_call (proxy, "Get",
async_got_type, async_data, NULL,
G_TYPE_STRING, NM_DBUS_INTERFACE_DEVICE,
diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c
index fb25c1ac40..2cf7119e0d 100644
--- a/libnm-glib/nm-object.c
+++ b/libnm-glib/nm-object.c
@@ -173,7 +173,7 @@ constructed (GObject *object)
if (G_OBJECT_CLASS (nm_object_parent_class)->constructed)
G_OBJECT_CLASS (nm_object_parent_class)->constructed (object);
- priv->properties_proxy = _nm_object_new_proxy (self, NULL, "org.freedesktop.DBus.Properties");
+ priv->properties_proxy = _nm_object_new_proxy (self, NULL, DBUS_INTERFACE_PROPERTIES);
if (_nm_object_is_connection_private (self))
priv->nm_running = TRUE;
diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c
index 80a274f5e3..20b4638007 100644
--- a/libnm-glib/nm-remote-settings.c
+++ b/libnm-glib/nm-remote-settings.c
@@ -1215,7 +1215,7 @@ constructed (GObject *object)
/* D-Bus properties proxy */
priv->props_proxy = _nm_dbus_new_proxy_for_connection (priv->bus,
NM_DBUS_PATH_SETTINGS,
- "org.freedesktop.DBus.Properties");
+ DBUS_INTERFACE_PROPERTIES);
g_assert (priv->props_proxy);
/* Monitor properties */
diff --git a/libnm-glib/nm-vpn-plugin.c b/libnm-glib/nm-vpn-plugin.c
index f40ea800f2..3acf26ead1 100644
--- a/libnm-glib/nm-vpn-plugin.c
+++ b/libnm-glib/nm-vpn-plugin.c
@@ -768,9 +768,9 @@ constructor (GType type,
goto err;
proxy = dbus_g_proxy_new_for_name (connection,
- "org.freedesktop.DBus",
- "/org/freedesktop/DBus",
- "org.freedesktop.DBus");
+ DBUS_SERVICE_DBUS,
+ DBUS_PATH_DBUS,
+ DBUS_INTERFACE_DBUS);
if (!dbus_g_proxy_call (proxy, "RequestName", &err,
G_TYPE_STRING, priv->dbus_service_name,