nx_server_plugin_sdk 1.0 Server Plugin SDK

stub_analytics_plugin_error_reporting_ini.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/kit/ini_config.h>
6
7 namespace nx {
8 namespace vms_server_plugins {
9 namespace analytics {
10 namespace stub {
11 namespace error_reporting {
12
13 struct Ini: public nx::kit::IniConfig
14 {
15 Ini(): IniConfig("stub_analytics_plugin_error_reporting.ini") { reload(); }
16
17 NX_INI_FLAG(false, enableOutput, "");
18
19 NX_INI_FLAG(false, errorOnPushCompressedFrame,
20 "Produce an error on pushCompressedFrame() every 100 frames.");
21
22 //---------------------------------------------------------------------------------------------
23 // Manifests.
24
25 NX_INI_FLAG(false, returnIncorrectIntegrationManifest,
26 "Return incorrect Integration manifest.");
27 NX_INI_FLAG(false, returnIncorrectEngineManifest,
28 "Return incorrect Engine manifest.");
29 NX_INI_FLAG(false, returnIncorrectDeviceAgentManifest,
30 "Return incorrect DeviceAgent manifest.");
31
32 //---------------------------------------------------------------------------------------------
33 // Initialization.
34
35 NX_INI_FLAG(false, returnNullOnEngineCreation,
36 "Return null instead of Engine instance on initialization.");
37 NX_INI_FLAG(false, returnErrorOnEngineCreation,
38 "Return an error instead of Engine instance on initialization.");
39 NX_INI_FLAG(false, returnErrorOnDeviceAgentCreation,
40 "Return an error instead of DeviceAgent instance on initialization.");
41 NX_INI_FLAG(false, returnNullOnDeviceAgentCreation,
42 "Return null pointer instead of DeviceAgent instance on initialization.");
43
44 static constexpr const char* kNoError = "noError";
45 static constexpr const char* kErrorInsteadOfSettingsResponse =
46 "errorInsteadOfSettingsResponse";
47 static constexpr const char* kSettingsResponseWithError = "settingsResponseWithError";
48
49 //---------------------------------------------------------------------------------------------
50 // Engine settings.
51
52 NX_INI_STRING(kNoError, returnErrorFromEngineSetSettings,
53 "Return an Error from Engine on setSettings().\n"
54 "String value \"noError\": No error.\n"
55 "String value \"errorInsteadOfSettingsResponse\": Return an error instead of Settings "
56 "Response from the Engine on setting Settings.\n"
57 "String value \"settingsResponseWithError\": Return Settings Response containing an error "
58 "from the Engine on setting Settings.");
59
60
61 NX_INI_STRING(kNoError, returnErrorFromEngineActiveSettingChange,
62 "Return an Error from Engine on setting Active Settings.\n"
63 "String value \"noError\": No error.\n"
64 "String value \"errorInsteadOfSettingsResponse\": Return an error instead of Settings "
65 "Response from Engine on setting Active Settings.\n"
66 "String value \"settingsResponseWithError\": Return Settings Response containing an error "
67 "from Engine on setting Active Settings.");
68
69
70 NX_INI_STRING(kNoError, returnErrorFromEngineOnGetIntegrationSideSettings,
71 "Return an Error from Engine on setting Integration-side Settings.\n"
72 "String value \"noError\": No error.\n"
73 "String value \"errorInsteadOfSettingsResponse\": Return an error instead of Settings "
74 "Response from Engine's Integration-side Settings.\n"
75 "String value \"settingsResponseWithError\": Return Settings Response containing an error "
76 "from Engine's Integration-side Settings.");
77
78 //---------------------------------------------------------------------------------------------
79 // DeviceAgent settings.
80
81 NX_INI_STRING(kNoError, returnErrorFromDeviceAgentSetSettings,
82 "Return an Error from DeviceAgent on setting Settings.\n"
83 "String value \"noError\": No error.\n"
84 "String value \"errorInsteadOfSettingsResponse\": Return an error instead of Settings "
85 "Response from DeviceAgent on setting Settings.\n"
86 "String value \"settingsResponseWithError\": Return Settings Response containing an error "
87 "from DeviceAgent on setting Settings.");
88
89
90 NX_INI_STRING(kNoError, returnErrorFromDeviceAgentActiveSettingChange,
91 "Return an Error from DeviceAgent on setting Active Settings.\n"
92 "String value \"noError\": No error.\n"
93 "String value \"errorInsteadOfSettingsResponse\": Return an error instead of Settings "
94 "Response from DeviceAgent on setting Active Settings."
95 "String value \"settingsResponseWithError\": Return Settings Response containing an error "
96 "from DeviceAgent on setting Active Settings.");
97
98 NX_INI_STRING(kNoError, returnErrorFromDeviceAgentOnGetIntegrationSideSettings,
99 "Return an Error from DeviceAgent on setting Integration-side Settings.\n"
100 "String value \"noError\": No error.\n"
101 "String value \"errorInsteadOfSettingsResponse\": Return an error instead of Settings "
102 "Response from DeviceAgent's Integration-side Settings.\n"
103 "String value \"settingsResponseWithError\": Return Settings Response containing an error "
104 "from DeviceAgent's Integration-side Settings.");
105 };
106
107 Ini& ini();
108
109 } // namespace error_reporting
110 } // namespace stub
111 } // namespace analytics
112 } // namespace vms_server_plugins
113 } // namespace nx
nx::kit::IniConfig
Definition: ini_config.h:77
nx::vms_server_plugins::analytics::stub::error_reporting::Ini
Definition: stub_analytics_plugin_error_reporting_ini.h:13
ini
static TestIni & ini()
Definition: ini_config_ut.cpp:69
nx
Definition: apple_utils.h:6
nx::kit::IniConfig::IniConfig
IniConfig(const char *iniFile)
Definition: ini_config.cpp:546
nx::kit::IniConfig::reload
void reload()
Definition: ini_config.cpp:594