Method

PlumaMessageBusregister

Declaration [src]

PlumaMessageType*
pluma_message_bus_register (
  PlumaMessageBus* bus,
  const gchar* object_path,
  const gchar* method,
  guint num_optional,
  ...
)

Description [src]

Register a message on the bus. A message must be registered on the bus before it can be send. This function registers the type arguments for method at object_path. The arguments are specified with the variable arguments which should contain pairs of const gchar *key and GType terminated by NULL. The last num_optional arguments are registered as optional (and are thus not required when sending a message).

This function emits a PlumaMessageBus::registered signal.

This method is not directly available to language bindings.

Parameters

object_path

Type: const gchar*

The object path.

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

Type: const gchar*

The method to register.

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

Type: guint

The number of optional arguments.

...

Type: 

NULL terminated list of key/gtype method argument pairs.

Return value

Type: PlumaMessageType

The registered PlumaMessageType. The returned reference is owned by the bus. If you want to keep it alive after unregistering, use pluma_message_type_ref().

The caller of the method takes ownership of the data, and is responsible for freeing it.