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

Storage abstraction. More...

#include <third_party_storage.h>

Inheritance diagram for nx_spl::Storage:
nxpl::PluginInterface nx_spl::FtpStorage TestStorage

Public Member Functions

virtual int STORAGE_METHOD_CALL isAvailable () const =0
 
virtual IODevice *STORAGE_METHOD_CALL open (const char *url, int flags, int *ecode) const =0
 
virtual uint64_t STORAGE_METHOD_CALL getFreeSpace (int *ecode) const =0
 
virtual uint64_t STORAGE_METHOD_CALL getTotalSpace (int *ecode) const =0
 
virtual int STORAGE_METHOD_CALL getCapabilities () const =0
 
virtual void STORAGE_METHOD_CALL removeFile (const char *url, int *ecode)=0
 
virtual void STORAGE_METHOD_CALL removeDir (const char *url, int *ecode)=0
 
virtual void STORAGE_METHOD_CALL renameFile (const char *oldUrl, const char *newUrl, int *ecode)=0
 
virtual FileInfoIterator *STORAGE_METHOD_CALL getFileIterator (const char *dirUrl, int *ecode) const =0
 
virtual int STORAGE_METHOD_CALL fileExists (const char *url, int *ecode) const =0
 
virtual int STORAGE_METHOD_CALL dirExists (const char *url, int *ecode) const =0
 
virtual uint64_t STORAGE_METHOD_CALL fileSize (const char *url, int *ecode) const =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

Storage abstraction.

Member Function Documentation

◆ dirExists()

virtual int STORAGE_METHOD_CALL nx_spl::Storage::dirExists ( const char *  url,
int *  ecode 
) const
pure virtual
Parameters
urlDirectory URL. This should be NULL terminated utf8 encoded C string
ecodePointer to error code. Pass NULL if you are not interested in error information.
Returns
(0, 1).

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ fileExists()

virtual int STORAGE_METHOD_CALL nx_spl::Storage::fileExists ( const char *  url,
int *  ecode 
) const
pure virtual
Parameters
urlFile URL. This should be NULL terminated utf8 encoded C string
ecodePointer error code. Pass NULL if you are not interested in error information.
Returns
(0, 1).

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ fileSize()

virtual uint64_t STORAGE_METHOD_CALL nx_spl::Storage::fileSize ( const char *  url,
int *  ecode 
) const
pure virtual
Parameters
urlFile URL. This should be NULL terminated utf8 encoded C string
ecodePointer to error code. Pass NULL if you are not interested in error information.
Returns
File size.

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ getCapabilities()

virtual int STORAGE_METHOD_CALL nx_spl::Storage::getCapabilities ( ) const
pure virtual
Returns
cap flag(s).

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ getFileIterator()

virtual FileInfoIterator* STORAGE_METHOD_CALL nx_spl::Storage::getFileIterator ( const char *  dirUrl,
int *  ecode 
) const
pure virtual
Parameters
dirUrlDirectory URL. This should be NULL terminated utf8 encoded C string.
ecodePointer error code. Pass NULL if you are not interested in error information.
Returns
Pointer to FileInfoVector or NULL if something bad happened.

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ getFreeSpace()

virtual uint64_t STORAGE_METHOD_CALL nx_spl::Storage::getFreeSpace ( int *  ecode) const
pure virtual
Parameters
ecodePointer to error code. Pass NULL if you are not interested in error information.
Returns
Free space size ('unknown_size' if request can't be accomplished).

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ getTotalSpace()

virtual uint64_t STORAGE_METHOD_CALL nx_spl::Storage::getTotalSpace ( int *  ecode) const
pure virtual
Parameters
ecodePointer to error code. Pass NULL if you are not interested in error information.
Returns
Total space size ('unknown_size' if request can't be accomplished).

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ isAvailable()

virtual int STORAGE_METHOD_CALL nx_spl::Storage::isAvailable ( ) const
pure virtual
Returns
is storage available at the moment (0,1).

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ open()

virtual IODevice* STORAGE_METHOD_CALL nx_spl::Storage::open ( const char *  url,
int  flags,
int *  ecode 
) const
pure virtual
Parameters
urlFile URL. If file doesn't exists, it is created. This should be NULL terminated utf8 encoded C string.
flagsio flag(s)
ecodePointer to error code. Pass NULL if you are not interested in error information.
Returns
Free space size ('unknown_size' if request can't be accomplished).

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ removeDir()

virtual void STORAGE_METHOD_CALL nx_spl::Storage::removeDir ( const char *  url,
int *  ecode 
)
pure virtual
Parameters
urlDir targeted to delete URL. This should be NULL terminated utf8 encoded C string
ecodePointer to error code. Pass NULL if you are not interested in error information.

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ removeFile()

virtual void STORAGE_METHOD_CALL nx_spl::Storage::removeFile ( const char *  url,
int *  ecode 
)
pure virtual
Parameters
urlFile targeted to delete URL. This should be NULL terminated utf8 encoded C string
ecodePointer to error code. Pass NULL if you are not interested in error information.

Implemented in nx_spl::FtpStorage, and TestStorage.

◆ renameFile()

virtual void STORAGE_METHOD_CALL nx_spl::Storage::renameFile ( const char *  oldUrl,
const char *  newUrl,
int *  ecode 
)
pure virtual
Parameters
oldUrlFile targeted to rename URL. This should be NULL terminated utf8 encoded C string.
newUrlFile targeted to rename new URL. This should be NULL terminated C string.
ecodePointer to error code. Pass NULL if you are not interested in error information.

Implemented in nx_spl::FtpStorage, and TestStorage.


The documentation for this class was generated from the following file: