nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | List of all members
nx_spl::StorageFactory Class Referenceabstract

Storage factory abstraction. More...

`#include <third_party_storage.h>`

Inheritance diagram for nx_spl::StorageFactory:

## Public Member Functions
virtual const char **STORAGE_METHOD_CALL | findAvailable () const =0
virtual Storage *STORAGE_METHOD_CALL | createStorage (const char *url, int *ecode)=0
virtual const char *STORAGE_METHOD_CALL | storageType () const =0
virtual const char * | lastErrorMessage (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 factory abstraction.

This is the entry-point library class.

- Creates storage entities.
- "Knows" storage library type

## Member Function Documentation

## ◆ createStorage()

virtual Storage* STORAGE_METHOD_CALL nx_spl::StorageFactory::createStorage | ( | const char * | url,
|  | int * | ecode
| ) |  |
| pure virtual

Parameters

  url | Storage root URL. This should be NULL terminated utf8 encoded C string.
  ecode | Pointer to error code. Pass NULL if you are not interested in error information.

Returns
  pointer to Storage.

Implemented in nx_spl::FtpStorageFactory, and TestStorageFactory.

## ◆ findAvailable()

virtual const char** STORAGE_METHOD_CALL nx_spl::StorageFactory::findAvailable | ( |  | ) | const
| pure virtual

Returns
  available utf8 encoded urls list. Iterate till NULL.

Implemented in nx_spl::FtpStorageFactory, and TestStorageFactory.

## ◆ lastErrorMessage()

virtual const char* nx_spl::StorageFactory::lastErrorMessage | ( | int | ecode | ) | const
| pure virtual

Parameters

  ecode | Error code

Returns
  NULL terminated utf8 encoded C string

Implemented in nx_spl::FtpStorageFactory, and TestStorageFactory.

## ◆ storageType()

virtual const char* STORAGE_METHOD_CALL nx_spl::StorageFactory::storageType | ( |  | ) | const
| pure virtual

Returns
  English name of the Storage type. This name can be shown to the user, but is not used programmatically, so it can be any human-readable name, like "local", "network", "smb", "ftp", "tape", etc.

Implemented in nx_spl::FtpStorageFactory, and TestStorageFactory.

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

- src/storage/third_party_storage.h