Function

Giobus_own_name_on_connection

Declaration [src]

guint
g_bus_own_name_on_connection (
  GDBusConnection* connection,
  const gchar* name,
  GBusNameOwnerFlags flags,
  GBusNameAcquiredCallback name_acquired_handler,
  GBusNameLostCallback name_lost_handler,
  gpointer user_data,
  GDestroyNotify user_data_free_func
)

Description [src]

Like g_bus_own_name() but takes a GDBusConnection instead of a GBusType.

Available since:2.26

Parameters

connection GDBusConnection
 

A GDBusConnection.

 The data is owned by the caller of the function.
name const gchar*
 

The well-known name to own.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
flags GBusNameOwnerFlags
 

A set of flags from the GBusNameOwnerFlags enumeration.

name_acquired_handler GBusNameAcquiredCallback
 

Handler to invoke when name is acquired or NULL.

name_lost_handler GBusNameLostCallback
 

Handler to invoke when name is lost or NULL.

user_data gpointer
 

User data to pass to handlers.

user_data_free_func GDestroyNotify
 

Function for freeing user_data or NULL.

Return value

Returns: guint
 

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