8 #ifndef LT_IO_CALLBACK_STREAM_H
9 #define LT_IO_CALLBACK_STREAM_H
14 LT_BEGIN_LIZARDTECH_NAMESPACE
89 virtual const char*
getID()
const;
105 LT_END_LIZARDTECH_NAMESPACE
LT_STATUS(* LTIOCallbackStream_Seek)(void *, lt_int64, LTIOSeekDir)
typedef for callback stream seek function
lt_int64(* LTIOCallbackStream_Tell)(void *)
typedef for callback stream tell function
lt_uint32(* LTIOCallbackStream_Write)(void *, const lt_uint8 *, lt_uint32)
typedef for callback stream write function
lt_uint8(* LTIOCallbackStream_IsOpen)(void *)
typedef for callback stream isOpen function
lt_uint8(* LTIOCallbackStream_IsEOF)(void *)
typedef for callback stream isEOF function
LTIOStreamH(* LTIOCallbackStream_Duplicate)(void *)
typedef for callback stream duplicate function
lt_uint32(* LTIOCallbackStream_Read)(void *, lt_uint8 *, lt_uint32)
typedef for callback stream read function
LT_STATUS(* LTIOCallbackStream_Close)(void *)
typedef for callback stream close function
LT_STATUS(* LTIOCallbackStream_Open)(void *)
typedef for callback stream open function
LTIOSeekDir
Stream seek directions.
lt_uint32 LT_STATUS
An integral status code.
unsigned char lt_uint8
unsigned 8-bit integer
unsigned int lt_uint32
unsigned 32-bit integer
long long int lt_int64
signed 64-bit integer
Stream driven entirely by user-defined callbacks.
virtual bool isEOF()
Test for end-of-stream.
virtual lt_uint32 read(lt_uint8 *pDest, lt_uint32 numBytes)
Retrieve the specified number of bytes from the data source and place them in pDest.
virtual LT_STATUS open()
Opens the stream.
virtual lt_uint32 write(const lt_uint8 *pSrc, lt_uint32 numBytes)
Store the specified number of bytes in the data source.
virtual LT_STATUS initialize(LTIOCallbackStream_Open open, LTIOCallbackStream_Close close, LTIOCallbackStream_Read read, LTIOCallbackStream_Write write, LTIOCallbackStream_Seek seek, LTIOCallbackStream_Tell tell, LTIOCallbackStream_IsEOF isEOF, LTIOCallbackStream_IsOpen isOpen, LTIOCallbackStream_Duplicate duplicate, void *user)
initialize
virtual LT_STATUS seek(lt_int64 offset, LTIOSeekDir origin)
Moves the data access position to origin + offset.
virtual const char * getID() const
Get a URI describing the stream object.
virtual LTIOStreamInf * duplicate()
Clone the stream.
virtual LT_STATUS getLastError() const
Get status code of last error event.
virtual ~LTIOCallbackStream()
virtual LT_STATUS close()
Closes the stream.
virtual bool isOpen()
Test for stream openness.
virtual lt_int64 tell()
Returns the current data access position as an offset from the start of the data.
Abstract definition of a stream.