Lhasa
LHAInputStreamType Struct Reference

Structure containing pointers to callback functions to read data from the input stream. More...

#include <lha_input_stream.h>

Data Fields

int(* read )(void *handle, void *buf, size_t buf_len)
 Read a block of data into the specified buffer.
 
int(* skip )(void *handle, size_t bytes)
 Skip the specified number of bytes from the input stream.
 
void(* close )(void *handle)
 Close the input stream.
 

Detailed Description

Structure containing pointers to callback functions to read data from the input stream.

Field Documentation

◆ close

void(* LHAInputStreamType::close) (void *handle)

Close the input stream.

Parameters
handleHandle pointer.

◆ read

int(* LHAInputStreamType::read) (void *handle, void *buf, size_t buf_len)

Read a block of data into the specified buffer.

Parameters
handleHandle pointer.
bufPointer to buffer in which to store read data.
buf_lenSize of buffer, in bytes.
Returns
Number of bytes read, or -1 for error.

◆ skip

int(* LHAInputStreamType::skip) (void *handle, size_t bytes)

Skip the specified number of bytes from the input stream.

This is an optional function.

Parameters
handleHandle pointer.
bytesNumber of bytes to skip.
Returns
Non-zero for success, or zero for failure.

The documentation for this struct was generated from the following file: