Method

VarlinkServerRegistryadd_method

Declaration [src]

void
varlink_server_registry_add_method (
  VarlinkServerRegistry* self,
  const VarlinkInterface* interface,
  const char* method,
  VarlinkServerMethodHandler handler,
  gpointer user_data,
  GDestroyNotify notify
)

Description [src]

Adds method to self.

The registry makes a deep copy of interface the first time the interface is added. Use varlink_server_registry_add_method_static() from generated code when interface has static storage duration and should not be copied.

This method is not directly available to language bindings.

Parameters

interface

Type: VarlinkInterface

A VarlinkInterface.

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

Type: const char*

The unqualified method name.

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

Type: VarlinkServerMethodHandler

A handler for method.

user_data

Type: gpointer

User data for handler.

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

Type: GDestroyNotify

Destroy notify for user_data.

The argument can be NULL.