nx_storage_sdk  1.0
Storage SDK
Public Member Functions | List of all members
nx_spl::IODevice Class Referenceabstract

IO device abstraction. More...

#include <third_party_storage.h>

Inheritance diagram for nx_spl::IODevice:
nxpl::PluginInterface nx_spl::FtpIODevice TestIODevice

Public Member Functions

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
 
- Public Member Functions inherited from nxpl::PluginInterface
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...
 

Detailed Description

IO device abstraction.

Member Function Documentation

◆ getMode()

virtual int STORAGE_METHOD_CALL nx_spl::IODevice::getMode ( ) const
pure virtual
Returns
IOMode

Implemented in nx_spl::FtpIODevice, and TestIODevice.

◆ 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
dstpointer to user buffer
sizeread size (bytes)
ecodePointer 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
posseek position
ecodePointer 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
ecodePointer 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
srcsource data
sizewrite size (bytes)
ecodePointer 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: