stub_analytics_plugin  1.6
Network Optix Video Analytics SDK
device_agent.h
1 #pragma once
2 
3 #include <plugins/plugin_api.h>
4 
5 #include <nx/sdk/common.h>
6 #include <nx/sdk/settings.h>
7 #include <nx/sdk/i_string.h>
8 #include <nx/sdk/i_plugin_event.h>
9 #include <nx/sdk/analytics/metadata_types.h>
10 #include <nx/sdk/analytics/metadata_packet.h>
11 
12 namespace nx {
13 namespace sdk {
14 namespace analytics {
15 
16 // TODO: Consider renaming and moving. Used by MetadataHandler::getParamValue().
17 static const int NX_NO_ERROR = 0;
18 static const int NX_UNKNOWN_PARAMETER = -41;
19 static const int NX_MORE_DATA = -23;
20 
25 static const nxpl::NX_GUID IID_DeviceAgent =
26  {{0x48,0x5a,0x23,0x51,0x55,0x73,0x4f,0xb5,0xa9,0x11,0xe4,0xfb,0x22,0x87,0x79,0x24}};
27 
28 class Engine; //< Forward declaration for the parent object.
29 
37 {
38 public:
39  class IHandler
40  {
41  public:
42  virtual ~IHandler() = default;
43  virtual void handleMetadata(MetadataPacket* metadataPacket) = 0;
44  virtual void handlePluginEvent(IPluginEvent* event) = 0;
45  };
46 
48  virtual Engine* engine() const = 0;
49 
57  virtual void setSettings(const Settings* settings) = 0;
58 
68  virtual Settings* pluginSideSettings() const = 0;
69 
74  virtual const IString* manifest(Error* error) const = 0;
75 
83  virtual Error setHandler(IHandler* handler) = 0;
84 
90  virtual Error setNeededMetadataTypes(const IMetadataTypes* neededMetadataTypes) = 0;
91 };
92 
93 } // namespace analytics
94 } // namespace sdk
95 } // namespace nx
Definition: i_plugin_event.h:19
Definition: device_agent.h:39
Definition: device_agent.h:36
virtual Settings * pluginSideSettings() const =0
Definition: device_agent.cpp:242
Base class for every interface, provided by plugin.
Definition: plugin_api.h:38
virtual Error setHandler(IHandler *handler)=0
GUID of plugin interface.
Definition: plugin_api.h:21
Definition: metadata_types.h:13
Definition: i_string.h:15
Definition: metadata_packet.h:21
Definition: debug.cpp:14
virtual const IString * manifest(Error *error) const =0
virtual Engine * engine() const =0
virtual Error setNeededMetadataTypes(const IMetadataTypes *neededMetadataTypes)=0
Definition: device_agent.cpp:151
Definition: engine.h:37
Definition: settings.h:15
virtual void setSettings(const Settings *settings)=0