libnm: don't hardcode things like "org.freedesktop.DBus.Properties"

Use the #defines provided by libdbus instead.
This commit is contained in:
Dan Winship 2014-09-10 13:41:25 -04:00
parent 280b1e5067
commit aa18b88a4f
4 changed files with 8 additions and 8 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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;

View file

@ -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,