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 kEnginePluginSideSetting =
"testPluginSideSpinBox";
80 static const std::string kEnginePluginSideSettingValue =
"42";
81 static const std::string kEngineSettingsModel = 1 + R
"json(" 88 "caption": "Example Stub Engine settings", 94 "caption": "Text Field", 95 "description": "A text field", 96 "defaultValue": "a text" 99 "type": "PasswordField", 100 "name": "passwordField1", 101 "caption": "Password Field", 102 "description": "A password field", 103 "defaultValue": "1234", 104 "validationErrorMessage": "Password must contain only digits", 105 "validationRegex": "^[0-9]+$", 106 "validationRegexFlags": "i" 110 "name": "testSpinBox", 111 "caption": "Spin Box", 118 "name": ")json" + kEnginePluginSideSetting + R"json(", 119 "caption": "Spin Box (plugin side)", 125 "type": "DoubleSpinBox", 126 "name": "testDoubleSpinBox", 127 "caption": "Double Spin Box", 128 "defaultValue": 3.1415, 134 "name": "testComboBox", 135 "caption": "Combo Box", 136 "defaultValue": "value2", 137 "range": ["value1", "value2", "value3"] 141 "name": "testCheckBox", 142 "caption": "Check Box", 147 "caption": "Styled GroupBox", 152 "caption": "Customer Support", 153 "url": "https://example.com/" 159 "caption": "Nested GroupBox", 164 "text": "Some info text" 169 "text": "Some warning text" 174 "type": "Placeholder", 176 "description": "Description", 183 "caption": ")json" + kActiveSettingsGroupBoxCaption + R"json(", 188 "name": ")json" + kActiveComboBoxId + R"json(", 189 "caption": "Active ComboBox", 190 "defaultValue": "Some value", 195 ")json" + kShowAdditionalComboBoxValue + R"json(" 200 "name": ")json" + kActiveCheckBoxId + R"json(", 201 "caption": "Active CheckBox", 202 "defaultValue": false, 206 "type": "RadioButtonGroup", 207 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 208 "caption": "Active RadioButton Group", 209 "defaultValue": "Some value", 214 ")json" + kShowAdditionalRadioButtonValue + R"json(" 219 "name": ")json" + kActiveMinValueId + R"json(", 220 "caption": "Active Minimum", 228 "name": ")json" + kActiveMaxValueId + R"json(", 229 "caption": "Active Maximum", 237 "caption": "Parameters", 242 "name": ")json" + kShowMessageButtonId + R"json(", 243 "caption": "Show Message...", 245 "parametersModel": )json" + kParametersModel + R"json( 251 "caption": "Webpage", 256 "name": ")json" + kUrlId + R"json(", 258 "defaultValue": "https://example.org/" 262 "name": ")json" + kShowUrlButtonId + R"json(", 263 "caption": "Show Webpage...", 268 "name": ")json" + kUseProxyId + R"json(", 269 "caption": "Use proxy", 270 "defaultValue": false 280 static const std::string kAlternativeSettingsModel =
281 1 + (
const char*) R
"json(" 288 "name": ")json" + kSettingsModelSettings + R"json(", 289 "caption": "Settings model", 290 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 293 ")json" + kRegularSettingsModelOption + R"json(", 294 ")json" + kAlternativeSettingsModelOption + R"json(" 299 "caption": "Alternative GroupBox", 304 "name": "alternativeCheckBox", 305 "caption": "Alternative CheckBox", 310 "name": "alternativeTextField", 311 "caption": "Alternative TextField", 312 "defaultValue": "alternative text" 320 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 327 "name": ")json" + kSettingsModelSettings + R"json(", 328 "caption": "Settings model", 329 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 332 ")json" + kRegularSettingsModelOption + R"json(", 333 ")json" + kAlternativeSettingsModelOption + R"json(" 338 "caption": "Example Stub DeviceAgent settings", 343 "name": "testTextField", 344 "caption": "Device Agent Text Field", 345 "description": "A text field", 346 "defaultValue": "a text" 350 "name": ")json" + kCitySelector + R"json(", 352 "defaultValue": "English", 354 ")json" + kEnglishOption + R"json(", 355 ")json" + kGermanOption + R"json(" 360 static const std::string kEnglishCitiesSettingsModelPart = 1 + R
"json( 362 "type": "RadioButtonGroup", 363 "name": "testEnglishRadioButtonGroup", 364 "caption": "Choose one", 365 "description": "Choose one option", 366 "defaultValue": "London", 375 static const std::string kGermanCitiesSettingsModelPart = 1 + R
"json( 377 "type": "RadioButtonGroup", 378 "name": "testGermanRadioButtonGroup", 379 "caption": "Choose one", 380 "description": "Choose one option", 381 "defaultValue": "Berlin", 391 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 393 "type": "RadioButtonGroup", 394 "name": "testRadioButtonGroup", 395 "caption": "RadioButton Group", 396 "description": "Choose one option", 397 "defaultValue": "Cs_enodatum", 412 "K_gowerianus": "Kepplerites gowerianus", 413 "K_galilaeii": "Kepplerites galilaeii", 414 "S_calloviense": "Sigaloceras calloviense", 415 "S_micans": "Sigaloceras micans", 416 "Cs_enodatum": "Catasigaloceras enodatum", 417 "K_medea": "Kosmoceras medea", 418 "K_jason": "Kosmoceras jason", 419 "K_obductum": "Kosmoceras obductum", 420 "K_posterior": "Kosmoceras posterior" 424 "type": "CheckBoxGroup", 425 "name": "testCheckBoxGroup", 426 "caption": "CheckBox Group", 427 "description": "Choose one or several options", 428 "defaultValue": ["Coleoidea", "Nautiloidea"], 438 "Coleoidea": "Coleoidea (Bather, 1888)", 439 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 440 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 441 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 446 "caption": "Device Agent SpinBox (plugin side)", 447 "name": "pluginSideTestSpinBox", 453 "type": "DoubleSpinBox", 454 "caption": "Device Agent DoubleSpinBox", 455 "name": "testDoubleSpinBox", 456 "defaultValue": 3.1415, 462 "name": "testComboBox", 463 "caption": "Device Agent ComboBox", 464 "defaultValue": "value2", 465 "range": ["value1", "value2", "value3"], 468 "value1": "Device Agent Value #1", 469 "value2": "Device Agent Value #2", 470 "value3": "Device Agent Value #3" 478 "caption": "Device Agent CheckBox", 479 "name": "testCheckBox", 484 "caption": "Disabled Device Agent CheckBox", 485 "name": "disabledTestCheckBox", 486 "defaultValue": false, 491 "caption": "Hidden Device Agent CheckBox", 492 "name": "hiddenTestCheckBox", 493 "defaultValue": false, 498 "caption": "Styled GroupBox", 503 "caption": "Customer Support", 504 "url": "https://example.com/" 510 "caption": "Nested GroupBox", 515 "text": "Some info text" 520 "text": "Some warning text" 525 "type": "Placeholder", 527 "description": "Description", 537 "caption": "Example section", 542 "caption": "Example Stub DeviceAgent settings section", 547 "name": "testTextFieldWithValidation", 548 "caption": "Hexadecimal number text field", 549 "defaultValue": "12ab34cd", 550 "validationRegex": "^[a-f0-9]+$", 551 "validationRegexFlags": "i", 552 "validationErrorMessage": 553 "Text must contain only digits and characters a-f, e.g. 12ab34cd." 556 "type": "PasswordField", 557 "name": "passwordField1", 558 "caption": "Password Field", 559 "description": "A password field", 560 "defaultValue": "1234", 561 "validationErrorMessage": "Password must contain only digits", 562 "validationRegex": "^[0-9]+$", 563 "validationRegexFlags": "i" 567 "caption": "Device Agent SpinBox (plugin side)", 568 "name": "pluginSideTestSpinBox2", 574 "type": "DoubleSpinBox", 575 "caption": "Device Agent DoubleSpinBox", 576 "name": "testDoubleSpinBox2", 577 "defaultValue": 3.1415, 583 "name": "testComboBox2", 584 "caption": "Device Agent ComboBox", 585 "defaultValue": "value2", 586 "range": ["value1", "value2", "value3"] 590 "caption": "Device Agent CheckBox", 591 "name": "testCheckBox2", 601 "caption": "Nested section", 606 "caption": "Example Stub DeviceAgent settings nested section", 610 "type": "SwitchButton", 611 "caption": "Switch Button", 612 "name": "testSwitch", 613 "description": "Tooltip for the switch button", 614 "defaultValue": false 618 "caption": "SpinBox Parameter", 619 "name": "testSpinBox3", 625 "type": "DoubleSpinBox", 626 "caption": "DoubleSpinBox Parameter", 627 "name": "testDoubleSpinBox3", 628 "defaultValue": 3.1415, 634 "name": "testComboBox3", 635 "caption": "ComboBox Parameter", 636 "defaultValue": "value2", 637 "range": ["value1", "value2", "value3"] 641 "caption": "CheckBox Parameter", 642 "name": "testCheckBox3", 653 "caption": ")json" + kActiveSettingsSectionCaption + R"json(", 658 "name": ")json" + kActiveComboBoxId + R"json(", 659 "caption": "Active ComboBox", 660 "defaultValue": "Some value", 665 ")json" + kShowAdditionalComboBoxValue + R"json(" 670 "name": ")json" + kActiveCheckBoxId + R"json(", 671 "caption": "Active CheckBox", 672 "defaultValue": false, 681 "name": "testTextField", 682 "caption": "Text Field Parameter", 683 "description": "A text field", 684 "defaultValue": "a text" 688 "caption": "Parameter Group", 693 "caption": "SpinBox Parameter", 694 "name": "testSpinBox", 700 "type": "DoubleSpinBox", 701 "caption": "DoubleSpinBox Parameter", 702 "name": "testDoubleSpinBox", 703 "defaultValue": 3.1415, 709 "caption": "ComboBox Parameter", 710 "name": "testComboBox", 711 "defaultValue": "value2", 712 "range": ["value1", "value2", "value3"] 716 "caption": "CheckBox Parameter", 717 "name": "testCheckBox", 722 "caption": "TextArea Parameter", 723 "name": "testTextArea" 731 "type": "RadioButtonGroup", 732 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 733 "caption": "Active RadioButton Group", 734 "defaultValue": "Some value", 739 ")json" + kShowAdditionalRadioButtonValue + R"json(" 744 "name": ")json" + kActiveMinValueId + R"json(", 745 "caption": "Active Minimum", 753 "name": ")json" + kActiveMaxValueId + R"json(", 754 "caption": "Active Maximum", 762 "caption": "Parameters", 767 "name": ")json" + kShowMessageButtonId + R"json(", 768 "caption": "Show Message...", 770 "parametersModel": )json" + kParametersModel + R"json( 776 "caption": "Webpage", 781 "name": ")json" + kUrlId + R"json(", 783 "defaultValue": "https://example.org/" 787 "name": ")json" + kShowUrlButtonId + R"json(", 788 "caption": "Show Webpage...", 793 "name": ")json" + kUseProxyId + R"json(", 794 "caption": "Use proxy", 795 "defaultValue": false 799 "name": ")json" + kUseDeviceCredentialsId + R"json(", 800 "caption": "Use device credentials", 801 "defaultValue": false 807 "name": ")json" + kActiveCheckBoxForValueSetChangeId + R"json(", 808 "caption": "Add optional value to combo-box:", 809 "defaultValue": true, 814 "name": ")json" + kComboBoxForValueSetChangeId + R"json(", 816 "defaultValue": ")json" + kComboBoxForValueSetChangeValuePermanent + R"json(", 819 ")json" + kComboBoxForValueSetChangeValuePermanent + R"json(", 820 ")json" + kComboBoxForValueSetChangeValueOptional + R"json(" Definition: apple_utils.h:6