Interface for IByteStream wrapper.
More...
Go to the source code of this file.
|
| IByteStream | IByteStream_Create (PtrReadFn ptrReadFn, PtrWriteFn ptrWriteFn, PtrSeekFn ptrSeekFn, PtrIsOpenFn ptrIsOpenFn, PtrIsWriteOpenFn ptrIsWriteOpenFn, PtrIsReadOpenFn ptrIsReadOpenFn, idrs_exception *pargException) |
| | Creates a new IByteStream object.
|
| |
| void | IByteStream_Destroy (IByteStream argIByteStream, idrs_exception *pargException) |
| | Destroys a IByteStream handle.
|
| |
| IDRS_UINT | IByteStream_Read (IByteStream argIByteStream, IDRS_PVOID pvMem, IDRS_UINT const uiToRead, idrs_exception *pargException) |
| | Read reads data from the stream at the current stream position.
|
| |
| IDRS_UINT | IByteStream_Write (IByteStream argIByteStream, IDRS_CPVOID pvMem, IDRS_UINT const uiToWrite, idrs_exception *pargException) |
| | Write writes data in the stream at the current position.
|
| |
| IDRS_UINT64 | IByteStream_Seek (IByteStream argIByteStream, IDRS_INT64 const iOffset, enum SeekPosition const evPos, idrs_exception *pargException) |
| | Seek changes the current position in the stream.
|
| |
| IDRS_BOOL | IByteStream_IsOpen (const IByteStream argIByteStream, idrs_exception *pargException) |
| | IsOpen tests if the stream is opened in read or write mode.
|
| |
| IDRS_BOOL | IByteStream_IsWriteOpen (const IByteStream argIByteStream, idrs_exception *pargException) |
| | IsWriteOpen tests if the stream is opened in write mode.
|
| |
| IDRS_BOOL | IByteStream_IsReadOpen (const IByteStream argIByteStream, idrs_exception *pargException) |
| | IsReadOpen tests if the stream is opened in read mode.
|
| |
Interface for IByteStream wrapper.
◆ IByteStream_Create()
| IByteStream IByteStream_Create |
( |
PtrReadFn |
ptrReadFn, |
|
|
PtrWriteFn |
ptrWriteFn, |
|
|
PtrSeekFn |
ptrSeekFn, |
|
|
PtrIsOpenFn |
ptrIsOpenFn, |
|
|
PtrIsWriteOpenFn |
ptrIsWriteOpenFn, |
|
|
PtrIsReadOpenFn |
ptrIsReadOpenFn, |
|
|
idrs_exception * |
pargException |
|
) |
| |
Creates a new IByteStream object.
- Parameters
-
| ptrReadFn | Read function pointer |
| ptrWriteFn | Write function pointer |
| ptrSeekFn | Seek function pointer |
| ptrIsOpenFn | IsOpen function pointer |
| ptrIsWriteOpenFn | IsWriteOpen function pointer |
| ptrIsReadOpenFn | IsReadOpen function pointer |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
- Returns
- The newly created IByteStream
◆ IByteStream_Destroy()
| void IByteStream_Destroy |
( |
IByteStream |
argIByteStream, |
|
|
idrs_exception * |
pargException |
|
) |
| |
Destroys a IByteStream handle.
- Parameters
-
| argIByteStream | IByteStream handle to destroy |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
◆ IByteStream_IsOpen()
IsOpen tests if the stream is opened in read or write mode.
- Return values
-
| IDRS_TRUE | if the stream is opened |
| IDRS_FALSE | otherwise |
- Parameters
-
| argIByteStream | IByteStream handle |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
◆ IByteStream_IsReadOpen()
| IDRS_BOOL IByteStream_IsReadOpen |
( |
const IByteStream |
argIByteStream, |
|
|
idrs_exception * |
pargException |
|
) |
| |
IsReadOpen tests if the stream is opened in read mode.
- Return values
-
| IDRS_TRUE | if the stream is opened in read mode. |
| IDRS_FALSE | otherwise. |
- Parameters
-
| argIByteStream | IByteStream handle |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
◆ IByteStream_IsWriteOpen()
| IDRS_BOOL IByteStream_IsWriteOpen |
( |
const IByteStream |
argIByteStream, |
|
|
idrs_exception * |
pargException |
|
) |
| |
IsWriteOpen tests if the stream is opened in write mode.
- Return values
-
| IDRS_TRUE | if the stream is opened in write mode. |
| IDRS_FALSE | otherwise. |
- Parameters
-
| argIByteStream | IByteStream handle |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
◆ IByteStream_Read()
Read reads data from the stream at the current stream position.
- Parameters
-
| argIByteStream | IByteStream handle |
| pvMem | The buffer that will receive the data. |
| uiToRead | The number of bytes to transfer. |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
- Returns
- The number of bytes transfered from the stream to pvMem.
◆ IByteStream_Seek()
Seek changes the current position in the stream.
- Parameters
-
| argIByteStream | IByteStream handle |
| iOffset | The number of bytes to move the pointer. |
| evPos | Pointer movement mode (from begin, current, or end position). |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
- Returns
- The new byte offset from the beginning of the stream.
◆ IByteStream_Write()
Write writes data in the stream at the current position.
- Parameters
-
| argIByteStream | IByteStream handle |
| pvMem | The buffer that contains the data to transfer |
| uiToWrite | The number of bytes to transfer |
| pargException | Pointer to exception structure that will be filled if an exception occurs |
- Returns
- The number of bytes transfered from pvMem to the stream.