Function

Giobus_watch_name_with_closures

Declaration [src]

guint
g_bus_watch_name_with_closures (
  GBusType bus_type,
  const gchar* name,
  GBusNameWatcherFlags flags,
  GClosure* name_appeared_closure,
  GClosure* name_vanished_closure
)

Description [src]

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

Available since:2.26

Parameters

bus_type GBusType
 

The type of bus to watch a name on.

name const gchar*
 

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

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

Flags from the GBusNameWatcherFlags enumeration.

name_appeared_closure GClosure
 

GClosure to invoke when name is known to exist or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
name_vanished_closure GClosure
 

GClosure to invoke when name is known to not exist or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.

Return value

Returns: guint
 

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