RecAPI
|
API for handling input and output files through memory or other non-standard I/O devices. Supported on: Windows, Linux, MacOS. More...
Classes | |
struct | _R_IOStreamfuncs |
Container structure of the IOStream callback functions. More... | |
Defines | |
#define | NOT_APPLICATION_STREAM ((size_t)-1) |
Return this value if the given name is not handled by your stream callbacks. | |
Typedefs | |
typedef int CALLBACK | open_stream_f (const char *streamName, int openMode, size_t *streamID) |
callback function for the OPEN operation. See R_IOStreamfuncs::ropen_stream | |
typedef struct _R_IOStreamfuncs | R_IOStreamfuncs |
Container structure of the IOStream callback functions. | |
Functions | |
RECERR RECAPIKRN | kRecSetIOStreamCB (R_IOStreamfuncs *iosCB) |
IOStream. |
API for handling input and output files through memory or other non-standard I/O devices. Supported on: Windows, Linux, MacOS.
typedef struct _R_IOStreamfuncs R_IOStreamfuncs |
Container structure of the IOStream callback functions.
RECERR RECAPIKRN kRecSetIOStreamCB | ( | R_IOStreamfuncs * | iosCB | ) |
IOStream.
This function sets the application callback API for streaming IO.
[in] | iosCB | Pointer to the R_IOStreamfuncs structure containing callback functions. Must be provided and implemented by the application. Use NULL to turn off the callback mechanism. |
ropen_stream
must return a unique ID in streamID. Otherwise you must return NOT_APPLICATION_STREAM
in the streamID
parameter and the file will be handled normally.errno
compatible error code when your stream operation has an 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. int kRecSetIOStreamCB(IOStreamCallbacks iosCB)
def kRecSetIOStreamCB(iosCB: "IOStreamCallbacks") -> int