nx_cloud_storage_sdk
1.0
Cloud Storage SDK
|
#include <i_plugin.h>
Public Types | |
typedef IPlugin *(* | EntryPointFunc) () |
typedef IPlugin *(* | MultiEntryPointFunc) (int instanceIndex) |
Public Member Functions | |
virtual void | setUtilityProvider (IUtilityProvider *utilityProvider)=0 |
![]() | |
virtual IRefCountable * | queryInterface (const InterfaceId *id) |
Ptr< RefCountable > | queryInterface () |
Ptr< const RefCountable > | queryInterface () const |
![]() | |
virtual | ~IRefCountable ()=default |
template<class RefCountable > | |
Ptr< RefCountable > | queryInterface () |
template<class RefCountable > | |
Ptr< const RefCountable > | queryInterface () const |
virtual int | addRef () const =0 |
virtual int | releaseRef () const =0 |
int | refCountThreadUnsafe () const |
Static Public Member Functions | |
static auto | interfaceId () |
static auto | alternativeInterfaceId () |
![]() | |
static auto | interfaceId () |
Static Public Attributes | |
static constexpr const char * | kEntryPointFuncName = "createNxPlugin" |
static constexpr const char * | kMultiEntryPointFuncName = "createNxPluginByIndex" |
Additional Inherited Members | |
![]() | |
virtual IRefCountable * | queryInterface (const IRefCountable::InterfaceId *id) override |
IRefCountable * | queryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId) |
![]() | |
template<int len> | |
static constexpr const InterfaceId * | makeId (const char(&charArray)[len]) |
template<class TemplateInstance , class TemplateArg , int len> | |
static const InterfaceId * | makeIdForTemplate (const char(&baseIdCharArray)[len]) |
![]() | |
template<typename RefCountable > | |
static constexpr bool | hasAlternativeInterfaceId = HasAlternativeInterfaceId<RefCountable>::value |
The main interface that any VMS Plugin implements. The plugin's dynamic library should export only an extern-C function with the name and prototype defined in this interface, which acts as a getter/factory for a single object implementing this interface.
The only object of this class is created by a Server on its start, and is destroyed (via releaseRef()) on the Server shutdown.
All methods are guaranteed to be called without overlapping even if from different threads (i.e. with a guaranteed barrier between the calls), thus, no synchronization is required for the implementation.
ATTENTION: If the Plugins's dynamic library is linked to any dynamic libraries, including the ones from the OS, consult Using dynamic libraries in Plugins to avoid potential issues.
typedef IPlugin*(* nx::sdk::IPlugin::EntryPointFunc) () |
Prototype of a plugin entry point function for single-IPlugin Plugins.
The Server calls this function only when the Plugin library does not export the multi-IPlugin entry point function.
typedef IPlugin*(* nx::sdk::IPlugin::MultiEntryPointFunc) (int instanceIndex) |
Prototype of a plugin entry point function for multi-IPlugin Plugins.
The Server calls this function multiple times, passing sequential values starting from 0, until the function returns null. Each non-null result is processed the same way as the result of the single-IPlugin entry point function.
If this function is exported from the Plugin library and returns at least one Plugin instance, the single-IPlugin entry point function will not be called.
|
pure virtual |
Provides an object which the plugin can use for calling back to access some data and functionality provided by the process that uses the plugin.
For details, see the documentation for IUtilityProvider.
Implemented in nx::vms_server_plugins::cloud_storage::stub::Plugin, and nx::vms_server_plugins::cloud_storage::sample::Plugin.
|
static |
Name of a plugin entry point function for single-IPlugin plugins.
|
static |
Name of a Plugin entry point function for multi-IPlugin Plugins.