Appends to an IO buffer.
INKReturnCode INKIOBufferAppend (INKIOBuffer bufp,
INKIOBufferBlock blockp)
Appends a block to the IO buffer bufp
. The data in the
appended block is made available for reading.
INK_SUCCESS
if the block was successfully appended to
the specified IO buffer.
INK_ERROR
if an error occurred.
Creates an IO buffer block.
INKIOBufferBlock INKIOBufferBlockCreate
(INKIOBufferData
datap
, int
size
, int
offset
)
Creates a new IO buffer block and initializes it with
the IO buffer data
. The
datap
parameter is the
amount of data initially available for reading in this
new buffer block. The
size
parameter is
the offset into offset
that will be used as the start for the block. The two
common uses for datap
INKIOBufferBlockCreate
are to create an empty block (by specifying size as 0) and to
create a full block (by specifying size as the total size of
). The newly-created block should be added
almost immediately to an IO buffer by a call to datap
INKIOBufferAppend
, since there is no
function for destroying a buffer block other than simply relying
on its automatic destruction by an IO buffer.
The newly-created IO buffer block.
Creates IO buffer data.
INKIOBufferData INKIOBufferDataCreate (void*
data
, int
size
, INKIOBufferDataFlags
flags
)
Creates a new IO buffer data and initialize it with
,
data
. The
size
parameter
specifies how to interpret data.flags
INK_DATA_ALLOCATE
The data pointer is NULL
and the data
associated with the INKIOBufferData
should be allocated.
INKIOBufferDataCreate
rounds size to a
power of 2 less than or equal to 32K.
INK_DATA_MALLOCED
The data pointer was allocated by
INKmalloc
and will be freed when the last
reference to the new INKIOBufferData
is
released by a call to INKfree
.
INK_DATA_CONSTANT
The data pointer is data that should not be freed when
the last reference to the new
INKIOBufferData
is released.
A handle to the newly-created IO buffer.