Method
JsonrpcClientcall_with_id_async
since: 3.30
Declaration [src]
void
jsonrpc_client_call_with_id_async (
JsonrpcClient* self,
const gchar* method,
GVariant* params,
GVariant** id,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
)
Description [src]
Asynchronously calls method with params on the remote peer.
Upon completion or failure, callback is executed and it should
call jsonrpc_client_call_finish() to complete the request and release
any memory held.
This function is similar to jsonrpc_client_call_async() except that
it allows the caller to get the id of the command which might be useful
in systems where you can cancel the operation (such as the Language
Server Protocol).
If params is floating, the floating reference is consumed.
Available since: 3.30
Parameters
method-
Type:
const gchar*The name of the method to call.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. params-
Type:
GVariantA
GVariantof parameters orNULL.The argument can be NULL.The data is owned by the caller of the method. id-
Type:
GVariantA location for a
GVariantdescribing the identifier used for the method call, orNULL.The argument will be set by the function. The argument can be NULL.The caller of the method takes ownership of the returned data, and is responsible for freeing it. cancellable-
Type:
GCancellableA
GCancellableorNULL.The argument can be NULL.The data is owned by the caller of the method. callback-
Type:
GAsyncReadyCallbackCallback to executed upon completion.
The argument can be NULL. user_data-
Type:
gpointerUser data for
callback.The argument can be NULL.The data is owned by the caller of the method.