Commit 703178f5 authored by Thomas Haller's avatar Thomas Haller

dbus: add nm_dbus_manager_get_dbus_connection() helper

The NMDBusManager owns a reference to the system bus. Expose it, so we
can use it. Note that g_bus_get() -- as alternative to get the systembus
singleton -- is asynchronous, and g_bus_get_sync() has an API that makes
one wonder what it does. Since we already have a reference to the connection
object we want to use, expose it.
parent ade753d0
......@@ -1470,6 +1470,14 @@ static const GDBusInterfaceInfo interface_info_objmgr = NM_DEFINE_GDBUS_INTERFAC
/*****************************************************************************/
GDBusConnection *
nm_dbus_manager_get_dbus_connection (NMDBusManager *self)
{
g_return_val_if_fail (NM_IS_DBUS_MANAGER (self), NULL);
return NM_DBUS_MANAGER_GET_PRIVATE (self)->connection;
}
void
nm_dbus_manager_start (NMDBusManager *self,
NMDBusManagerSetPropertyHandler set_property_handler,
......
......@@ -51,6 +51,8 @@ typedef void (*NMDBusManagerSetPropertyHandler) (NMDBusObject *obj,
gboolean nm_dbus_manager_acquire_bus (NMDBusManager *self);
GDBusConnection *nm_dbus_manager_get_dbus_connection (NMDBusManager *self);
void nm_dbus_manager_start (NMDBusManager *self,
NMDBusManagerSetPropertyHandler set_property_handler,
gpointer set_property_handler_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment