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

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

§connection

A #GDBusConnection.

§name

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

§flags

Flags from the #GBusNameWatcherFlags enumeration.

§name_appeared_handler

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

§name_vanished_handler

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

§Returns

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