#include "sbgInterfaceFile.h"
Go to the source code of this file.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileClose | ( | SbgInterface * | pHandle | ) |
Destroy an interface initialized using sbgInterfaceFileOpen.
[in] | pInterface | Valid handle on an initialized interface. |
Definition at line 121 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileFlush | ( | SbgInterface * | pHandle | ) |
Make an interface flush all pending input or output data.
[in] | pHandle | Valid handle on an initialized interface. |
Definition at line 307 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API size_t sbgInterfaceFileGetCursor | ( | const SbgInterface * | pHandle | ) |
Returns the current cursor position in the file in bytes.
[in] | pInterface | Valid handle on an initialized interface. |
Definition at line 195 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API size_t sbgInterfaceFileGetSize | ( | SbgInterface * | pHandle | ) |
Returns the file size in bytes.
[in] | pInterface | Valid handle on an initialized interface. |
Definition at line 152 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileOpen | ( | SbgInterface * | pHandle, |
const char * | filePath | ||
) |
Open a file as an interface for read only operations.
[in] | pHandle | Pointer on an allocated interface instance to initialize. |
[in] | filePath | File path to open. |
Definition at line 17 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileRead | ( | SbgInterface * | pHandle, |
void * | pBuffer, | ||
size_t * | pReadBytes, | ||
size_t | bytesToRead | ||
) |
Try to read some data from an interface.
[in] | pHandle | Valid handle on an initialized interface. |
[in] | pBuffer | Pointer on an allocated buffer that can hold at least bytesToRead bytes of data. |
[out] | pReadBytes | Pointer on an uint32_t used to return the number of read bytes. |
[in] | bytesToRead | Number of bytes we would like to read. |
Definition at line 278 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileReadFake | ( | SbgInterface * | pHandle, |
void * | pBuffer, | ||
size_t * | pReadBytes, | ||
size_t | bytesToRead | ||
) |
Fake read function for write only interfaces
[in] | pHandle | Valid handle on an initialized interface. |
[in] | pBuffer | Pointer on an allocated buffer that can hold at least bytesToRead bytes of data. |
[out] | pReadBytes | Pointer on an uint32_t used to return the number of read bytes. |
[in] | bytesToRead | Number of bytes we would like to read. |
Definition at line 367 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileWrite | ( | SbgInterface * | pHandle, |
const void * | pBuffer, | ||
size_t | bytesToWrite | ||
) |
Try to write some data to an interface.
[in] | pHandle | Valid handle on an initialized interface. |
[in] | pBuffer | Pointer on an allocated buffer that contains the data to write |
[in] | bytesToWrite | Number of bytes we would like to write. |
Definition at line 235 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileWriteFake | ( | SbgInterface * | pHandle, |
const void * | pBuffer, | ||
size_t | bytesToWrite | ||
) |
Fake write function for read only interfaces
[in] | pHandle | Valid handle on an initialized interface. |
[in] | pBuffer | Pointer on an allocated buffer that contains the data to write |
[in] | bytesToWrite | Number of bytes we would like to write. |
Definition at line 347 of file sbgInterfaceFile.c.
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceFileWriteOpen | ( | SbgInterface * | pHandle, |
const char * | filePath | ||
) |
Open a file as an interface for write only operations.
[in] | pHandle | Pointer on an allocated interface instance to initialize. |
[in] | filePath | File path to open. |
Definition at line 75 of file sbgInterfaceFile.c.