stub_analytics_plugin  1.6
Network Optix Video Analytics SDK
plugin_api.h
1 #pragma once
2 
4 
18 namespace nxpl
19 {
21  struct NX_GUID
22  {
24  unsigned char bytes[16];
25  };
26 
27  // {E03B8532-9531-41d6-982A-CA7BF0269780}
28  static const NX_GUID IID_PluginInterface = { { 0xe0, 0x3b, 0x85, 0x32, 0x95, 0x31, 0x41, 0xd6, 0x98, 0x2a, 0xca, 0x7b, 0xf0, 0x26, 0x97, 0x80 } };
29 
31 
39  {
40  public:
41  virtual ~PluginInterface() {}
42 
44 
49  virtual void* queryInterface( const nxpl::NX_GUID& interfaceID ) = 0;
51 
55  virtual unsigned int addRef() = 0;
57 
62  virtual unsigned int releaseRef() = 0;
63  };
64 
65  struct Setting
66  {
70  const char* name;
71 
73  const char* value;
74 
75  Setting(): name(nullptr), value(nullptr) {}
76  Setting(const char* name, const char* value): name(name), value(value) {}
77  };
78 
79  static const NX_GUID IID_Plugin = //< {E53CF93D-61D3-4261-9D25-9B7B3F3A812B}
80  {{0xe5,0x3c,0xf9,0x3d,0x61,0xd3,0x42,0x61,0x9d,0x25,0x9b,0x7b,0x3f,0x3a,0x81,0x2b}};
81 
88  {
89  public:
91  typedef PluginInterface* (*EntryPoint)();
92 
93  virtual ~Plugin() {}
94 
96  virtual const char* name() const = 0;
97 
104  virtual void setSettings(const nxpl::Setting* settings, int count) = 0;
105  };
106 
107  static const NX_GUID IID_Plugin2 = //< {100AFC3E-CA63-47FB-9D5D-0440FC59F866}
108  {{0x10,0x0a,0xfc,0x3e,0xca,0x63,0x47,0xfb,0x9d,0x5d,0x4,0x40,0xfc,0x59,0xf8,0x66}};
109 
110  class Plugin2: public Plugin
111  {
112  public:
117  virtual void setPluginContainer(nxpl::PluginInterface* pluginContainer) = 0;
118  };
119 }
const char * value
Definition: plugin_api.h:73
virtual unsigned int releaseRef()=0
Decrement reference counter.
virtual const char * name() const =0
Definition: plugin_api.h:65
virtual void * queryInterface(const nxpl::NX_GUID &interfaceID)=0
Cast to type, specified by interfaceID.
const char * name
Definition: plugin_api.h:70
virtual void setPluginContainer(nxpl::PluginInterface *pluginContainer)=0
unsigned char bytes[16]
GUID bytes.
Definition: plugin_api.h:24
Base class for every interface, provided by plugin.
Definition: plugin_api.h:38
Definition: plugin_api.h:110
GUID of plugin interface.
Definition: plugin_api.h:21
VMS dynamic plugin API (c++)
Definition: plugin_api.h:18
virtual unsigned int addRef()=0
Increment reference counter.
Definition: plugin_api.h:87
virtual void setSettings(const nxpl::Setting *settings, int count)=0