Delta Chat Core C Interface
|
Opaque object for using the json rpc api from the cffi bindings. More...
#include <deltachat.h>
Public Member Functions | |
char * | dc_jsonrpc_blocking_call (dc_jsonrpc_instance_t *jsonrpc_instance, const char *input) |
Make a JSON-RPC call and return a response. | |
char * | dc_jsonrpc_next_response (dc_jsonrpc_instance_t *jsonrpc_instance) |
Get the next json_rpc response, blocks until there is a new event, so call this in a loop from a thread. | |
void | dc_jsonrpc_request (dc_jsonrpc_instance_t *jsonrpc_instance, const char *request) |
Makes an asynchronous jsonrpc request, returns immediately and once the result is ready it can be retrieved via dc_jsonrpc_next_response() the jsonrpc specification defines an invocation id that can then be used to match request and response. | |
void | dc_jsonrpc_unref (dc_jsonrpc_instance_t *jsonrpc_instance) |
Free a jsonrpc instance. | |
Opaque object for using the json rpc api from the cffi bindings.
char * dc_jsonrpc_blocking_call | ( | dc_jsonrpc_instance_t * | jsonrpc_instance, |
const char * | input ) |
Make a JSON-RPC call and return a response.
jsonrpc_instance | jsonrpc instance as returned from dc_jsonrpc_init(). |
input | JSON-RPC request. |
char * dc_jsonrpc_next_response | ( | dc_jsonrpc_instance_t * | jsonrpc_instance | ) |
Get the next json_rpc response, blocks until there is a new event, so call this in a loop from a thread.
jsonrpc_instance | jsonrpc instance as returned from dc_jsonrpc_init(). |
void dc_jsonrpc_request | ( | dc_jsonrpc_instance_t * | jsonrpc_instance, |
const char * | request ) |
Makes an asynchronous jsonrpc request, returns immediately and once the result is ready it can be retrieved via dc_jsonrpc_next_response() the jsonrpc specification defines an invocation id that can then be used to match request and response.
jsonrpc_instance | jsonrpc instance as returned from dc_jsonrpc_init(). |
request | JSON-RPC request as string |
void dc_jsonrpc_unref | ( | dc_jsonrpc_instance_t * | jsonrpc_instance | ) |
Free a jsonrpc instance.
jsonrpc_instance | jsonrpc instance as returned from dc_jsonrpc_init(). If NULL is given, nothing is done and an error is logged. |