Method
JsonrpcServeradd_handler
since: 3.26
Declaration [src]
guint
jsonrpc_server_add_handler (
JsonrpcServer* self,
const gchar* method,
JsonrpcServerHandler handler,
gpointer handler_data,
GDestroyNotify handler_data_destroy
)
Description [src]
Adds a new handler that will be dispatched when a matching method arrives.
Available since: 3.26
Parameters
method-
Type:
const gchar*A method to handle.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. handler-
Type:
JsonrpcServerHandlerA handler to execute when an incoming method matches
methods. handler_data-
Type:
gpointerUser data for
handler.The argument can be NULL.The data is owned by the caller of the method. handler_data_destroy-
Type:
GDestroyNotifyA destroy callback for
handler_data.
Return value
Type: guint
A handler id that can be used to remove the handler with
jsonrpc_server_remove_handler().