Function gio::bus_watch_name_on_connection

source ·
pub fn bus_watch_name_on_connection<NameAppeared, NameVanished>(
    connection: &DBusConnection,
    name: &str,
    flags: BusNameWatcherFlags,
    name_appeared: NameAppeared,
    name_vanished: NameVanished
) -> WatcherId
where NameAppeared: Fn(DBusConnection, &str, &str) + Send + Sync + 'static, NameVanished: Fn(DBusConnection, &str) + Send + Sync + 'static,
Expand description

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


A #GDBusConnection.


The name (well-known or unique) to watch.


Flags from the #GBusNameWatcherFlags enumeration.


Handler to invoke when @name is known to exist or None.


Handler to invoke when @name is known to not exist or None.


An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.