ContentsReadFunc


Description:


public delegate bool ContentsReadFunc (Contents contents, void* buffer, size_t length)

This callback is used to retrieve the next chunk of data for a streaming contents buffer created with stream_read.

Return false when the buffer has reached its end, and no more data is available. Also return false, when the buffer size passed in length is not sufficient. Copy your minimal buffer size to length in that situation.

The library might pass null for buffer on the first call to start buffer size negotation.

See also: stream_new, stream_read

Parameters:

contents

a Contents buffer

buffer

a location for storing the contents, or null

length

a location for passing and storing the contents length in bytes.

user_data

the user_data passed to stream_new

Returns:

Returns true when the next chunk could be read, and false on error.


Namespace: Epc
Package: libepc-1.0



2022 vala-language.org