own_name


Description:

[ CCode ( cname = "g_bus_own_name_with_closures" ) ]
[ Version ( since = "2.26" ) ]
public uint own_name (BusType bus_type, string name, BusNameOwnerFlags flags, owned BusAcquiredCallback? bus_acquired_closure = null, owned BusNameAcquiredCallback? name_acquired_closure = null, owned BusNameLostCallback? name_lost_closure = null)

Version of g_bus_own_name using closures instead of callbacks for easier binding in other languages.

Parameters:

bus_type

the type of bus to own a name on

name

the well-known name to own

flags

a set of flags from the BusNameOwnerFlags enumeration

bus_acquired_closure

Closure to invoke when connected to the bus of type bus_type or null

name_acquired_closure

Closure to invoke when name is acquired or null

name_lost_closure

Closure to invoke when name is lost or null

Returns:

an identifier (never 0) that can be used with unown_name to stop owning the name.


Namespace: GLib.Bus
Package: gio-2.0