85int rs_tube_is_idle(
rs_job_t const *job);
94static inline size_t rs_scoop_avail(
rs_job_t *job)
102 return !rs_scoop_avail(job) && job->stream->
eof_in;
Generic state-machine interface.
Public header for librsync.
rs_result
Return codes from nonblocking rsync operations.
rs_result rs_scoop_readahead(rs_job_t *job, size_t len, void **ptr)
Read from scoop without advancing.
static void * rs_scoop_getbuf(rs_job_t *job, size_t *len)
Get the next contiguous buffer of data available in the scoop.
rs_result rs_tube_catchup(rs_job_t *job)
Put whatever will fit from the tube into the output of the stream.
static bool rs_scoop_eof(rs_job_t *job)
Test if the scoop has reached eof.
void rs_tube_write(rs_job_t *job, void const *buf, size_t len)
Push some data into the tube for storage.
rs_result rs_scoop_read(rs_job_t *job, size_t len, void **ptr)
Read LEN bytes if possible, and remove them from the input scoop.
void rs_tube_copy(rs_job_t *job, size_t len)
Queue up a request to copy through len bytes from the input to the output of the stream.
void rs_scoop_advance(rs_job_t *job, size_t len)
Advance the input cursor forward len bytes.
static void * rs_scoop_iterbuf(rs_job_t *job, size_t *len, size_t *ilen)
Iterate through and consume contiguous data buffers in the scoop.
static void * rs_scoop_buf(rs_job_t *job)
Get a pointer to the next input in the scoop.
static size_t rs_scoop_len(rs_job_t *job)
Get the contiguous length of the next input in the scoop.
static void * rs_scoop_nextbuf(rs_job_t *job, size_t *len, size_t *ilen)
Get the next iteration of contiguous data buffers from the scoop.
rs_result rs_scoop_read_rest(rs_job_t *job, size_t *len, void **ptr)
Read whatever data remains in the input stream.
size_t avail_in
Number of bytes available at next_in.
int eof_in
True if there is no more data after this.
The contents of this structure are private.
rs_byte_t * scoop_next
The next data pointer.
size_t scoop_avail
The amount of data available.