nx_cloud_storage_sdk
1.0
Cloud Storage SDK
|
#include <i_engine.h>
Public Member Functions | |
virtual Result< IDeviceAgent * > | obtainDeviceAgent (const IDeviceInfo *deviceInfo) |
Result< IString * > | queryBookmarks (const char *filter) |
virtual ErrorCode | deleteBookmark (const char *bookmarkId)=0 |
Result< IString * > | queryMotionTimePeriods (const char *filter) |
Result< IString * > | queryAnalytics (const char *filter) |
Result< IString * > | queryAnalyticsTimePeriods (const char *filter) |
virtual ErrorCode | saveMetadata (const char *deviceId, int64_t timestampUs, MetadataType type, const char *data)=0 |
virtual ErrorCode | saveBestShotImage (const char *data)=0 |
Result< IString * > | fetchBestShotImage (const char *objectTrackId) const |
virtual void | startNotifications ()=0 |
virtual void | stopNotifications ()=0 |
virtual bool | isOnline () const =0 |
virtual ErrorCode | storageSpace (StorageSpace *storageSpace) const =0 |
![]() | |
virtual IRefCountable * | queryInterface (const InterfaceId *id) |
Ptr< RefCountable > | queryInterface () |
Ptr< const RefCountable > | queryInterface () const |
![]() | |
virtual | ~IRefCountable ()=default |
template<class RefCountable > | |
Ptr< RefCountable > | queryInterface () |
template<class RefCountable > | |
Ptr< const RefCountable > | queryInterface () const |
virtual int | addRef () const =0 |
virtual int | releaseRef () const =0 |
int | refCountThreadUnsafe () const |
Static Public Member Functions | |
static auto | interfaceId () |
![]() | |
static auto | interfaceId () |
Protected Member Functions | |
virtual void | doObtainDeviceAgent (Result< IDeviceAgent *> *outResult, const IDeviceInfo *deviceInfo)=0 |
virtual void | doQueryBookmarks (const char *filter, Result< IString *> *outResult)=0 |
virtual void | doQueryMotionTimePeriods (const char *filter, Result< IString *> *outResult)=0 |
virtual void | doQueryAnalytics (const char *filter, Result< IString *> *outResult)=0 |
virtual void | doQueryAnalyticsTimePeriods (const char *filter, Result< IString *> *outResult)=0 |
virtual void | doFetchBestShotImage (const char *objectTrackId, Result< IString *> *outResult) const =0 |
![]() | |
virtual IRefCountable * | queryInterface (const IRefCountable::InterfaceId *id) override |
IRefCountable * | queryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId) |
Additional Inherited Members | |
![]() | |
template<int len> | |
static constexpr const InterfaceId * | makeId (const char(&charArray)[len]) |
template<class TemplateInstance , class TemplateArg , int len> | |
static const InterfaceId * | makeIdForTemplate (const char(&baseIdCharArray)[len]) |
![]() | |
template<typename RefCountable > | |
static constexpr bool | hasAlternativeInterfaceId = HasAlternativeInterfaceId<RefCountable>::value |
Engine is an abstraction of a backend communication entity. It's something that knows how to interact with the particular backend endpoint. Currently, Server won't ask plugin for multiple instances of the Engine. But in future it may be implemented. So that each plugin can handle multiple cloud storages each defined by its url. The instance of this class is used, on one hand, by the Server to add new devices and subscribe to archive change notifications. On the other hand, the plugin may track and process all external changes to the archive and/or devices here and report them to the Server.
|
inline |
Fetch a best shot image associated with the given objectTrackId. Result string should contain the JSON representation of the nx::sdk::cloud_storage::Image struct.
|
pure virtual |
Check if plugin backend is operational. This function will be periodically called by Server.
Implemented in nx::vms_server_plugins::cloud_storage::stub::Engine, and nx::vms_server_plugins::cloud_storage::sample::Engine.
|
inlinevirtual |
Add a new device agent described by deviceInfo. If the device agent already has been created, it should be returned without reinstantiation.
Query object tracks accordingly to the given filter. filter
is the JSON representation of the AnalyticsFilter
. result
should be the JSON representation of the AnalyticsLookupResult
.
|
inline |
Query analytics time periods (extracted from object tracks) accordingly to the given filter. filter
is the JSON representation of the AnalyticsFilter
. result
should be the JSON representation of the TimePeriodList
.
Query bookmarks accordingly to the given filter. filter
is the JSON representation of the BookmarkFilter
. The result should contain a JSON representation of a list of the Bookmark
.
|
inline |
Query motion time periods accordingly to the given filter. filter
is the JSON representation of the MotionFilter
result
should be the JSON representation of the TimePeriodList
.
|
pure virtual |
Add a best shot image to the ObjectTrack
. data
is the JSON representation of the nx::sdk::cloud_storage::Image struct.
Implemented in nx::vms_server_plugins::cloud_storage::stub::Engine, and nx::vms_server_plugins::cloud_storage::sample::Engine.
|
pure virtual |
data | A null-terminated string containing the JSON of the corresponding metadata object. Refer to Bookmark , ObjectTrack and Motion objects in the sdk/cloud_storage/helpers/data.h for details. |
Implemented in nx::vms_server_plugins::cloud_storage::stub::Engine, and nx::vms_server_plugins::cloud_storage::sample::Engine.
|
pure virtual |
No IArchiveUpdateHandler::onArchiveUpdated() should be called by the plugin before this function has been called.
Implemented in nx::vms_server_plugins::cloud_storage::stub::Engine, and nx::vms_server_plugins::cloud_storage::sample::Engine.
|
pure virtual |
No IArchiveUpdateHandler::onArchiveUpdated() should be called by the plugin after this function has been called.
Implemented in nx::vms_server_plugins::cloud_storage::stub::Engine, and nx::vms_server_plugins::cloud_storage::sample::Engine.
|
pure virtual |
Get backend storage space information.
Implemented in nx::vms_server_plugins::cloud_storage::stub::Engine, and nx::vms_server_plugins::cloud_storage::sample::Engine.