diff options
author | Dan Winship <danw@redhat.com> | 2015-07-07 10:29:45 -0400 |
---|---|---|
committer | Dan Winship <danw@redhat.com> | 2015-07-24 13:25:47 -0400 |
commit | ee707ba95aa9281c9ca752d56a59fa104b23d2f4 (patch) | |
tree | 29a2245a6e4e43a22b4e0e6f26397fb0498fe76e /libnm-glib/nm-object.c | |
parent | 3452ee2a0e3d04a324e7b9cd153323a353d5c182 (diff) |
libnm-glib: drop private bus support
Anything that actually *needs* private bus support will be built
against libnm these days anyway.
Diffstat (limited to 'libnm-glib/nm-object.c')
-rw-r--r-- | libnm-glib/nm-object.c | 52 |
1 files changed, 19 insertions, 33 deletions
diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c index 206b3f5b4d..b92b0ca61c 100644 --- a/libnm-glib/nm-object.c +++ b/libnm-glib/nm-object.c @@ -174,23 +174,19 @@ constructed (GObject *object) priv->properties_proxy = _nm_object_new_proxy (self, NULL, DBUS_INTERFACE_PROPERTIES); - if (_nm_object_is_connection_private (self)) - priv->nm_running = TRUE; - else { - priv->bus_proxy = dbus_g_proxy_new_for_name (priv->connection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS); - g_assert (priv->bus_proxy); - - dbus_g_proxy_add_signal (priv->bus_proxy, "NameOwnerChanged", - G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_INVALID); - dbus_g_proxy_connect_signal (priv->bus_proxy, - "NameOwnerChanged", - G_CALLBACK (proxy_name_owner_changed), - object, NULL); - } + priv->bus_proxy = dbus_g_proxy_new_for_name (priv->connection, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS); + g_assert (priv->bus_proxy); + + dbus_g_proxy_add_signal (priv->bus_proxy, "NameOwnerChanged", + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_INVALID); + dbus_g_proxy_connect_signal (priv->bus_proxy, + "NameOwnerChanged", + G_CALLBACK (proxy_name_owner_changed), + object, NULL); } static gboolean @@ -272,16 +268,12 @@ init_async (GAsyncInitable *initable, int io_priority, simple = g_simple_async_result_new (G_OBJECT (initable), callback, user_data, init_async); - if (_nm_object_is_connection_private (NM_OBJECT (initable))) - _nm_object_reload_properties_async (NM_OBJECT (initable), init_async_got_properties, simple); - else { - /* Check if NM is running */ - dbus_g_proxy_begin_call (priv->bus_proxy, "NameHasOwner", - init_async_got_manager_running, - simple, NULL, - G_TYPE_STRING, NM_DBUS_SERVICE, - G_TYPE_INVALID); - } + /* Check if NM is running */ + dbus_g_proxy_begin_call (priv->bus_proxy, "NameHasOwner", + init_async_got_manager_running, + simple, NULL, + G_TYPE_STRING, NM_DBUS_SERVICE, + G_TYPE_INVALID); } static gboolean @@ -1438,9 +1430,3 @@ _nm_object_new_proxy (NMObject *self, const char *path, const char *interface) return _nm_dbus_new_proxy_for_connection (priv->connection, path ? path : priv->path, interface); } - -gboolean -_nm_object_is_connection_private (NMObject *self) -{ - return _nm_dbus_is_connection_private (NM_OBJECT_GET_PRIVATE (self)->connection); -} |