nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | List of all members
nxpl::PluginInterface Class Referenceabstract

Base class for every interface, provided by plugin. More...

`#include <plugin_api.h>`

Inheritance diagram for nxpl::PluginInterface:

## Public Member Functions
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

Base class for every interface, provided by plugin.

Responsible for object life-time tracking and up-cast

Life-time tracking is done by using reference counter which is altered by addRef and releaseRef methods Every object has reference count of 1 just after creation. When reference counter reaches zero, object MUST remove itself

## Member Function Documentation

## ◆ addRef()

virtual int nxpl::PluginInterface::addRef | ( |  | ) | const
| pure virtual

Increment reference counter.

Returns
  new reference count

Note
  PluginInterface::releaseRef is not guaranteed to be called from thread that called PluginInterface::addRef

Implemented in nx_spl::FtpStorageFactory, nx_spl::FtpStorage, nx_spl::FtpFileInfoIterator, nx_spl::FtpIODevice, TestStorage, ImageLibraryPlugin, TestIODevice, AxisCameraPlugin, AxisRelayIOManager, TestStorageFactory, StreamReader, AxisCameraManager, AxisMediaEncoder, MediaEncoder, ArchiveReader, AxisCameraDiscoveryManager, CameraManager, TimePeriods, TestFileInfoIterator, ILPEmptyPacket, ILPVideoPacket, MotionDataPicture, and DiscoveryManager.

## ◆ queryInterface()

virtual void* nxpl::PluginInterface::queryInterface | ( | const nxpl::NX_GUID & | interfaceID | ) |
| pure virtual

Cast to type, specified by interfaceID.

If pointer cannot be cast, NULL MUST be returned

Returns
  If not NULL, returned pointer can be safely cast to type, defined by interfaceID

Note
  This method increments reference counter

Implemented in nx_spl::FtpStorageFactory, nx_spl::FtpStorage, nx_spl::FtpFileInfoIterator, nx_spl::FtpIODevice, TestStorage, ImageLibraryPlugin, TestIODevice, AxisCameraPlugin, AxisRelayIOManager, TestStorageFactory, StreamReader, AxisCameraManager, AxisMediaEncoder, MediaEncoder, rpi_cam::StreamReader, rpi_cam::VideoPacket, rpi_cam::CameraManager, ArchiveReader, rpi_cam::MediaEncoder, rpi_cam::DiscoveryManager, AxisCameraDiscoveryManager, CameraManager, TimePeriods, TestFileInfoIterator, ILPEmptyPacket, ILPVideoPacket, MotionDataPicture, and DiscoveryManager.

## ◆ releaseRef()

virtual int nxpl::PluginInterface::releaseRef | ( |  | ) | const
| pure virtual

Decrement reference counter.

When zero, object MUST be removed

Returns
  new reference count

Note
  PluginInterface::releaseRef is not guaranteed to be called from thread that called PluginInterface::addRef

Implemented in nx_spl::FtpStorageFactory, nx_spl::FtpStorage, nx_spl::FtpFileInfoIterator, nx_spl::FtpIODevice, TestStorage, ImageLibraryPlugin, TestIODevice, AxisCameraPlugin, AxisRelayIOManager, StreamReader, TestStorageFactory, AxisCameraManager, AxisMediaEncoder, MediaEncoder, ArchiveReader, AxisCameraDiscoveryManager, CameraManager, TimePeriods, ILPEmptyPacket, ILPVideoPacket, TestFileInfoIterator, MotionDataPicture, and DiscoveryManager.

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

- src/plugins/plugin_api.h