Method

RBChunkLoaderset_callback

Declaration [src]

void
rb_chunk_loader_set_callback (
  RBChunkLoader* loader,
  RBChunkLoaderCallback callback,
  gpointer user_data,
  GDestroyNotify destroy_data
)

Description [src]

Sets the loader data callback. This will be called with each chunk of data read, or with NULL to indicate the end of the file or that an error has occurred. To determine which of these is the case, call rb_chunk_loader_get_error.

This must be called before rb_chunk_loader_start.

Parameters

callback

Type: RBChunkLoaderCallback

The data/error callback.

user_data

Type: gpointer

Data to pass to the callback.

The argument can be NULL.
The data is owned by the caller of the method.
destroy_data

Type: GDestroyNotify

Function to call to destroy user_data.