nx_server_plugin_sdk 1.0 Server Plugin SDK

engine.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/i_async_operation_handler.h>
6 #include <nx/sdk/cloud_storage/i_engine.h>
7 #include <nx/sdk/helpers/ref_countable.h>
8 #include <nx/sdk/i_utility_provider.h>
9
10 namespace nx::vms_server_plugins::cloud_storage::sample {
11
12 class Engine: public nx::sdk::RefCountable<nx::sdk::cloud_storage::IEngine>
13 {
14 public:
15 Engine(
16 const nx::sdk::cloud_storage::IAsyncOperationHandler* asyncOperationHandler,
17 const std::string& integrationId);
18
19 virtual void startAsyncTasks(const char* lastSequenceId) override;
20 virtual void stopAsyncTasks() override;
21
22 virtual void doQueryBookmarks(
23 const char* filter,
24 nx::sdk::Result<nx::sdk::IString*>* outResult) override;
25
26 virtual nx::sdk::ErrorCode deleteBookmark(const char* bookmarkId) override;
27 virtual nx::sdk::ErrorCode saveMetadata(
28 const char* deviceId,
29 nx::sdk::cloud_storage::MetadataType type,
30 const char* data) override;
31
32 virtual bool isOnline() const override;
33 virtual nx::sdk::ErrorCode storageSpace(
34 nx::sdk::cloud_storage::StorageSpace* storageSpace) const override;
35
36 protected:
37 virtual void doObtainDeviceAgent(
38 nx::sdk::Result<nx::sdk::cloud_storage::IDeviceAgent*>* outResult,
39 const nx::sdk::IDeviceInfo* deviceInfo) override;
40
41 virtual void doQueryMotionTimePeriods(
42 const char* filter,
43 nx::sdk::Result<nx::sdk::IString*>* outResult) override;
44
45 virtual void doQueryAnalytics(
46 const char* filter,
47 nx::sdk::Result<nx::sdk::IString*>* outResult) override;
48
49 virtual void doQueryAnalyticsTimePeriods(
50 const char* filter,
51 nx::sdk::Result<nx::sdk::IString*>* outResult) override;
52
53 virtual void doFetchTrackImage(
54 const char* objectTrackId,
55 nx::sdk::cloud_storage::TrackImageType type,
56 nx::sdk::Result<nx::sdk::IString*>* outResult) const override;
57 };
58
59 } // nx::vms_server_plugins::cloud_storage::sample
nx::vms_server_plugins::cloud_storage::sample::Engine::startAsyncTasks
virtual void startAsyncTasks(const char *lastSequenceId) override
Definition: engine.cpp:17
nx::sdk::cloud_storage::StorageSpace
Definition: i_engine.h:24
nx::sdk::cloud_storage::IAsyncOperationHandler
Definition: i_async_operation_handler.h:69
nx::vms_server_plugins::cloud_storage::sample::Engine::storageSpace
virtual nx::sdk::ErrorCode storageSpace(nx::sdk::cloud_storage::StorageSpace *storageSpace) const override
Definition: engine.cpp:88
nx::vms_server_plugins::cloud_storage::sample::Engine::saveMetadata
virtual nx::sdk::ErrorCode saveMetadata(const char *deviceId, nx::sdk::cloud_storage::MetadataType type, const char *data) override
Definition: engine.cpp:75
nx::sdk::IDeviceInfo
Definition: i_device_info.h:13
nx::vms_server_plugins::cloud_storage::sample::Engine::isOnline
virtual bool isOnline() const override
Definition: engine.cpp:83
nx::sdk::Result
Definition: result.h:52
nx::vms_server_plugins::cloud_storage::sample::Engine::stopAsyncTasks
virtual void stopAsyncTasks() override
Definition: engine.cpp:21
nx::vms_server_plugins::cloud_storage::sample
Definition: device_agent.cpp:13
nx::sdk::RefCountable
Definition: ref_countable.h:83
nx::vms_server_plugins::cloud_storage::sample::Engine
Definition: engine.h:12