nx_server_plugin_sdk 1.0 Server Plugin SDK

axis_camera_plugin.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <memory>
6
7 #include <QtCore/QThread>
8 #include <QtNetwork/QNetworkAccessManager>
9
10 #include <plugins/plugin_api.h>
11 #include <plugins/plugin_tools.h>
12
13 class AxisCameraDiscoveryManager;
14
36 class AxisCameraPlugin
37 :
38 public nxpl::PluginInterface
39 {
40 public:
41 AxisCameraPlugin();
42 virtual ~AxisCameraPlugin();
43
45
48 virtual void* queryInterface( const nxpl::NX_GUID& interfaceID ) override;
50 virtual int addRef() const override;
52 virtual int releaseRef() const override;
53
54 nxpt::CommonRefManager* refManager();
55 QNetworkAccessManager* networkAccessManager();
56
57 static AxisCameraPlugin* instance();
58
59 private:
60 nxpt::CommonRefManager m_refManager;
61 std::unique_ptr<AxisCameraDiscoveryManager> m_discoveryManager;
63 QThread m_networkEventLoopThread;
64 QNetworkAccessManager m_networkAccessManager;
65 };
AxisCameraDiscoveryManager
Discovers AXIS cameras with MDNS search method (implements nxcip::CameraDiscoveryManager) ...
Definition: axis_discovery_manager.h:14
nxpl::PluginInterface
Base class for every interface, provided by plugin.
Definition: plugin_api.h:44
nxpl::NX_GUID
GUID of plugin interface.
Definition: plugin_api.h:26
AxisCameraPlugin
Definition: axis_camera_plugin.h:36
nxpt::CommonRefManager
Definition: plugin_tools.h:67
AxisCameraPlugin::addRef
virtual int addRef() const override
Implementation of nxpl::PluginInterface::addRef.
Definition: axis_camera_plugin.cpp:64
plugin_tools.h
AxisCameraPlugin::releaseRef
virtual int releaseRef() const override
Implementation of nxpl::PluginInterface::releaseRef.
Definition: axis_camera_plugin.cpp:69
AxisCameraPlugin::queryInterface
virtual void * queryInterface(const nxpl::NX_GUID &interfaceID) override
Implementation of nxpl::PluginInterface::queryInterface.
Definition: axis_camera_plugin.cpp:48