Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rs_buffers_s Struct Reference

#include </home/clem/local/src/opie/rsync/rsync.h>

List of all members.

Public Attributes

char * next_in
size_t avail_in
int eof_in
char * next_out
size_t avail_out


Detailed Description

Stream through which the calling application feeds data to and from the library.

On each call to rs_job_iter, the caller can make available

Buffers must be allocated and passed in by the caller. This routine never allocates, reallocates or frees buffers.

Pay attention to the meaning of the returned pointer and length values. They do not indicate the location and amount of returned data. Rather, if *out_ptr was originally set to out_buf, then the output data begins at out_buf, and has length *out_ptr - out_buf.

Note also that if *avail_in is nonzero on return, then not all of the input data has been consumed. The caller should either provide more output buffer space and call rs_work() again passing the same next_in and avail_in, or put the remaining input data into some persistent buffer and call rs_work() with it again when there is more output space.

Parameters:
next_in References a pointer which on entry should point to the start of the data to be encoded. Updated to point to the byte after the last one consumed.
avail_in References the length of available input. Updated to be the number of unused data bytes, which will be zero if all the input was consumed. May be zero if there is no new input, but the caller just wants to drain output.
next_out References a pointer which on entry points to the start of the output buffer. Updated to point to the byte after the last one filled.
avail_out References the size of available output buffer. Updated to the size of unused output buffer.
Returns:
The rs_result that caused iteration to stop.
See also:
rs_buffers_t

api_buffers

Definition at line 273 of file rsync.h.


Member Data Documentation

size_t rs_buffers_s::avail_in
 

Number of bytes available at next_in

Definition at line 275 of file rsync.h.

size_t rs_buffers_s::avail_out
 

Remaining free space at next_out

Definition at line 280 of file rsync.h.

int rs_buffers_s::eof_in
 

True if there is no more data after this.

Definition at line 276 of file rsync.h.

char* rs_buffers_s::next_in
 

Next input byte

Definition at line 274 of file rsync.h.

char* rs_buffers_s::next_out
 

Next output byte should be put there

Definition at line 279 of file rsync.h.


The documentation for this struct was generated from the following file:
Generated on Sat Nov 5 17:50:59 2005 for OPIE by  doxygen 1.4.2