nx_server_plugin_sdk 1.0 Server Plugin SDK

device_agent.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 <nx/sdk/cloud_storage/helpers/data.h>
6 #include <nx/sdk/cloud_storage/i_device_agent.h>
7 #include <nx/sdk/helpers/ref_countable.h>
8 #include <nx/sdk/result.h>
9
10 namespace nx::vms_server_plugins::cloud_storage::sample {
11
12 class DeviceAgent: public nx::sdk::RefCountable<nx::sdk::cloud_storage::IDeviceAgent>
13 {
14 public:
15 DeviceAgent(
16 const nx::sdk::cloud_storage::DeviceDescription& deviceDescription);
17
18 protected:
19 virtual void getDeviceInfo(nx::sdk::Result<const nx::sdk::IDeviceInfo*>* outResult) const override;
20 virtual void doCreateStreamWriter(
21 nxcip::MediaStreamQuality quality,
22 int64_t startTimeMs,
23 const nx::sdk::IList<nx::sdk::cloud_storage::ICodecInfo>* codecList,
24 const char* opaqueMetadata,
25 nx::sdk::Result<nx::sdk::cloud_storage::IStreamWriter*>* outResult) override;
26
27 virtual void doCreateStreamReader(
28 const char* bucketUrl,
29 nxcip::MediaStreamQuality quality,
30 int64_t startTimeMs,
31 int64_t durationMs,
32 nx::sdk::Result<nx::sdk::cloud_storage::IStreamReader*>* outResult) override;
33 };
34
35 } // namespace nx::vms_server_plugins::cloud_storage::sample
nx::vms_server_plugins::cloud_storage::sample::DeviceAgent::getDeviceInfo
virtual void getDeviceInfo(nx::sdk::Result< const nx::sdk::IDeviceInfo *> *outResult) const override
Definition: device_agent.cpp:20
nx::sdk::Result
Definition: result.h:52
nx::sdk::cloud_storage::DeviceDescription
Definition: data.h:209
nx::vms_server_plugins::cloud_storage::sample
Definition: device_agent.cpp:13
nx::vms_server_plugins::cloud_storage::sample::DeviceAgent
Definition: device_agent.h:12
nxcip::MediaStreamQuality
MediaStreamQuality
Definition: camera_plugin.h:1189
nx::sdk::IList< nx::sdk::cloud_storage::ICodecInfo >
nx::sdk::RefCountable
Definition: ref_countable.h:83