Method

GioDBusConnectionexport_action_group

since: 2.32

Declaration [src]

guint
g_dbus_connection_export_action_group (
  GDBusConnection* connection,
  const gchar* object_path,
  GActionGroup* action_group,
  GError** error
)

Description [src]

Exports action_group on connection at object_path.

The implemented D-Bus API should be considered private. It is subject to change in the future.

A given object path can only have one action group exported on it. If this constraint is violated, the export will fail and 0 will be returned (with error set accordingly).

You can unexport the action group using g_dbus_connection_unexport_action_group() with the return value of this function.

The thread default main context is taken at the time of this call. All incoming action activations and state change requests are reported from this context. Any changes on the action group that cause it to emit signals must also come from this same context. Since incoming action activations and state change requests are rather likely to cause changes on the action group, this effectively limits a given action group to being exported from only one main context.

Available since: 2.32

Parameters

object_path

Type: const gchar*

A D-Bus object path.

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

Type: GActionGroup

An action group.

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

The ID of the export (never zero), or 0 in case of failure.