nx_server_plugin_sdk 1.0 Server Plugin SDK

i_integration.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/i_integration.h>
6 #include <nx/sdk/i_string.h>
7 #include <nx/sdk/interface.h>
8 #include <nx/sdk/result.h>
9
10 #include "i_engine.h"
11
12 namespace nx::sdk::analytics {
13
17 class IIntegration: public Interface<IIntegration, nx::sdk::IIntegration0>
18 {
19 public:
20 static auto interfaceId()
21 {
22 return makeIdWithAlternative("nx::sdk::analytics::IIntegration",
23 /* Old name from 6.0. */ "nx::sdk::analytics::IPlugin");
24 }
25
27 protected: virtual void getManifest(Result<const IString*>* outResult) const = 0;
35 public: Result<const IString*> manifest() const
36 {
37 Result<const IString*> result;
38 getManifest(&result);
39 return result;
40 }
41
43 protected: virtual void doCreateEngine(Result<IEngine*>* outResult) = 0;
48 public: Result<IEngine*> createEngine()
49 {
50 Result<IEngine*> result;
51 doCreateEngine(&result);
52 return result;
53 }
54 };
55 using IIntegration0 = IIntegration;
56
57 } // namespace nx::sdk::analytics
nx::sdk::Interface
Definition: interface.h:48
nx::sdk::analytics::IIntegration::getManifest
virtual void getManifest(Result< const IString *> *outResult) const =0
nx::sdk::analytics
Definition: consuming_device_agent.cpp:25
nx::sdk::analytics::IIntegration::manifest
Result< const IString * > manifest() const
Definition: i_integration.h:35
nx::sdk::analytics::IIntegration::doCreateEngine
virtual void doCreateEngine(Result< IEngine *> *outResult)=0
nx::sdk::Result
Definition: result.h:52
nx::sdk::analytics::IIntegration::createEngine
Result< IEngine * > createEngine()
Definition: i_integration.h:48
nx::sdk::IIntegration
Definition: i_integration.h:23
nx::sdk::analytics::IIntegration
Definition: i_integration.h:17
nx::sdk::IRefCountable::makeIdWithAlternative
static std::vector< const InterfaceId * > makeIdWithAlternative(const char(&charArray)[len], const char(&alternativeCharArray)[alternativeLen])
Definition: i_ref_countable.h:87