diff options
author | Dan Winship <danw@gnome.org> | 2014-09-10 13:41:25 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-09-18 11:51:08 -0400 |
commit | aa18b88a4f856d6d7abe3a365285a36d297c93ba (patch) | |
tree | cf028cd41d65a5464f316655e4d239c7633b127d | |
parent | 280b1e506758fe41aaf2d012ba796be49c436684 (diff) | |
download | NetworkManager-aa18b88a4f856d6d7abe3a365285a36d297c93ba.tar.gz |
libnm: don't hardcode things like "org.freedesktop.DBus.Properties"
Use the #defines provided by libdbus instead.
-rw-r--r-- | libnm/nm-active-connection.c | 4 | ||||
-rw-r--r-- | libnm/nm-device.c | 4 | ||||
-rw-r--r-- | libnm/nm-object.c | 2 | ||||
-rw-r--r-- | libnm/nm-vpn-plugin.c | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/libnm/nm-active-connection.c b/libnm/nm-active-connection.c index 7088e496a4..8230b8b4f5 100644 --- a/libnm/nm-active-connection.c +++ b/libnm/nm-active-connection.c @@ -97,7 +97,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; @@ -174,7 +174,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/nm-device.c b/libnm/nm-device.c index 1eff7386d6..6d4cf0c128 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -872,7 +872,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; @@ -942,7 +942,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/nm-object.c b/libnm/nm-object.c index 6f52321925..23e01df75f 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -159,7 +159,7 @@ init_dbus (NMObject *object) { NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object); - priv->properties_proxy = _nm_object_new_proxy (object, NULL, "org.freedesktop.DBus.Properties"); + priv->properties_proxy = _nm_object_new_proxy (object, NULL, DBUS_INTERFACE_PROPERTIES); if (_nm_dbus_is_connection_private (priv->connection)) priv->nm_running = TRUE; diff --git a/libnm/nm-vpn-plugin.c b/libnm/nm-vpn-plugin.c index 5d4679afa7..7171aaf311 100644 --- a/libnm/nm-vpn-plugin.c +++ b/libnm/nm-vpn-plugin.c @@ -756,9 +756,9 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) return FALSE; 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", error, G_TYPE_STRING, priv->dbus_service_name, |