DBusNames.ownName

Starts acquiring name on the bus specified by bus_type and calls name_acquired_handler and name_lost_handler when the name is acquired respectively lost. Callbacks will be invoked in the thread-default main loop of the thread you are calling this function from. You are guaranteed that one of the name_acquired_handler and name_lost_handler callbacks will be invoked after calling this function - there are three Since 2.26

Parameters

busType GBusType

The type of bus to own a name on.

name string

The well-known name to own.

flags GBusNameOwnerFlags

A set of flags from the GBusNameOwnerFlags enumeration.

busAcquiredHandler GBusAcquiredCallback

Handler to invoke when connected to the bus of type bus_type or NULL. [allow-none]

nameAcquiredHandler GBusNameAcquiredCallback

Handler to invoke when name is acquired or NULL. [allow-none]

nameLostHandler GBusNameLostCallback

Handler to invoke when name is lost or NULL. [allow-none]

userData void*

User data to pass to handlers.

userDataFreeFunc GDestroyNotify

Function for freeing user_data or NULL. [allow-none]

Return Value

Type: uint

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

Meta