XQC_InputStream_s Struct Reference

The XQC_InputStream struct is designed to be populated by users for the purpose of streaming data into an XQC implementation. More...

#include <zorba/zorbac.h>


Data Fields

void(* free )(XQC_InputStream stream)
 Called to free the resources associated with the XQC_InputStream.
int(* read )(XQC_InputStream stream, char *buf, unsigned int length)
 The function called to read more of the input (e.g.
void * user_data
 Can be used for user specific purposes.


Detailed Description

The XQC_InputStream struct is designed to be populated by users for the purpose of streaming data into an XQC implementation.
Examples:

csimple.c.

Definition at line 2004 of file zorbac.h.


Field Documentation

Called to free the resources associated with the XQC_InputStream.

The free function is called by the implementation if it finished reading from the stream. This allows for lazy evaluation without the user needing to know when reading from the stream has finished.

Parameters:
stream The XQC_InputStream that this function pointer is a member of
Examples:
csimple.c.

int(* XQC_InputStream_s::read)(XQC_InputStream stream, char *buf, unsigned int length)

The function called to read more of the input (e.g.

the query). The function should read the next chunk of input into the buffer provided, returning the length of the data read.

Parameters:
stream The XQC_InputStream that this function pointer is a member of
[out] buffer The buffer to read the data into
length The length of the buffer
Returns:
The number of bytes read - this will be less than length if the end of the input is reached or -1 if an error occured
Examples:
csimple.c.

Can be used for user specific purposes.

Definition at line 2037 of file zorbac.h.


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