typedef struct { int (*open)(struct GB_STREAM *stream, const char *path, int mode, void *data); int (*close)(struct GB_STREAM *stream); int (*read)(struct GB_STREAM *stream, char *buffer, long len); int (*write)(struct GB_STREAM *stream, char *buffer, long len); int (*seek)(struct GB_STREAM *stream, long pos, int whence); int (*tell)(struct GB_STREAM *stream, long *pos); int (*flush)(struct GB_STREAM *stream); int (*eof)(struct GB_STREAM *stream); int (*lof)(struct GB_STREAM *stream, long *len); int (*handle)(struct GB_STREAM *stream); } GB_STREAM_DESC;
This describe is a function pointer table that must point at the implementation functions of your stream.
Each stream has a pointer to such a structure. See GB_STREAM for more details.