RecAPI
|
Classes | |
struct | _R_IOStreamfuncs |
Container structure of the IOStream callback functions. More... | |
Typedefs | |
typedef struct _R_IOStreamfuncs | R_IOStreamfuncs |
Container structure of the IOStream callback functions. | |
Functions | |
RECERR RECAPIKRN | kRecSetIOStreamCB (R_IOStreamfuncs *api) |
IOStream. |
typedef struct _R_IOStreamfuncs R_IOStreamfuncs |
Container structure of the IOStream callback functions.
streamname is UTF8 in open/access/is_stream
RECERR RECAPIKRN kRecSetIOStreamCB | ( | R_IOStreamfuncs * | api | ) |
IOStream.
This function sets the application callback API for streaming IO.
[in] | api | callback IO api provided and implemented by the application. NULL to turn off the callback mechanism. After the IOStream API has been set, all CSDK file opens are hooked and the callback R_IOStreamfuncs::ropen_stream is called first. If the actual file does not belong to the application, the open stream must return 0. Otherwise application should return with a unique ID. It should be a larger 32bit number. Small values are reserved for error codes. Your generated ID will be passed with other callbacks. These IDs should be mapped to handler objects inside the application. Return 5 (EIO) when your stream has open error. |
FileStream
and MemoryStream
are directly supported as well as byte[]
objects. These standard streams can be set using IOStreamCB.SetStream("userStreamName", Stream or byte[])
Any other non standard IO has to be completely implemented in the callbacks by the application.