busWatchNameOnConnection

fun busWatchNameOnConnection(connection: DBusConnection, name: String, flags: BusNameWatcherFlags, nameAppearedClosure: <Error class: unknown class>? = null, nameVanishedClosure: <Error class: unknown class>? = null): <Error class: unknown class>

Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages.

Return

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

Since

2.26

Parameters

connection

A #GDBusConnection.

name

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

flags

Flags from the #GBusNameWatcherFlags enumeration.

nameAppearedClosure

#GClosure to invoke when @name is known to exist or null.

nameVanishedClosure

#GClosure to invoke when @name is known to not exist or null.