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) + Send + Sync + 'static, NameLost: Fn(DBusConnection, &str) + Send + Sync + 'static,
Expand description

Like g_bus_own_name() but takes a DBusConnection instead of a BusType.

connection

a DBusConnection

name

the well-known name to own

flags

a set of flags from the BusNameOwnerFlags 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