gio

Function 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.

§connection

a #GDBusConnection

§name

the well-known name to own

§flags

a set of flags from the #GBusNameOwnerFlags enumeration

§name_acquired_handler

handler to invoke when @name is acquired or None

§name_lost_handler

handler to invoke when @name is lost or None

§Returns

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