nx_server_plugin_sdk 1.0 Server Plugin SDK

i_async_operation_handler.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/interface.h>
6
7 #include "i_data_list.h"
8 #include "i_device_agent.h"
9 #include "i_engine.h"
10
11 namespace nx::sdk::cloud_storage {
12
19 class IBucketDescriptionList:
20 public Interface<IBucketDescriptionList>,
21 public IDataList
22 {
23 public:
28 virtual int urlLen() const = 0;
29 virtual bool get(char* url, int* bucketId) const = 0;
30 };
31
35 class IMediaChunkList:
36 public Interface<IMediaChunkList>,
37 public IDataList
38 {
39 public:
40 virtual bool get(int64_t* outStartTimeMs, int64_t* outDurationMs, int* outBucketId) const = 0;
41 };
42
46 class IIndexArchive: public Interface<IIndexArchive>
47 {
48 public:
49 virtual const IMediaChunkList* addedChunks() const = 0;
50 virtual const IMediaChunkList* removedChunks() const = 0;
51 virtual int streamIndex() const = 0;
52 };
53
57 class IDeviceArchive: public Interface<IDeviceArchive>
58 {
59 public:
60 virtual const IList<IIndexArchive>* indexArchive() = 0;
61 virtual IDeviceAgent* deviceAgent() const = 0;
62 };
63
69 class IAsyncOperationHandler: public Interface<IAsyncOperationHandler>
70 {
71 public:
72 static auto interfaceId() { return makeId("nx::sdk::archive::IAsyncOperationHandler"); }
73
81 virtual void onArchiveUpdated(
82 const char* engineId,
83 const char* lastSequenceId,
84 nx::sdk::ErrorCode errorCode,
85 const IList<IDeviceArchive>* deviceArchive) const = 0;
86
87 virtual void onBucketDescriptionUpdated(
88 const char* engineId,
89 const IBucketDescriptionList* bucketDescriptionList) const = 0;
90
91 virtual void onSaveOperationCompleted(
92 const char* engineId,
93 MetadataType metadataType,
94 nx::sdk::ErrorCode errorCode) const = 0;
95 };
96
97 } // namespace nx::sdk::cloud_storage
nx::sdk::cloud_storage::IMediaChunkList
Definition: i_async_operation_handler.h:35
nx::sdk::Interface
Definition: interface.h:48
nx::sdk::cloud_storage::IDeviceArchive
Definition: i_async_operation_handler.h:57
nx::sdk::cloud_storage::IDataList
Definition: i_data_list.h:9
nx::sdk::cloud_storage::IAsyncOperationHandler
Definition: i_async_operation_handler.h:69
nx::sdk::cloud_storage::IBucketDescriptionList
Definition: i_async_operation_handler.h:19
nx::sdk::cloud_storage::IIndexArchive
Definition: i_async_operation_handler.h:46
nx::sdk::cloud_storage::IAsyncOperationHandler::onArchiveUpdated
virtual void onArchiveUpdated(const char *engineId, const char *lastSequenceId, nx::sdk::ErrorCode errorCode, const IList< IDeviceArchive > *deviceArchive) const =0
nx::sdk::cloud_storage::IDeviceAgent
Definition: i_device_agent.h:21
nx::sdk::cloud_storage
Definition: algorithm.cpp:9
nx::sdk::cloud_storage::IBucketDescriptionList::urlLen
virtual int urlLen() const =0
nx::sdk::IList
Definition: i_list.h:10
nx::sdk::IRefCountable::makeId
static const InterfaceId * makeId(const char(&charArray)[len])
Definition: i_ref_countable.h:77