busOwnNameOnConnection

fun busOwnNameOnConnection(connection: DBusConnection, name: String, flags: BusNameOwnerFlags, nameAcquiredClosure: <Error class: unknown class>? = null, nameLostClosure: <Error class: unknown class>? = null): <Error class: unknown class>

Version of g_bus_own_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_unown_name() to stop owning the name.

Since

2.26

Parameters

connection

a #GDBusConnection

name

the well-known name to own

flags

a set of flags from the #GBusNameOwnerFlags enumeration

nameAcquiredClosure

#GClosure to invoke when @name is acquired or null

nameLostClosure

#GClosure to invoke when @name is lost or null