Method
JsonrpcServeradd_handler
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 |
const gchar* |
A method to handle. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
handler |
JsonrpcServerHandler |
A handler to
execute when an incoming method matches |
|
handler_data |
gpointer |
User data for |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
handler_data_destroy |
GDestroyNotify |
A destroy callback for |
Return value
Returns: | guint |
A handler id that can be used to remove the handler with
|