Method

GioDBusConnectionregister_object_with_closures

since: 2.46

Declaration [src]

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 [src]

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

Available since: 2.46

This method is renamed to g_dbus_connection_register_object() in language bindings.

Parameters

object_path

Type: const gchar*

The object path to register at.

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

Type: GDBusInterfaceInfo

Introspection data for the interface.

The data is owned by the caller of the method.
method_call_closure

Type: GClosure

GClosure for handling incoming method calls.

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

Type: GClosure

GClosure for getting a property.

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

Type: GClosure

GClosure for setting a property.

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

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: guint

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