diff options
Diffstat (limited to 'src/components/smart_objects/include/smart_objects/schema_item.h')
-rw-r--r-- | src/components/smart_objects/include/smart_objects/schema_item.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/components/smart_objects/include/smart_objects/schema_item.h b/src/components/smart_objects/include/smart_objects/schema_item.h index 24c642c0ba..fa5f6d3adc 100644 --- a/src/components/smart_objects/include/smart_objects/schema_item.h +++ b/src/components/smart_objects/include/smart_objects/schema_item.h @@ -58,13 +58,18 @@ class ISchemaItem { * @param Object Object to validate. * @param report__ object for reporting errors during validation * message if an error occurs - * @param MessageVersion to check mobile RPC version against RPC Spec Histor + * @param MessageVersion to check mobile RPC version against RPC Spec History + * @param allow_unknown_enums + * false - unknown enum values (left as string values after applySchema) + * will be considered invalid. + * true - such values will be considered valid. * @return ns_smart_objects::errors::eType **/ virtual errors::eType validate( const SmartObject& Object, rpc::ValidationReport* report__, - const utils::SemanticVersion& MessageVersion = utils::SemanticVersion()); + const utils::SemanticVersion& MessageVersion = utils::SemanticVersion(), + const bool allow_unknown_enums = false); /** * @brief Set default value to an object. @@ -88,21 +93,25 @@ class ISchemaItem { * @brief Apply schema. * * @param Object Object to apply schema. - * @param RemoveFakeParameters contains true if need to remove fake parameters + * @param remove_unknown_parameters contains true if need to remove unknown + *parameters * from smart object otherwise contains false. **/ virtual void applySchema( ns_smart_device_link::ns_smart_objects::SmartObject& Object, - const bool RemoveFakeParameters, + const bool remove_unknown_parameters, const utils::SemanticVersion& MessageVersion = utils::SemanticVersion()); /** * @brief Unapply schema. * * @param Object Object to unapply schema. + * @param remove_unknown_parameters contains true if need to remove unknown + *parameters **/ virtual void unapplySchema( - ns_smart_device_link::ns_smart_objects::SmartObject& Object); + ns_smart_device_link::ns_smart_objects::SmartObject& Object, + const bool remove_unknown_parameters = true); /** * @brief Build smart object by smart schema having copied matched |