Function gio::bus_own_name_on_connection

source ·
pub fn bus_own_name_on_connection<NameAcquired, NameLost>(
    connection: &DBusConnection,
    name: &str,
    flags: BusNameOwnerFlags,
    name_acquired: NameAcquired,
    name_lost: NameLost,
) -> OwnerId
where NameAcquired: Fn(DBusConnection, &str) + 'static, NameLost: Fn(DBusConnection, &str) + 'static,
Expand description

Like g_bus_own_name() but takes a #GDBusConnection instead of a #GBusType.


a #GDBusConnection


the well-known name to own


a set of flags from the #GBusNameOwnerFlags enumeration


handler to invoke when @name is acquired or None


handler to invoke when @name is lost or None


an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name