librsync
2.0.2
|
Go to the source code of this file.
Functions | |
static rs_result | rs_job_work (rs_job_t *job, rs_buffers_t *buffers) |
rs_job_t * | rs_job_new (char const *job_name, rs_result(*statefn)(rs_job_t *)) |
rs_result | rs_job_free (rs_job_t *job) |
Deallocate job state. More... | |
static rs_result | rs_job_complete (rs_job_t *job, rs_result result) |
rs_result | rs_job_iter (rs_job_t *job, rs_buffers_t *buffers) |
Run a rs_job state machine until it blocks (RS_BLOCKED), returns an error, or completes (RS_DONE). More... | |
const rs_stats_t * | rs_job_statistics (rs_job_t *job) |
Return a pointer to the statistics in a job. More... | |
int | rs_job_input_is_ending (rs_job_t *job) |
rs_result | rs_job_drive (rs_job_t *job, rs_buffers_t *buf, rs_driven_cb in_cb, void *in_opaque, rs_driven_cb out_cb, void *out_opaque) |
Actively process a job, by making callbacks to fill and empty the buffers until the job is done. More... | |
Generic state-machine interface.
The point of this is that we need to be able to suspend and resume processing at any point at which the buffers may block.
Definition in file job.c.
rs_result rs_job_iter | ( | rs_job_t * | job, |
rs_buffers_t * | buffers | ||
) |
Run a rs_job state machine until it blocks (RS_BLOCKED), returns an error, or completes (RS_DONE).
job | Description of job state. |
buffers | Pointer to structure describing input and output buffers. |
buffers->eof_in
should be true if there is no more data after what's in the input buffer. The final block checksum will run across whatever's in there, without trying to accumulate anything else.
const rs_stats_t* rs_job_statistics | ( | rs_job_t * | job | ) |
rs_result rs_job_drive | ( | rs_job_t * | job, |
rs_buffers_t * | buf, | ||
rs_driven_cb | in_cb, | ||
void * | in_opaque, | ||
rs_driven_cb | out_cb, | ||
void * | out_opaque | ||
) |