Method

GioDBusConnectionemit_signal

since: 2.26

Declaration

gboolean
g_dbus_connection_emit_signal (
  GDBusConnection* connection,
  const gchar* destination_bus_name,
  const gchar* object_path,
  const gchar* interface_name,
  const gchar* signal_name,
  GVariant* parameters,
  GError** error
)

Description

Emits a signal.

If the parameters GVariant is floating, it is consumed.

This can only fail if parameters is not compatible with the D-Bus protocol (G_IO_ERROR_INVALID_ARGUMENT), or if connection has been closed (G_IO_ERROR_CLOSED).

Available since: 2.26

Parameters

destination_bus_name

Type: const gchar*

The unique bus name for the destination for the signal or NULL to emit to all listeners.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
object_path

Type: const gchar*

Path of remote object.

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

Type: const gchar*

D-Bus interface to emit a signal on.

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

Type: const gchar*

The name of the signal to emit.

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

Type: GVariant

A GVariant tuple with parameters for the signal or NULL if not passing parameters.

The argument can be NULL.
The data is owned by the caller of the function.
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 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: gboolean

TRUE unless error is set.