nx_metadata_sdk  1.0
Metadata SDK
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
nx::sdk::IPlugin Class Referenceabstract

#include <i_plugin.h>

Inheritance diagram for nx::sdk::IPlugin:
nx::sdk::Interface< IPlugin > nx::sdk::IRefCountable nx::sdk::Interface< IPlugin, nx::sdk::IPlugin0 > nx::sdk::RefCountable< IPlugin > nx::sdk::analytics::IPlugin nx::sdk::analytics::Plugin nx::vms_server_plugins::analytics::sample::Plugin nx::vms_server_plugins::analytics::stub::best_shots::Plugin nx::vms_server_plugins::analytics::stub::custom_metadata::Plugin nx::vms_server_plugins::analytics::stub::deprecated_object_detection::Plugin nx::vms_server_plugins::analytics::stub::diagnostic_events::Plugin nx::vms_server_plugins::analytics::stub::events::Plugin nx::vms_server_plugins::analytics::stub::motion_metadata::Plugin nx::vms_server_plugins::analytics::stub::object_actions::Plugin nx::vms_server_plugins::analytics::stub::object_detection::Plugin nx::vms_server_plugins::analytics::stub::object_streamer::Plugin nx::vms_server_plugins::analytics::stub::roi::Plugin nx::vms_server_plugins::analytics::stub::sdk_features::Plugin nx::vms_server_plugins::analytics::stub::settings::Plugin nx::vms_server_plugins::analytics::stub::special_objects::Plugin nx::vms_server_plugins::analytics::stub::taxonomy_features::Plugin nx::vms_server_plugins::analytics::stub::video_frames::Plugin

Public Types

typedef IPlugin *(* EntryPointFunc) ()
 
typedef IPlugin *(* MultiEntryPointFunc) (int instanceIndex)
 

Public Member Functions

virtual void setUtilityProvider (IUtilityProvider *utilityProvider)=0
 
- Public Member Functions inherited from nx::sdk::Interface< IPlugin >
virtual IRefCountablequeryInterface (const InterfaceId *id)
 
Ptr< InterfacequeryInterface ()
 
Ptr< const InterfacequeryInterface () const
 
- Public Member Functions inherited from nx::sdk::IRefCountable
virtual ~IRefCountable ()=default
 
template<class Interface >
Ptr< InterfacequeryInterface ()
 
template<class Interface >
Ptr< const InterfacequeryInterface () const
 
virtual int addRef () const =0
 
virtual int releaseRef () const =0
 
int refCountThreadUnsafe () const
 

Static Public Member Functions

static auto interfaceId ()
 
- Static Public Member Functions inherited from nx::sdk::IRefCountable
static auto interfaceId ()
 

Static Public Attributes

static constexpr const char * kEntryPointFuncName = "createNxPlugin"
 
static constexpr const char * kMultiEntryPointFuncName = "createNxPluginByIndex"
 

Additional Inherited Members

- Protected Member Functions inherited from nx::sdk::Interface< IPlugin >
virtual IRefCountablequeryInterface (const IRefCountable::InterfaceId *id) override
 
IRefCountablequeryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId)
 
- Static Protected Member Functions inherited from nx::sdk::IRefCountable
template<int len>
static constexpr const InterfaceIdmakeId (const char(&charArray)[len])
 
template<class TemplateInstance , class TemplateArg , int len>
static const InterfaceIdmakeIdForTemplate (const char(&baseIdCharArray)[len])
 

Detailed Description

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.

Member Typedef Documentation

◆ EntryPointFunc

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.

◆ MultiEntryPointFunc

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.

Member Function Documentation

◆ setUtilityProvider()

virtual void nx::sdk::IPlugin::setUtilityProvider ( IUtilityProvider utilityProvider)
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::sdk::analytics::Plugin.

Member Data Documentation

◆ kEntryPointFuncName

constexpr const char* nx::sdk::IPlugin::kEntryPointFuncName = "createNxPlugin"
static

Name of a plugin entry point function for single-IPlugin plugins.

◆ kMultiEntryPointFuncName

constexpr const char* nx::sdk::IPlugin::kMultiEntryPointFuncName = "createNxPluginByIndex"
static

Name of a Plugin entry point function for multi-IPlugin Plugins.


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