8 namespace vms_server_plugins {
13 static const std::string kRegularSettingsModelOption =
"regular";
14 static const std::string kAlternativeSettingsModelOption =
"alternative";
16 static const std::string kSettingsModelSettings =
"settingsModelComboBox";
18 static const std::string kCitySelector =
"languageSelectorSettings";
19 static const std::string kEnglishOption =
"English";
20 static const std::string kGermanOption =
"German";
24 static const std::string kCaption =
"caption";
25 static const std::string kSections =
"sections";
26 static const std::string kName =
"name";
27 static const std::string kRange =
"range";
28 static const std::string kItems =
"items";
29 static const std::string kIsActive =
"isActive";
30 static const std::string kMinValue =
"minValue";
31 static const std::string kMaxValue =
"maxValue";
32 static const std::string kActiveSettingsSectionCaption =
"Active settings section";
33 static const std::string kActiveSettingsGroupBoxCaption =
"Active settings";
35 static const std::string kActiveComboBoxId =
"activeComboBox";
36 static const std::string kAdditionalComboBoxId =
"additionalComboBox";
37 static const std::string kShowAdditionalComboBoxValue =
"Show additional ComboBox";
38 static const std::string kAdditionalComboBoxValue =
"Value 1";
40 static const std::string kActiveCheckBoxId =
"activeCheckBox";
41 static const std::string kAdditionalCheckBoxId =
"additionalCheckBox";
42 static const std::string kShowAdditionalCheckBoxValue =
"true";
43 static const std::string kAdditionalCheckBoxValue =
"false";
45 static const std::string kActiveRadioButtonGroupId =
"activeRadioButtonGroup";
46 static const std::string kShowAdditionalRadioButtonValue =
"Show something";
47 static const std::string kHideAdditionalRadioButtonValue =
"Hide me";
48 static const std::string kDefaultActiveRadioButtonGroupValue =
"Some value";
50 static const std::string kActiveMinValueId =
"activeMinValue";
51 static const std::string kActiveMaxValueId =
"activeMaxValue";
53 static const std::string kShowMessageButtonId =
"showMessageButton";
54 static const std::string kShowUrlButtonId =
"showUrlButton";
55 static const std::string kUrlId =
"url";
56 static const std::string kUseProxyId =
"useProxy";
57 static const std::string kUseDeviceCredentialsId =
"authDevice";
59 static const std::string kActiveCheckBoxForValueSetChangeId =
"activeCheckBoxForValueSetChange";
60 static const std::string kComboBoxForValueSetChangeId =
"comboBoxForValueSetChange";
61 static const std::string kComboBoxForValueSetChangeValuePermanent =
"Permanent";
62 static const std::string kComboBoxForValueSetChangeValueOptional =
"Optional";
64 static const std::string kParametersModel = 1 + R
"json( 72 "caption": "Parameter" 79 static const std::string kEngineIntegrationSideSetting =
"testIntegrationSideSpinBox";
80 static const std::string kEngineIntegrationSideSettingValue =
"42";
81 static const std::string kShowExtraTextField =
"showExtraTextField";
82 static const std::string kPushEngineManifest =
"pushEnginemManifest";
83 static const std::string kExtraTextFieldTemplateVariableName =
"@EXTRA_TEXTFIELD_TEMPLATE_VAR@";
84 static const std::string kExtraCheckBoxTemplateVariableName =
"@EXTRA_CHECKBOX_TEMPLATE_VAR@";
85 const std::string kExtraCheckBoxJson = 1 + R
"json( 88 "name": "extraCheckBox", 89 "caption": "Extra Check Box", 93 const std::string kExtraTextFieldJson = 1 + R
"json( 96 "name": "extraTextField", 97 "caption": "Extra Text Field", 98 "description": "Extra Text Field", 99 "defaultValue": "some text" 102 static const std::string kEngineSettingsModel = 1 + R
"json(" 107 )json" + kExtraTextFieldTemplateVariableName + R"json( 108 )json" + kExtraCheckBoxTemplateVariableName + R"json( 111 "name": ")json" + kShowExtraTextField + R"json(", 112 "caption": "Add extra text field on setSettings()", 113 "defaultValue": "false", 122 "caption": "Example Stub Engine settings", 128 "caption": "Text Field", 129 "description": "A text field", 130 "defaultValue": "a text" 133 "type": "PasswordField", 134 "name": "passwordField1", 135 "caption": "Password Field", 136 "description": "A password field", 137 "defaultValue": "1234", 138 "validationErrorMessage": "Password must contain only digits", 139 "validationRegex": "^[0-9]+$", 140 "validationRegexFlags": "i" 144 "name": "testSpinBox", 145 "caption": "Spin Box", 152 "name": ")json" + kEngineIntegrationSideSetting + R"json(", 153 "caption": "Spin Box (integration-side)", 159 "type": "DoubleSpinBox", 160 "name": "testDoubleSpinBox", 161 "caption": "Double Spin Box", 162 "defaultValue": 3.1415, 168 "name": "testComboBox", 169 "caption": "Combo Box", 170 "defaultValue": "value2", 171 "range": ["value1", "value2", "value3"] 174 "type": "MultiSelectionComboBox", 175 "name": "testMultiSelectionComboBox", 176 "caption": "Multi Selection Combo Box", 177 "defaultValue": ["value1", "value2"], 178 "range": ["value1", "value2", "value3"] 182 "name": "testCheckBox", 183 "caption": "Check Box", 188 "caption": "Styled GroupBox", 193 "caption": "Customer Support", 194 "url": "https://example.com/" 199 "description": "A Label", 206 "caption": "Styled GroupBox", 208 "useSwitchButton": true, 209 "defaultValue": true, 210 "switchButtonBehavior": "disable", 211 "name": "styledGroupBox1", 215 "name": "textFieldInGroupBox1", 216 "caption": "Text Field", 217 "description": "A text field", 218 "defaultValue": "a text" 224 "caption": "Styled GroupBox", 226 "useSwitchButton": true, 227 "defaultValue": true, 228 "switchButtonBehavior": "hide", 229 "name": "styledGroupBox2", 233 "name": "textFieldInGroupBox2", 234 "caption": "Text Field", 235 "description": "A text field", 236 "defaultValue": "a text" 242 "caption": "Nested GroupBox", 247 "text": "Some info text <a href=\"https://example.com/\">example</a>" 252 "text": "Some warning text <a href=\"https://example.com/\">example</a>" 257 "type": "Placeholder", 259 "description": "Description", 266 "caption": "Test updating the Engine manifest", 271 "name": ")json" + kPushEngineManifest + R"json(", 272 "caption": "Set the Device Agent settings model to empty", 273 "defaultValue": false 279 "caption": ")json" + kActiveSettingsGroupBoxCaption + R"json(", 284 "name": ")json" + kActiveComboBoxId + R"json(", 285 "caption": "Active ComboBox", 286 "defaultValue": "Some value", 291 ")json" + kShowAdditionalComboBoxValue + R"json(" 296 "name": ")json" + kActiveCheckBoxId + R"json(", 297 "caption": "Active CheckBox", 298 "defaultValue": false, 302 "type": "RadioButtonGroup", 303 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 304 "caption": "Active RadioButton Group", 305 "defaultValue": "Some value", 310 ")json" + kShowAdditionalRadioButtonValue + R"json(" 315 "name": ")json" + kActiveMinValueId + R"json(", 316 "caption": "Active Minimum", 324 "name": ")json" + kActiveMaxValueId + R"json(", 325 "caption": "Active Maximum", 333 "caption": "Parameters", 338 "name": ")json" + kShowMessageButtonId + R"json(", 339 "caption": "Show Message...", 341 "parametersModel": )json" + kParametersModel + R"json( 347 "caption": "Webpage", 352 "name": ")json" + kUrlId + R"json(", 354 "defaultValue": "https://example.org/" 358 "name": ")json" + kShowUrlButtonId + R"json(", 359 "caption": "Show Webpage...", 364 "name": ")json" + kUseProxyId + R"json(", 365 "caption": "Use proxy", 366 "defaultValue": false 376 static const std::string kAlternativeSettingsModel =
377 1 + (
const char*) R
"json(" 384 "name": ")json" + kSettingsModelSettings + R"json(", 385 "caption": "Settings model", 386 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 389 ")json" + kRegularSettingsModelOption + R"json(", 390 ")json" + kAlternativeSettingsModelOption + R"json(" 395 "caption": "Alternative GroupBox", 400 "name": "alternativeCheckBox", 401 "caption": "Alternative CheckBox", 406 "name": "alternativeTextField", 407 "caption": "Alternative TextField", 408 "defaultValue": "alternative text" 416 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 423 "name": ")json" + kSettingsModelSettings + R"json(", 424 "caption": "Settings model", 425 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 428 ")json" + kRegularSettingsModelOption + R"json(", 429 ")json" + kAlternativeSettingsModelOption + R"json(" 434 "caption": "Example Stub DeviceAgent settings", 439 "name": "testTextField", 440 "caption": "Device Agent Text Field", 441 "description": "A text field", 442 "defaultValue": "a text" 446 "name": ")json" + kCitySelector + R"json(", 448 "defaultValue": "English", 450 ")json" + kEnglishOption + R"json(", 451 ")json" + kGermanOption + R"json(" 456 static const std::string kEnglishCitiesSettingsModelPart = 1 + R
"json( 458 "type": "RadioButtonGroup", 459 "name": "testEnglishRadioButtonGroup", 460 "caption": "Choose one", 461 "description": "Choose one option", 462 "defaultValue": "London", 471 static const std::string kGermanCitiesSettingsModelPart = 1 + R
"json( 473 "type": "RadioButtonGroup", 474 "name": "testGermanRadioButtonGroup", 475 "caption": "Choose one", 476 "description": "Choose one option", 477 "defaultValue": "Berlin", 487 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 489 "type": "RadioButtonGroup", 490 "name": "testRadioButtonGroup", 491 "caption": "RadioButton Group", 492 "description": "Choose one option", 493 "defaultValue": "Cs_enodatum", 508 "K_gowerianus": "Kepplerites gowerianus", 509 "K_galilaeii": "Kepplerites galilaeii", 510 "S_calloviense": "Sigaloceras calloviense", 511 "S_micans": "Sigaloceras micans", 512 "Cs_enodatum": "Catasigaloceras enodatum", 513 "K_medea": "Kosmoceras medea", 514 "K_jason": "Kosmoceras jason", 515 "K_obductum": "Kosmoceras obductum", 516 "K_posterior": "Kosmoceras posterior" 520 "type": "CheckBoxGroup", 521 "name": "testCheckBoxGroup", 522 "caption": "CheckBox Group", 523 "description": "Choose one or several options", 524 "defaultValue": ["Coleoidea", "Nautiloidea"], 534 "Coleoidea": "Coleoidea (Bather, 1888)", 535 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 536 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 537 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 542 "caption": "Device Agent SpinBox (integration-side)", 543 "name": "integrationSideTestSpinBox", 549 "type": "DoubleSpinBox", 550 "caption": "Device Agent DoubleSpinBox", 551 "name": "testDoubleSpinBox", 552 "defaultValue": 3.1415, 558 "name": "testComboBox", 559 "caption": "Device Agent ComboBox", 560 "defaultValue": "value2", 561 "range": ["value1", "value2", "value3"], 564 "value1": "Device Agent Value #1", 565 "value2": "Device Agent Value #2", 566 "value3": "Device Agent Value #3" 570 "type": "MultiSelectionComboBox", 571 "name": "testMultiSelectionComboBox", 572 "caption": "Multi Selection Combo Box", 573 "defaultValue": ["value1", "value2"], 574 "range": ["value1", "value2", "value3"], 577 "value1": "Device Agent Value #1", 578 "value2": "Device Agent Value #2", 579 "value3": "Device Agent Value #3" 587 "caption": "Device Agent CheckBox", 588 "name": "testCheckBox", 593 "caption": "Disabled Device Agent CheckBox", 594 "name": "disabledTestCheckBox", 595 "defaultValue": false, 600 "caption": "Hidden Device Agent CheckBox", 601 "name": "hiddenTestCheckBox", 602 "defaultValue": false, 607 "caption": "Styled GroupBox", 612 "caption": "Customer Support", 613 "url": "https://example.com/" 619 "caption": "Styled GroupBox", 621 "useSwitchButton": true, 622 "defaultValue": true, 623 "switchButtonBehavior": "disable", 624 "name": "styledGroupBox1", 628 "name": "textFieldInGroupBox1", 629 "caption": "Text Field", 630 "description": "A text field", 631 "defaultValue": "a text" 637 "caption": "Styled GroupBox", 639 "useSwitchButton": true, 640 "defaultValue": true, 641 "switchButtonBehavior": "hide", 642 "name": "styledGroupBox2", 646 "name": "textFieldInGroupBox2", 647 "caption": "Text Field", 648 "description": "A text field", 649 "defaultValue": "a text" 655 "caption": "Nested GroupBox", 660 "text": "Some info text <a href=\"https://example.com/\">example</a>" 665 "text": "Some warning text <a href=\"https://example.com/\">example</a>" 670 "type": "Placeholder", 672 "description": "Description", 682 "caption": "Example section", 687 "caption": "Example Stub DeviceAgent settings section", 692 "name": "testTextFieldWithValidation", 693 "caption": "Hexadecimal number text field", 694 "defaultValue": "12ab34cd", 695 "validationRegex": "^[a-f0-9]+$", 696 "validationRegexFlags": "i", 697 "validationErrorMessage": 698 "Text must contain only digits and characters a-f, e.g. 12ab34cd." 701 "type": "PasswordField", 702 "name": "passwordField1", 703 "caption": "Password Field", 704 "description": "A password field", 705 "defaultValue": "1234", 706 "validationErrorMessage": "Password must contain only digits", 707 "validationRegex": "^[0-9]+$", 708 "validationRegexFlags": "i" 712 "caption": "Device Agent SpinBox (integration-side)", 713 "name": "integrationSideTestSpinBox2", 719 "type": "DoubleSpinBox", 720 "caption": "Device Agent DoubleSpinBox", 721 "name": "testDoubleSpinBox2", 722 "defaultValue": 3.1415, 728 "name": "testComboBox2", 729 "caption": "Device Agent ComboBox", 730 "defaultValue": "value2", 731 "range": ["value1", "value2", "value3"] 735 "caption": "Device Agent CheckBox", 736 "name": "testCheckBox2", 746 "caption": "Nested section", 751 "caption": "Example Stub DeviceAgent settings nested section", 755 "type": "SwitchButton", 756 "caption": "Switch Button", 757 "name": "testSwitch", 758 "description": "Tooltip for the switch button", 759 "defaultValue": false 763 "caption": "SpinBox Parameter", 764 "name": "testSpinBox3", 770 "type": "DoubleSpinBox", 771 "caption": "DoubleSpinBox Parameter", 772 "name": "testDoubleSpinBox3", 773 "defaultValue": 3.1415, 779 "name": "testComboBox3", 780 "caption": "ComboBox Parameter", 781 "defaultValue": "value2", 782 "range": ["value1", "value2", "value3"] 786 "caption": "CheckBox Parameter", 787 "name": "testCheckBox3", 798 "caption": ")json" + kActiveSettingsSectionCaption + R"json(", 803 "name": ")json" + kActiveComboBoxId + R"json(", 804 "caption": "Active ComboBox", 805 "defaultValue": "Some value", 810 ")json" + kShowAdditionalComboBoxValue + R"json(" 815 "name": ")json" + kActiveCheckBoxId + R"json(", 816 "caption": "Active CheckBox", 817 "defaultValue": false, 826 "name": "testTextField", 827 "caption": "Text Field Parameter", 828 "description": "A text field", 829 "defaultValue": "a text" 833 "caption": "Parameter Group", 838 "caption": "SpinBox Parameter", 839 "name": "testSpinBox", 845 "type": "DoubleSpinBox", 846 "caption": "DoubleSpinBox Parameter", 847 "name": "testDoubleSpinBox", 848 "defaultValue": 3.1415, 854 "caption": "ComboBox Parameter", 855 "name": "testComboBox", 856 "defaultValue": "value2", 857 "range": ["value1", "value2", "value3"] 861 "caption": "CheckBox Parameter", 862 "name": "testCheckBox", 867 "caption": "TextArea Parameter", 868 "name": "testTextArea" 876 "type": "RadioButtonGroup", 877 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 878 "caption": "Active RadioButton Group", 879 "defaultValue": "Some value", 884 ")json" + kShowAdditionalRadioButtonValue + R"json(" 889 "name": ")json" + kActiveMinValueId + R"json(", 890 "caption": "Active Minimum", 898 "name": ")json" + kActiveMaxValueId + R"json(", 899 "caption": "Active Maximum", 907 "caption": "Parameters", 912 "name": ")json" + kShowMessageButtonId + R"json(", 913 "caption": "Show Message...", 915 "parametersModel": )json" + kParametersModel + R"json( 921 "caption": "Webpage", 926 "name": ")json" + kUrlId + R"json(", 928 "defaultValue": "https://example.org/" 932 "name": ")json" + kShowUrlButtonId + R"json(", 933 "caption": "Show Webpage...", 938 "name": ")json" + kUseProxyId + R"json(", 939 "caption": "Use proxy", 940 "defaultValue": false 944 "name": ")json" + kUseDeviceCredentialsId + R"json(", 945 "caption": "Use device credentials", 946 "defaultValue": false 952 "name": ")json" + kActiveCheckBoxForValueSetChangeId + R"json(", 953 "caption": "Add optional value to combo-box:", 954 "defaultValue": true, 959 "name": ")json" + kComboBoxForValueSetChangeId + R"json(", 961 "defaultValue": ")json" + kComboBoxForValueSetChangeValuePermanent + R"json(", 964 ")json" + kComboBoxForValueSetChangeValuePermanent + R"json(", 965 ")json" + kComboBoxForValueSetChangeValueOptional + R"json(" Definition: apple_utils.h:6