Function imageflow::imageflow_job_send_json [] [src]

#[no_mangle]
pub unsafe extern fn imageflow_job_send_json(context: *mut Context,
                                             job: *mut Job,
                                             method: *const c_char,
                                             json_buffer: *const uint8_t,
                                             json_buffer_size: size_t)
                                             -> *const JsonResponse

Sends a JSON message to the imageflow_job

The recipient is provided method, which determines which code path will be used to process the provided JSON data and compose a response.

The function will return NULL if a JSON response could not be allocated (or if some other bug occurred). If a null pointer is returned, consult the standard error methods of context for more detail.

The response can be cleaned up with imageflow_json_response_destroy

Behavior is undefined if context is a null or invalid ptr; segfault likely.