RecAPI
_R_IOStreamfuncs Struct Reference

Container structure of the IOStream callback functions. More...

List of all members.

Public Attributes

open_stream_fropen_stream
read_stream_f * rread_stream
write_stream_f * rwrite_stream
tell_stream_f * rtell_stream
seek_stream_f * rseek_stream
close_stream_f * rclose_stream
access_stream_f * raccess_stream
commit_stream_f * rcommit_stream
trim_stream_f * rtrim_stream
is_stream_f * ris_stream

Detailed Description

Container structure of the IOStream callback functions.

Note:
See kRecSetIOStreamCB

Member Data Documentation

Check if the stream exists or not.
streamName: UTF-8 name of the stream
accMode: existence only: 0, check if readable: 4, check if writable: 2
(Note: these values are compatible with Unix's F_OK, R_OK and W_OK)
Return 1 if the named stream belongs to the application and is accessible.
Return -1 if the named stream belongs to the application but is not accessible.
Return 0 if the specified stream does not belong to the application.

Perform the CLOSE operation. Return 0 if no error, otherwise return errno.

Preform the COMMIT operation: flush any internal buffers.

Check if the given name is a stream or not
streamName: UTF-8 name of the stream
Return 1 if this stream belongs to the application otherwise 0.

Preform the OPEN operation on the specified stream.
Set streamID to NOT_APPLICATION_STREAM when the actual name does not belong to the application.
streamName: UTF-8 name of the stream
openMode: create: 1, read: 2, write: 4, and combinations
Return 0 if no error, otherwise return errno.

Perform the READ operation. Read at most size bytes to buf and return the amount read in read
Return 0 if no error, otherwise return errno.

Perform the SEEK operation.
offset: set the stream offset to this value relative to origin
origin: absolute offset: SEEK_SET, relative offset from current: SEEK_CUR, relative offset from EOF: SEEK_END
pos: return the final offset in pos
If the stream does not have seek capability use forward read (into memory) technic to emulate the seek that CSDK requires to work properly (specifically at some image inputs).
Return 0 if no error, otherwise return errno.

Perform the TELL operation. Store the current stream offset in pos
Return 0 if no error, otherwise return errno.

Perform the TRIM operation, if possible: set the stream size to newSize

Perform the WRITE operation. Write at most size bytes from buf and return the amount written in written
Return 0 if no error, otherwise return errno.