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 kParametersModel = 1 + R
"json( 67 "caption": "Parameter" 74 static const std::string kEnginePluginSideSetting =
"testPluginSideSpinBox";
75 static const std::string kEnginePluginSideSettingValue =
"42";
76 static const std::string kEngineSettingsModel = 1 + R
"json(" 83 "caption": "Example Stub Engine settings", 89 "caption": "Text Field", 90 "description": "A text field", 91 "defaultValue": "a text" 94 "type": "PasswordField", 95 "name": "passwordField1", 96 "caption": "Password Field", 97 "description": "A password field", 98 "defaultValue": "1234", 99 "validationErrorMessage": "Password must contain only digits", 100 "validationRegex": "^[0-9]+$", 101 "validationRegexFlags": "i" 105 "name": "testSpinBox", 106 "caption": "Spin Box", 113 "name": ")json" + kEnginePluginSideSetting + R"json(", 114 "caption": "Spin Box (plugin side)", 120 "type": "DoubleSpinBox", 121 "name": "testDoubleSpinBox", 122 "caption": "Double Spin Box", 123 "defaultValue": 3.1415, 129 "name": "testComboBox", 130 "caption": "Combo Box", 131 "defaultValue": "value2", 132 "range": ["value1", "value2", "value3"] 136 "name": "testCheckBox", 137 "caption": "Check Box", 142 "caption": "Styled GroupBox", 147 "caption": "Customer Support", 148 "url": "https://example.com/" 154 "caption": "Nested GroupBox", 159 "text": "Some info text" 164 "text": "Some warning text" 169 "type": "Placeholder", 171 "description": "Description", 178 "caption": ")json" + kActiveSettingsGroupBoxCaption + R"json(", 183 "name": ")json" + kActiveComboBoxId + R"json(", 184 "caption": "Active ComboBox", 185 "defaultValue": "Some value", 190 ")json" + kShowAdditionalComboBoxValue + R"json(" 195 "name": ")json" + kActiveCheckBoxId + R"json(", 196 "caption": "Active CheckBox", 197 "defaultValue": false, 201 "type": "RadioButtonGroup", 202 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 203 "caption": "Active RadioButton Group", 204 "defaultValue": "Some value", 209 ")json" + kShowAdditionalRadioButtonValue + R"json(" 214 "name": ")json" + kActiveMinValueId + R"json(", 215 "caption": "Active Minimum", 223 "name": ")json" + kActiveMaxValueId + R"json(", 224 "caption": "Active Maximum", 232 "caption": "Parameters", 237 "name": ")json" + kShowMessageButtonId + R"json(", 238 "caption": "Show Message...", 240 "parametersModel": )json" + kParametersModel + R"json( 246 "caption": "Webpage", 251 "name": ")json" + kUrlId + R"json(", 253 "defaultValue": "https://example.org/" 257 "name": ")json" + kShowUrlButtonId + R"json(", 258 "caption": "Show Webpage...", 263 "name": ")json" + kUseProxyId + R"json(", 264 "caption": "Use proxy", 265 "defaultValue": false 275 static const std::string kAlternativeSettingsModel =
276 1 + (
const char*) R
"json(" 283 "name": ")json" + kSettingsModelSettings + R"json(", 284 "caption": "Settings model", 285 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 288 ")json" + kRegularSettingsModelOption + R"json(", 289 ")json" + kAlternativeSettingsModelOption + R"json(" 294 "caption": "Alternative GroupBox", 299 "name": "alternativeCheckBox", 300 "caption": "Alternative CheckBox", 305 "name": "alternativeTextField", 306 "caption": "Alternative TextField", 307 "defaultValue": "alternative text" 315 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 322 "name": ")json" + kSettingsModelSettings + R"json(", 323 "caption": "Settings model", 324 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 327 ")json" + kRegularSettingsModelOption + R"json(", 328 ")json" + kAlternativeSettingsModelOption + R"json(" 333 "caption": "Example Stub DeviceAgent settings", 338 "name": "testTextField", 339 "caption": "Device Agent Text Field", 340 "description": "A text field", 341 "defaultValue": "a text" 345 "name": ")json" + kCitySelector + R"json(", 347 "defaultValue": "English", 349 ")json" + kEnglishOption + R"json(", 350 ")json" + kGermanOption + R"json(" 355 static const std::string kEnglishCitiesSettingsModelPart = 1 + R
"json( 357 "type": "RadioButtonGroup", 358 "name": "testEnglishRadioButtonGroup", 359 "caption": "Choose one", 360 "description": "Choose one option", 361 "defaultValue": "London", 370 static const std::string kGermanCitiesSettingsModelPart = 1 + R
"json( 372 "type": "RadioButtonGroup", 373 "name": "testGermanRadioButtonGroup", 374 "caption": "Choose one", 375 "description": "Choose one option", 376 "defaultValue": "Berlin", 386 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 388 "type": "RadioButtonGroup", 389 "name": "testRadioButtonGroup", 390 "caption": "RadioButton Group", 391 "description": "Choose one option", 392 "defaultValue": "Cs_enodatum", 407 "K_gowerianus": "Kepplerites gowerianus", 408 "K_galilaeii": "Kepplerites galilaeii", 409 "S_calloviense": "Sigaloceras calloviense", 410 "S_micans": "Sigaloceras micans", 411 "Cs_enodatum": "Catasigaloceras enodatum", 412 "K_medea": "Kosmoceras medea", 413 "K_jason": "Kosmoceras jason", 414 "K_obductum": "Kosmoceras obductum", 415 "K_posterior": "Kosmoceras posterior" 419 "type": "CheckBoxGroup", 420 "name": "testCheckBoxGroup", 421 "caption": "CheckBox Group", 422 "description": "Choose one or several options", 423 "defaultValue": ["Coleoidea", "Nautiloidea"], 433 "Coleoidea": "Coleoidea (Bather, 1888)", 434 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 435 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 436 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 441 "caption": "Device Agent SpinBox (plugin side)", 442 "name": "pluginSideTestSpinBox", 448 "type": "DoubleSpinBox", 449 "caption": "Device Agent DoubleSpinBox", 450 "name": "testDoubleSpinBox", 451 "defaultValue": 3.1415, 457 "name": "testComboBox", 458 "caption": "Device Agent ComboBox", 459 "defaultValue": "value2", 460 "range": ["value1", "value2", "value3"], 463 "value1": "Device Agent Value #1", 464 "value2": "Device Agent Value #2", 465 "value3": "Device Agent Value #3" 473 "caption": "Device Agent CheckBox", 474 "name": "testCheckBox", 479 "caption": "Disabled Device Agent CheckBox", 480 "name": "disabledTestCheckBox", 481 "defaultValue": false, 486 "caption": "Hidden Device Agent CheckBox", 487 "name": "hiddenTestCheckBox", 488 "defaultValue": false, 493 "caption": "Styled GroupBox", 498 "caption": "Customer Support", 499 "url": "https://example.com/" 505 "caption": "Nested GroupBox", 510 "text": "Some info text" 515 "text": "Some warning text" 520 "type": "Placeholder", 522 "description": "Description", 532 "caption": "Example section", 537 "caption": "Example Stub DeviceAgent settings section", 542 "name": "testTextFieldWithValidation", 543 "caption": "Hexadecimal number text field", 544 "defaultValue": "12ab34cd", 545 "validationRegex": "^[a-f0-9]+$", 546 "validationRegexFlags": "i", 547 "validationErrorMessage": 548 "Text must contain only digits and characters a-f, e.g. 12ab34cd." 551 "type": "PasswordField", 552 "name": "passwordField1", 553 "caption": "Password Field", 554 "description": "A password field", 555 "defaultValue": "1234", 556 "validationErrorMessage": "Password must contain only digits", 557 "validationRegex": "^[0-9]+$", 558 "validationRegexFlags": "i" 562 "caption": "Device Agent SpinBox (plugin side)", 563 "name": "pluginSideTestSpinBox2", 569 "type": "DoubleSpinBox", 570 "caption": "Device Agent DoubleSpinBox", 571 "name": "testDoubleSpinBox2", 572 "defaultValue": 3.1415, 578 "name": "testComboBox2", 579 "caption": "Device Agent ComboBox", 580 "defaultValue": "value2", 581 "range": ["value1", "value2", "value3"] 585 "caption": "Device Agent CheckBox", 586 "name": "testCheckBox2", 596 "caption": "Nested section", 601 "caption": "Example Stub DeviceAgent settings nested section", 605 "type": "SwitchButton", 606 "caption": "Switch Button", 607 "name": "testSwitch", 608 "description": "Tooltip for the switch button", 609 "defaultValue": false 613 "caption": "SpinBox Parameter", 614 "name": "testSpinBox3", 620 "type": "DoubleSpinBox", 621 "caption": "DoubleSpinBox Parameter", 622 "name": "testDoubleSpinBox3", 623 "defaultValue": 3.1415, 629 "name": "testComboBox3", 630 "caption": "ComboBox Parameter", 631 "defaultValue": "value2", 632 "range": ["value1", "value2", "value3"] 636 "caption": "CheckBox Parameter", 637 "name": "testCheckBox3", 648 "caption": ")json" + kActiveSettingsSectionCaption + R"json(", 653 "name": ")json" + kActiveComboBoxId + R"json(", 654 "caption": "Active ComboBox", 655 "defaultValue": "Some value", 660 ")json" + kShowAdditionalComboBoxValue + R"json(" 665 "name": ")json" + kActiveCheckBoxId + R"json(", 666 "caption": "Active CheckBox", 667 "defaultValue": false, 676 "name": "testTextField", 677 "caption": "Text Field Parameter", 678 "description": "A text field", 679 "defaultValue": "a text" 683 "caption": "Parameter Group", 688 "caption": "SpinBox Parameter", 689 "name": "testSpinBox", 695 "type": "DoubleSpinBox", 696 "caption": "DoubleSpinBox Parameter", 697 "name": "testDoubleSpinBox", 698 "defaultValue": 3.1415, 704 "caption": "ComboBox Parameter", 705 "name": "testComboBox", 706 "defaultValue": "value2", 707 "range": ["value1", "value2", "value3"] 711 "caption": "CheckBox Parameter", 712 "name": "testCheckBox", 717 "caption": "TextArea Parameter", 718 "name": "testTextArea" 726 "type": "RadioButtonGroup", 727 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 728 "caption": "Active RadioButton Group", 729 "defaultValue": "Some value", 734 ")json" + kShowAdditionalRadioButtonValue + R"json(" 739 "name": ")json" + kActiveMinValueId + R"json(", 740 "caption": "Active Minimum", 748 "name": ")json" + kActiveMaxValueId + R"json(", 749 "caption": "Active Maximum", 757 "caption": "Parameters", 762 "name": ")json" + kShowMessageButtonId + R"json(", 763 "caption": "Show Message...", 765 "parametersModel": )json" + kParametersModel + R"json( 771 "caption": "Webpage", 776 "name": ")json" + kUrlId + R"json(", 778 "defaultValue": "https://example.org/" 782 "name": ")json" + kShowUrlButtonId + R"json(", 783 "caption": "Show Webpage...", 788 "name": ")json" + kUseProxyId + R"json(", 789 "caption": "Use proxy", 790 "defaultValue": false 794 "name": ")json" + kUseDeviceCredentialsId + R"json(", 795 "caption": "Use device credentials", 796 "defaultValue": false Definition: apple_utils.h:6