summaryrefslogtreecommitdiff
path: root/src/components/smart_objects/include/smart_objects/string_schema_item.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/smart_objects/include/smart_objects/string_schema_item.h')
-rw-r--r--src/components/smart_objects/include/smart_objects/string_schema_item.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/components/smart_objects/include/smart_objects/string_schema_item.h b/src/components/smart_objects/include/smart_objects/string_schema_item.h
index 6c98dcc3b3..5b37db584d 100644
--- a/src/components/smart_objects/include/smart_objects/string_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/string_schema_item.h
@@ -36,13 +36,11 @@
#include <stddef.h>
#include <string>
-#include "utils/shared_ptr.h"
-
#include "smart_objects/default_shema_item.h"
#include "smart_objects/schema_item_parameter.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief String schema item.
**/
@@ -54,28 +52,25 @@ class CStringSchemaItem : public CDefaultSchemaItem<std::string> {
* @param DefaultValue Default value.
* @return Shared pointer to a new schema item.
**/
- static utils::SharedPtr<CStringSchemaItem> create(
+ static std::shared_ptr<CStringSchemaItem> create(
const TSchemaItemParameter<size_t>& MinLength =
TSchemaItemParameter<size_t>(),
const TSchemaItemParameter<size_t>& MaxLength =
TSchemaItemParameter<size_t>(),
const TSchemaItemParameter<std::string>& DefaultValue =
TSchemaItemParameter<std::string>());
- /**
- * @deprecated
- * @brief Validate smart object.
- * @param Object Object to validate.
- * @return NsSmartObjects::Errors::eType
- **/
- Errors::eType validate(const SmartObject& Object) OVERRIDE;
+
/**
* @brief Validate smart object.
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
- * @return NsSmartObjects::Errors::eType
+ * @param MessageVersion to check mobile RPC version against RPC Spec History
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
- rpc::ValidationReport* report__) OVERRIDE;
+ errors::eType validate(const SmartObject& Object,
+ rpc::ValidationReport* report__,
+ const utils::SemanticVersion& MessageVersion =
+ utils::SemanticVersion()) OVERRIDE;
private:
/**
@@ -95,6 +90,6 @@ class CStringSchemaItem : public CDefaultSchemaItem<std::string> {
const TSchemaItemParameter<size_t> mMaxLength;
DISALLOW_COPY_AND_ASSIGN(CStringSchemaItem);
};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_STRING_SCHEMA_ITEM_H_