nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | Protected Member Functions | List of all members
nx::vms_server_plugins::cloud_storage::stub::Engine Class Reference
Inheritance diagram for nx::vms_server_plugins::cloud_storage::stub::Engine:

## Public Member Functions
| Engine (const nx::sdk::cloud_storage::IAsyncOperationHandler *asyncOperationHandler, const std::shared_ptr< DataManager > &dataManager, const std::string &integrationId)
virtual void | startAsyncTasks (const char *lastSequenceId) override
virtual void | stopAsyncTasks () override
virtual nx::sdk::ErrorCode | saveMetadata (const char *deviceId, nx::sdk::cloud_storage::MetadataType type, const char *data) override
virtual bool | isOnline () const override
virtual nx::sdk::ErrorCode | storageSpace (nx::sdk::cloud_storage::StorageSpace *storageSpace) const override
virtual void | flushMetadata (nx::sdk::cloud_storage::MetadataType type) override
Public Member Functions inherited from nx::sdk::RefCountable< nx::sdk::cloud_storage::IEngine >
| RefCountable (const RefCountable &)=delete
| RefCountable (RefCountable &&)=delete
RefCountable & | operator= (const RefCountable &)=delete
RefCountable & | operator= (RefCountable &&)=delete
virtual int | addRef () const override
virtual int | releaseRef () const override
int | refCount () const
Public Member Functions inherited from nx::sdk::cloud_storage::IEngine
virtual Result< IDeviceAgent * > | obtainDeviceAgent (const IDeviceInfo *deviceInfo)
Result< IString * > | queryBookmarks (const char *filter)
Result< IString * > | queryMotionTimePeriods (const char *filter)
Result< IString * > | queryAnalytics (const char *filter)
Result< IString * > | queryAnalyticsTimePeriods (const char *filter)
Result< IString * > | fetchTrackImage (const char *objectTrackId, TrackImageType type) const
Public Member Functions inherited from nx::sdk::Interface< IEngine >
virtual IRefCountable * | queryInterface (const InterfaceId *id)
Ptr< Interface > | queryInterface ()
Ptr< const Interface > | queryInterface () const
Public Member Functions inherited from nx::sdk::IRefCountable
virtual | ~IRefCountable ()=default
template<class Interface >
Ptr< Interface > | queryInterface ()
template<class Interface >
Ptr< const Interface > | queryInterface () const
int | refCountThreadUnsafe () const

## Protected Member Functions
virtual void | doObtainDeviceAgent (nx::sdk::Result< nx::sdk::cloud_storage::IDeviceAgent *> *outResult, const nx::sdk::IDeviceInfo *deviceInfo) override
virtual void | doQueryMotionTimePeriods (const char *filter, nx::sdk::Result< nx::sdk::IString *> *outResult) override
virtual void | doQueryAnalytics (const char *filter, nx::sdk::Result< nx::sdk::IString *> *outResult) override
virtual void | doQueryAnalyticsTimePeriods (const char *filter, nx::sdk::Result< nx::sdk::IString *> *outResult) override
virtual void | doQueryBookmarks (const char *filter, nx::sdk::Result< nx::sdk::IString *> *outResult) override
virtual nx::sdk::ErrorCode | deleteBookmark (const char *bookmarkId) override
virtual void | doFetchTrackImage (const char *objectTrackId, nx::sdk::cloud_storage::TrackImageType type, nx::sdk::Result< nx::sdk::IString *> *outResult) const override
Protected Member Functions inherited from nx::sdk::Interface< IEngine >
virtual IRefCountable * | queryInterface (const IRefCountable::InterfaceId *id) override
IRefCountable * | queryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId)

## Additional Inherited Members
Static Public Member Functions inherited from nx::sdk::cloud_storage::IEngine
static auto | interfaceId ()
Static Public Member Functions inherited from nx::sdk::IRefCountable
static auto | interfaceId ()
Static Protected Member Functions inherited from nx::sdk::IRefCountable
template<int len>
static const InterfaceId * | makeId (const char(&charArray)[len])
template<int len, int alternativeLen>
static std::vector< const InterfaceId * > | makeIdWithAlternative (const char(&charArray)[len], const char(&alternativeCharArray)[alternativeLen])
template<class TemplateInstance , class TemplateArg , int len>
static const InterfaceId * | makeIdForTemplate (const char(&baseIdCharArray)[len])
static std::vector< const InterfaceId * > | alternativeInterfaceIds (const InterfaceId *id)
static std::vector< const InterfaceId * > | alternativeInterfaceIds (std::vector< const InterfaceId *> ids)

## Member Function Documentation

## ◆ flushMetadata()

void nx::vms_server_plugins::cloud_storage::stub::Engine::flushMetadata | ( | nx::sdk::cloud_storage::MetadataType | type | ) |
| overridevirtual

Plugin must send all pending buffered data of the given type immediately when this function is called. If there's nothing to send `onSaveOperationCompleted` should be called with the `noError` result.

Implements nx::sdk::cloud_storage::IEngine.

## ◆ isOnline()

bool nx::vms_server_plugins::cloud_storage::stub::Engine::isOnline | ( |  | ) | const
| overridevirtual

Check if plugin backend is operational. This function will be periodically called by Server.

Implements nx::sdk::cloud_storage::IEngine.

## ◆ saveMetadata()

nx::sdk::ErrorCode nx::vms_server_plugins::cloud_storage::stub::Engine::saveMetadata | ( | const char * | deviceId,
|  | nx::sdk::cloud_storage::MetadataType | type,
|  | const char * | data
| ) |  |
| overridevirtual

Parameters

  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.

Note
  If `saveMetadata` returned `inProgress` VMS Server won't call it again until the onSaveOperationCompleted is called by the plugin.

Implements nx::sdk::cloud_storage::IEngine.

## ◆ startAsyncTasks()

void nx::vms_server_plugins::cloud_storage::stub::Engine::startAsyncTasks | ( | const char * | lastSequenceId | ) |
| overridevirtual

No async handlers should be called by the plugin before this function has been called.

Implements nx::sdk::cloud_storage::IEngine.

## ◆ stopAsyncTasks()

void nx::vms_server_plugins::cloud_storage::stub::Engine::stopAsyncTasks | ( |  | ) |
| overridevirtual

No async handlers should be called by the plugin after this function has been called.

Implements nx::sdk::cloud_storage::IEngine.

## ◆ storageSpace()

nx::sdk::ErrorCode nx::vms_server_plugins::cloud_storage::stub::Engine::storageSpace | ( | nx::sdk::cloud_storage::StorageSpace * | storageSpace | ) | const
| overridevirtual

Get backend storage space information.

Implements nx::sdk::cloud_storage::IEngine.

The documentation for this class was generated from the following files:

- samples/cloud_storage/stub_cloud_storage_plugin/src/nx/vms_server_plugins/cloud_storage/stub/engine.h
- samples/cloud_storage/stub_cloud_storage_plugin/src/nx/vms_server_plugins/cloud_storage/stub/engine.cpp