RecAPI
MOD_IOSTREAM

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 Documentation

Container structure of the IOStream callback functions.

streamname is UTF8 in open/access/is_stream

Note:
See kRecSetIOStreamCB

Function Documentation

RECERR RECAPIKRN kRecSetIOStreamCB ( R_IOStreamfuncs api)

IOStream.

This function sets the application callback API for streaming IO.

Parameters:
[in]apicallback 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.
Note:
See Samples\C_API\Sample71.cpp for a sample implementation of the usage of the IOStream API on RECAPI.
For .NET application Objects API sample #71 (Samples\CSClassSamples\Sample71.cs) contains a worked out sample solution.
In .NET both 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.