Method

GioDBusConnectionregister_object_with_closures

Declaration

guint
g_dbus_connection_register_object_with_closures (
  GDBusConnection* connection,
  const gchar* object_path,
  GDBusInterfaceInfo* interface_info,
  GClosure* method_call_closure,
  GClosure* get_property_closure,
  GClosure* set_property_closure,
  GError** error
)

Description

Version of g_dbus_connection_register_object() using closures instead of a GDBusInterfaceVTable for easier binding in other languages.

Available since:2.46

Parameters

object_path const gchar*
 

The object path to register at.

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

Introspection data for the interface.

 The data is owned by the caller of the function.
method_call_closure GClosure
 

GClosure for handling incoming method calls.

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

GClosure for getting a property.

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

GClosure for setting a property.

 The argument can be NULL.
 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: guint
 

0 if error is set, otherwise a registration ID (never 0) that can be used with g_dbus_connection_unregister_object() .