IO device abstraction.
More...
#include <third_party_storage.h>
|
virtual uint32_t STORAGE_METHOD_CALL | write (const void *src, const uint32_t size, int *ecode)=0 |
|
virtual uint32_t STORAGE_METHOD_CALL | read (void *dst, const uint32_t size, int *ecode) const =0 |
|
virtual int STORAGE_METHOD_CALL | getMode () const =0 |
|
virtual uint32_t STORAGE_METHOD_CALL | size (int *ecode) const =0 |
|
virtual int STORAGE_METHOD_CALL | seek (uint64_t pos, int *ecode)=0 |
|
virtual void * | queryInterface (const nxpl::NX_GUID &interfaceID)=0 |
| Cast to type, specified by interfaceID. More...
|
|
virtual int | addRef () const =0 |
| Increment reference counter. More...
|
|
virtual int | releaseRef () const =0 |
| Decrement reference counter. More...
|
|
◆ getMode()
virtual int STORAGE_METHOD_CALL nx_spl::IODevice::getMode |
( |
| ) |
const |
|
pure virtual |
◆ read()
virtual uint32_t STORAGE_METHOD_CALL nx_spl::IODevice::read |
( |
void * |
dst, |
|
|
const uint32_t |
size, |
|
|
int * |
ecode |
|
) |
| const |
|
pure virtual |
reads data from device to dst pointer
- Parameters
-
dst | pointer to user buffer |
size | read size (bytes) |
ecode | Pointer to error code. Pass NULL if you are not interested in error information. |
- Returns
- bytes read.
Implemented in nx_spl::FtpIODevice, and TestIODevice.
◆ seek()
virtual int STORAGE_METHOD_CALL nx_spl::IODevice::seek |
( |
uint64_t |
pos, |
|
|
int * |
ecode |
|
) |
| |
|
pure virtual |
- Parameters
-
pos | seek position |
ecode | Pointer to error code. Pass NULL if you are not interested in error information. |
- Returns
- success (0,1)
Implemented in nx_spl::FtpIODevice, and TestIODevice.
◆ size()
virtual uint32_t STORAGE_METHOD_CALL nx_spl::IODevice::size |
( |
int * |
ecode | ) |
const |
|
pure virtual |
- Parameters
-
ecode | Pointer to error code. Pass NULL if you are not interested in error information. |
- Returns
- available (read) size of device
Implemented in nx_spl::FtpIODevice, and TestIODevice.
◆ write()
virtual uint32_t STORAGE_METHOD_CALL nx_spl::IODevice::write |
( |
const void * |
src, |
|
|
const uint32_t |
size, |
|
|
int * |
ecode |
|
) |
| |
|
pure virtual |
- Parameters
-
src | source data |
size | write size (bytes) |
ecode | Pointer to error code. Pass NULL if you are not interested in error information. |
- Returns
- bytes written.
Implemented in nx_spl::FtpIODevice, and TestIODevice.
The documentation for this class was generated from the following file: