summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/include/application_manager/app_extension.h8
-rw-r--r--src/components/application_manager/include/application_manager/application_data_impl.h2
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_request_impl.h4
-rw-r--r--src/components/application_manager/include/application_manager/commands/request_from_hmi.h4
-rw-r--r--src/components/application_manager/include/application_manager/commands/response_to_hmi.h2
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h4
-rw-r--r--src/components/application_manager/include/application_manager/rpc_handler_impl.h5
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h9
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc5
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h4
-rw-r--r--src/components/application_manager/src/application_data_impl.cc2
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc6
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc4
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc4
-rw-r--r--src/components/application_manager/src/commands/notification_from_hmi.cc2
-rw-r--r--src/components/application_manager/src/commands/response_from_hmi.cc2
-rw-r--r--src/components/application_manager/src/hmi_capabilities_impl.cc20
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc43
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_json.cc16
-rw-r--r--src/components/application_manager/src/rpc_handler_impl.cc30
-rw-r--r--src/components/application_manager/src/rpc_service_impl.cc8
-rw-r--r--src/components/application_manager/src/usage_statistics.cc2
-rw-r--r--src/components/application_manager/test/application_manager_impl_test.cc24
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_message_helper.h2
-rw-r--r--src/components/application_manager/test/include/application_manager/resumption_data_test.h3
-rw-r--r--src/components/application_manager/test/mock_message_helper.cc2
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc8
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_json_test.cc4
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_test.cc4
-rw-r--r--src/components/application_manager/test/usage_statistics_test.cc6
-rw-r--r--src/components/application_manager/test/zero_request_amount_test.cc2
-rw-r--r--src/components/formatters/include/formatters/CFormatterJsonBase.h12
-rw-r--r--src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h30
-rw-r--r--src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h44
-rw-r--r--src/components/formatters/include/formatters/CSmartFactory.h47
-rw-r--r--src/components/formatters/include/formatters/formatter_json_rpc.h46
-rw-r--r--src/components/formatters/include/formatters/generic_json_formatter.h16
-rw-r--r--src/components/formatters/include/formatters/meta_formatter.h18
-rw-r--r--src/components/formatters/src/CFormatterJsonBase.cc34
-rw-r--r--src/components/formatters/src/CFormatterJsonSDLRPCv1.cc10
-rw-r--r--src/components/formatters/src/CFormatterJsonSDLRPCv2.cc10
-rw-r--r--src/components/formatters/src/CSmartFactory.cc36
-rw-r--r--src/components/formatters/src/formatter_json_rpc.cc57
-rw-r--r--src/components/formatters/src/generic_json_formatter.cc16
-rw-r--r--src/components/formatters/src/meta_formatter.cc10
-rw-r--r--src/components/formatters/test/CFormatterJsonBase_test.cc4
-rw-r--r--src/components/formatters/test/CSmartFactory_test.cc42
-rw-r--r--src/components/formatters/test/cFormatterJsonSDLRPCv1_test.cc10
-rw-r--r--src/components/formatters/test/cFormatterJsonSDLRPCv2_test.cc12
-rw-r--r--src/components/formatters/test/formatter_json_rpc_test.cc8
-rw-r--r--src/components/formatters/test/generic_json_formatter_test.cc8
-rw-r--r--src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h6
-rw-r--r--src/components/formatters/test/include/formatters/create_smartSchema.h6
-rw-r--r--src/components/formatters/test/include/formatters/meta_formatter_test_helper.h14
-rw-r--r--src/components/formatters/test/src/SmartFactoryTestHelper.cc5
-rw-r--r--src/components/formatters/test/src/create_smartSchema.cc6
-rw-r--r--src/components/formatters/test/src/meta_formatter_test_helper.cc4
-rw-r--r--src/components/include/test/application_manager/mock_app_extension.h8
-rw-r--r--src/components/interfaces/CMakeLists.txt2
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/JSONHandler/Formatters/index.txt6
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt4
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt34
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt6
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt12
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt10
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt8
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/index.txt6
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt6
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt4
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt60
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt4
-rw-r--r--src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt8
-rw-r--r--src/components/policy/policy_regular/doc/doxygen/components/JSONHandler/Formatters/index.txt6
-rw-r--r--src/components/smart_objects/include/smart_objects/always_false_schema_item.h12
-rw-r--r--src/components/smart_objects/include/smart_objects/always_true_schema_item.h12
-rw-r--r--src/components/smart_objects/include/smart_objects/array_schema_item.h12
-rw-r--r--src/components/smart_objects/include/smart_objects/bool_schema_item.h8
-rw-r--r--src/components/smart_objects/include/smart_objects/default_shema_item.h18
-rw-r--r--src/components/smart_objects/include/smart_objects/enum_schema_item.h24
-rw-r--r--src/components/smart_objects/include/smart_objects/errors.h12
-rw-r--r--src/components/smart_objects/include/smart_objects/number_schema_item.h22
-rw-r--r--src/components/smart_objects/include/smart_objects/object_schema_item.h12
-rw-r--r--src/components/smart_objects/include/smart_objects/schema_item.h16
-rw-r--r--src/components/smart_objects/include/smart_objects/schema_item_parameter.h8
-rw-r--r--src/components/smart_objects/include/smart_objects/smart_object.h14
-rw-r--r--src/components/smart_objects/include/smart_objects/smart_schema.h12
-rw-r--r--src/components/smart_objects/include/smart_objects/string_schema_item.h12
-rw-r--r--src/components/smart_objects/src/always_false_schema_item.cc12
-rw-r--r--src/components/smart_objects/src/always_true_schema_item.cc12
-rw-r--r--src/components/smart_objects/src/array_schema_item.cc22
-rw-r--r--src/components/smart_objects/src/bool_schema_item.cc8
-rw-r--r--src/components/smart_objects/src/number_schema_item.cc8
-rw-r--r--src/components/smart_objects/src/object_schema_item.cc20
-rw-r--r--src/components/smart_objects/src/schema_item.cc12
-rw-r--r--src/components/smart_objects/src/smart_object.cc14
-rw-r--r--src/components/smart_objects/src/smart_schema.cc10
-rw-r--r--src/components/smart_objects/src/string_schema_item.cc18
-rw-r--r--src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc20
-rw-r--r--src/components/smart_objects/test/AlwaysTrueSchemaItem_test.cc20
-rw-r--r--src/components/smart_objects/test/ArraySchemaItem_test.cc96
-rw-r--r--src/components/smart_objects/test/BoolSchemaItem_test.cc60
-rw-r--r--src/components/smart_objects/test/CObjectSchemaItem_test.cc78
-rw-r--r--src/components/smart_objects/test/EnumSchemaItem_test.cc36
-rw-r--r--src/components/smart_objects/test/NumberSchemaItem_test.cc222
-rw-r--r--src/components/smart_objects/test/SmartObjectConvertionTime_test.cc55
-rw-r--r--src/components/smart_objects/test/SmartObjectDraft_test.cc8
-rw-r--r--src/components/smart_objects/test/SmartObjectInvalid_test.cc4
-rw-r--r--src/components/smart_objects/test/SmartObjectStress_test.cc14
-rw-r--r--src/components/smart_objects/test/SmartObjectUnit_test.cc2
-rw-r--r--src/components/smart_objects/test/StringSchemaItem_test.cc78
-rw-r--r--src/components/smart_objects/test/smart_object_performance_test.cc2
-rw-r--r--src/components/telemetry_monitor/src/application_manager_metric_wrapper.cc2
-rw-r--r--src/components/telemetry_monitor/test/application_manager_metric_test.cc10
-rwxr-xr-xtools/InterfaceGenerator/generator/generators/SmartFactoryBase.py36
-rwxr-xr-xtools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py30
-rwxr-xr-xtools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py10
-rwxr-xr-xtools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py48
-rwxr-xr-xtools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py10
-rw-r--r--tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc78
-rw-r--r--tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h22
-rw-r--r--tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc58
-rw-r--r--tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h22
135 files changed, 1188 insertions, 1165 deletions
diff --git a/src/components/application_manager/include/application_manager/app_extension.h b/src/components/application_manager/include/application_manager/app_extension.h
index 91bef0753a..e3231de347 100644
--- a/src/components/application_manager/include/application_manager/app_extension.h
+++ b/src/components/application_manager/include/application_manager/app_extension.h
@@ -33,8 +33,8 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APP_EXTENSION_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_APP_EXTENSION_H_
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
class SmartObject;
}
}
@@ -58,14 +58,14 @@ class AppExtension {
* plugin
*/
virtual void SaveResumptionData(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) = 0;
+ ns_smart_device_link::ns_smart_objects::SmartObject& resumption_data) = 0;
/**
* @brief ProcessResumption Method called by SDL during resumption.
* @param resumption_data list of resumption data
*/
virtual void ProcessResumption(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject&
+ const ns_smart_device_link::ns_smart_objects::SmartObject&
resumption_data) = 0;
private:
diff --git a/src/components/application_manager/include/application_manager/application_data_impl.h b/src/components/application_manager/include/application_manager/application_data_impl.h
index 05091dbfbd..8f24f124f9 100644
--- a/src/components/application_manager/include/application_manager/application_data_impl.h
+++ b/src/components/application_manager/include/application_manager/application_data_impl.h
@@ -295,7 +295,7 @@ class DynamicApplicationDataImpl : public virtual Application {
void SetGlobalProperties(
const smart_objects::SmartObject& param,
void (DynamicApplicationData::*callback)(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject&));
+ const ns_smart_device_link::ns_smart_objects::SmartObject&));
DISALLOW_COPY_AND_ASSIGN(DynamicApplicationDataImpl);
};
diff --git a/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
index 6fdeaea332..27aa93d1d8 100644
--- a/src/components/application_manager/include/application_manager/commands/command_request_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
@@ -55,7 +55,7 @@ struct ResponseInfo {
bool is_not_used;
};
-namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
+namespace ns_smart = ns_smart_device_link::ns_smart_objects;
/**
* @brief MergeInfos merge 2 infos in one string
@@ -189,7 +189,7 @@ class CommandRequestImpl : public CommandImpl,
* @param msg_params HMI request msg params
*/
void CreateHMINotification(const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject& msg_params) const;
+ const ns_smart::SmartObject& msg_params) const;
/**
* @brief Converts HMI result code to Mobile result code
diff --git a/src/components/application_manager/include/application_manager/commands/request_from_hmi.h b/src/components/application_manager/include/application_manager/commands/request_from_hmi.h
index 11cd602b8e..927a45c6a6 100644
--- a/src/components/application_manager/include/application_manager/commands/request_from_hmi.h
+++ b/src/components/application_manager/include/application_manager/commands/request_from_hmi.h
@@ -41,7 +41,7 @@ namespace application_manager {
namespace commands {
-namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
+namespace ns_smart = ns_smart_device_link::ns_smart_objects;
class RequestFromHMI : public CommandImpl, public event_engine::EventObserver {
public:
@@ -86,7 +86,7 @@ class RequestFromHMI : public CommandImpl, public event_engine::EventObserver {
* @param function_id the function id for which response will be sent
*/
void FillCommonParametersOfSO(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& message,
+ ns_smart_device_link::ns_smart_objects::SmartObject& message,
const uint32_t correlation_id,
const hmi_apis::FunctionID::eType function_id);
diff --git a/src/components/application_manager/include/application_manager/commands/response_to_hmi.h b/src/components/application_manager/include/application_manager/commands/response_to_hmi.h
index c8f5e90d4e..aa43d2e6d1 100644
--- a/src/components/application_manager/include/application_manager/commands/response_to_hmi.h
+++ b/src/components/application_manager/include/application_manager/commands/response_to_hmi.h
@@ -42,7 +42,7 @@ namespace application_manager {
namespace commands {
-namespace NsSmart = NsSmartDeviceLink::NsSmartObjects;
+namespace ns_smart = ns_smart_device_link::ns_smart_objects;
class ResponseToHMI : public CommandImpl {
public:
diff --git a/src/components/application_manager/include/application_manager/message_helper.h b/src/components/application_manager/include/application_manager/message_helper.h
index e45a3ca3ad..010816808c 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -348,7 +348,7 @@ class MessageHelper {
bool is_unexpected_disconnect,
ApplicationManager& app_mngr);
- static NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr
+ static ns_smart_device_link::ns_smart_objects::SmartObjectSPtr
GetBCActivateAppRequestToHMI(
ApplicationConstSharedPtr app,
const protocol_handler::SessionObserver& session_observer,
@@ -460,7 +460,7 @@ class MessageHelper {
static void SendSystemRequestNotification(
uint32_t connection_key,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& content,
+ ns_smart_device_link::ns_smart_objects::SmartObject& content,
ApplicationManager& app_mngr);
/**
diff --git a/src/components/application_manager/include/application_manager/rpc_handler_impl.h b/src/components/application_manager/include/application_manager/rpc_handler_impl.h
index 8f1d454c3b..cc93e4213c 100644
--- a/src/components/application_manager/include/application_manager/rpc_handler_impl.h
+++ b/src/components/application_manager/include/application_manager/rpc_handler_impl.h
@@ -150,8 +150,9 @@ class RPCHandlerImpl : public RPCHandler,
* @param output - SmartObject Message received from mobile
* @param messageVersion - message version to be updated
*/
- void GetMessageVersion(NsSmartDeviceLink::NsSmartObjects::SmartObject& output,
- utils::SemanticVersion& message_version);
+ void GetMessageVersion(
+ ns_smart_device_link::ns_smart_objects::SmartObject& output,
+ utils::SemanticVersion& message_version);
private:
void ProcessMessageFromMobile(const std::shared_ptr<Message> message);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h
index 14397237c5..e36968fc4b 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h
@@ -80,10 +80,11 @@ class RCAppExtension : public application_manager::AppExtension {
// AppExtension interface
public:
- void SaveResumptionData(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) OVERRIDE;
- void ProcessResumption(const NsSmartDeviceLink::NsSmartObjects::SmartObject&
- resumption_data) OVERRIDE;
+ void SaveResumptionData(ns_smart_device_link::ns_smart_objects::SmartObject&
+ resumption_data) OVERRIDE;
+ void ProcessResumption(
+ const ns_smart_device_link::ns_smart_objects::SmartObject&
+ resumption_data) OVERRIDE;
};
typedef std::shared_ptr<RCAppExtension> RCAppExtensionPtr;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc
index 05e44cfb44..5ce047071c 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/button_press_request.cc
@@ -173,7 +173,7 @@ void ButtonPressRequest::Execute() {
LOG4CXX_AUTO_TRACE(logger_);
const char* button_name;
- NsSmartDeviceLink::NsSmartObjects::
+ ns_smart_device_link::ns_smart_objects::
EnumConversionHelper<mobile_apis::ButtonName::eType>::EnumToCString(
static_cast<mobile_apis::ButtonName::eType>(
(*message_)[app_mngr::strings::msg_params]
@@ -281,7 +281,7 @@ std::string ButtonPressRequest::ModuleType() {
(*message_)[app_mngr::strings::msg_params][message_params::kModuleType]
.asUInt());
const char* str;
- const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ const bool ok = ns_smart_device_link::ns_smart_objects::EnumConversionHelper<
mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
return ok ? str : "unknown";
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
index 6178405808..93e37b95a7 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
@@ -248,7 +248,7 @@ void GetInteriorVehicleDataRequest::on_event(
GetInteriorVehicleDataRequest::~GetInteriorVehicleDataRequest() {}
void GetInteriorVehicleDataRequest::ProccessSubscription(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_response) {
+ const ns_smart_device_link::ns_smart_objects::SmartObject& hmi_response) {
LOG4CXX_AUTO_TRACE(logger_);
const bool is_subscribe_present_in_request =
@@ -267,7 +267,7 @@ void GetInteriorVehicleDataRequest::ProccessSubscription(
application_manager_.application(CommandRequestImpl::connection_key());
const auto extension = RCHelpers::GetRCExtension(*app);
const char* module_type;
- NsSmartDeviceLink::NsSmartObjects::
+ ns_smart_device_link::ns_smart_objects::
EnumConversionHelper<mobile_apis::ModuleType::eType>::EnumToCString(
static_cast<mobile_apis::ModuleType::eType>(
hmi_response[app_mngr::strings::msg_params]
@@ -370,7 +370,7 @@ std::string GetInteriorVehicleDataRequest::ModuleType() {
(*message_)[app_mngr::strings::msg_params][message_params::kModuleType]
.asUInt());
const char* str;
- const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ const bool ok = ns_smart_device_link::ns_smart_objects::EnumConversionHelper<
mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
return ok ? str : "unknown";
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc
index c8d1329c02..37890b7979 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc
@@ -99,7 +99,7 @@ std::string OnInteriorVehicleDataNotification::ModuleType() {
[message_params::kModuleData][message_params::kModuleType]
.asUInt());
const char* str;
- const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ const bool ok = ns_smart_device_link::ns_smart_objects::EnumConversionHelper<
mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
return ok ? str : "unknown";
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
index e6f19a889c..88df9d8382 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
@@ -152,7 +152,7 @@ SetInteriorVehicleDataRequest::~SetInteriorVehicleDataRequest() {}
const std::string LightName(const smart_objects::SmartObject& light_name) {
const char* name;
- const bool ok = NsSmartDeviceLink::NsSmartObjects::
+ const bool ok = ns_smart_device_link::ns_smart_objects::
EnumConversionHelper<mobile_apis::LightName::eType>::EnumToCString(
static_cast<mobile_apis::LightName::eType>(light_name.asUInt()),
&name);
@@ -745,7 +745,7 @@ std::string SetInteriorVehicleDataRequest::ModuleType() {
[message_params::kModuleData][message_params::kModuleType]
.asUInt());
const char* str;
- const bool ok = NsSmartDeviceLink::NsSmartObjects::EnumConversionHelper<
+ const bool ok = ns_smart_device_link::ns_smart_objects::EnumConversionHelper<
mobile_apis::ModuleType::eType>::EnumToCString(module_type, &str);
return ok ? str : "unknown";
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
index 17f19e24e8..5282da8d83 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
@@ -59,10 +59,11 @@ bool RCAppExtension::IsSubscibedToInteriorVehicleData(
}
void RCAppExtension::SaveResumptionData(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) {}
+ ns_smart_device_link::ns_smart_objects::SmartObject& resumption_data) {}
void RCAppExtension::ProcessResumption(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) {}
+ const ns_smart_device_link::ns_smart_objects::SmartObject&
+ resumption_data) {}
std::set<std::string> RCAppExtension::InteriorVehicleDataSubscriptions() const {
return subscribed_interior_vehicle_data_;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
index 022a3e51c9..59d038a790 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
@@ -177,7 +177,7 @@ TEST_F(ButtonPressRequestTest,
Execute_ButtonNameMatchesModuleType_ExpectCorrectMessageSentToHMI) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
@@ -212,7 +212,7 @@ TEST_F(
Execute_ButtonNameDoesNotMatchModuleType_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleType] = mobile_apis::ModuleType::RADIO;
msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
@@ -249,7 +249,7 @@ TEST_F(
TEST_F(ButtonPressRequestTest, OnEvent_ExpectSuccessfullResponseSentToMobile) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
@@ -257,7 +257,7 @@ TEST_F(ButtonPressRequestTest, OnEvent_ExpectSuccessfullResponseSentToMobile) {
mobile_apis::ButtonPressMode::SHORT;
MessageSharedPtr hmi_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& hmi_msg_params =
(*hmi_message)[application_manager::strings::msg_params];
hmi_apis::Common_Result::eType response_code =
hmi_apis::Common_Result::SUCCESS;
@@ -288,7 +288,7 @@ TEST_F(ButtonPressRequestTest,
OnEvent_ReadOnlyParamFromHMI_ExpectFalseSentToMobile) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE;
msg_params[message_params::kButtonName] = mobile_apis::ButtonName::AC;
@@ -296,7 +296,7 @@ TEST_F(ButtonPressRequestTest,
mobile_apis::ButtonPressMode::SHORT;
MessageSharedPtr hmi_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& hmi_msg_params =
(*hmi_message)[application_manager::strings::params];
hmi_apis::Common_Result::eType response_code =
hmi_apis::Common_Result::READ_ONLY;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
index 0b30bbf654..25dad2dc04 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
@@ -281,7 +281,7 @@ TEST_F(
[message_params::kSubscribe] = false;
MessageSharedPtr hmi_response = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& hmi_msg_params =
(*hmi_response)[application_manager::strings::msg_params];
hmi_apis::Common_Result::eType response_code =
hmi_apis::Common_Result::SUCCESS;
@@ -371,7 +371,7 @@ TEST_F(
Execute_CapabilitiesValidationFailed_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleType] = mobile_apis::ModuleType::RADIO;
std::shared_ptr<
@@ -397,7 +397,7 @@ TEST_F(
Execute_PolicyValidationFailed_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleType] = mobile_apis::ModuleType::RADIO;
std::shared_ptr<
@@ -506,7 +506,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
[message_params::kSubscribe] = false;
MessageSharedPtr hmi_response = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& hmi_msg_params =
(*hmi_response)[application_manager::strings::params];
hmi_msg_params[application_manager::hmi_response::code] =
hmi_apis::Common_Result::READ_ONLY;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
index 4144beea2a..47e1c9a389 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
@@ -135,7 +135,7 @@ TEST_F(SetInteriorVehicleDataRequestTest,
Execute_ValidWithoutReadOnlyParams_ExpectResendToHMI) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleData][message_params::kModuleType] =
mobile_apis::ModuleType::CLIMATE;
@@ -167,7 +167,7 @@ TEST_F(
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleData][message_params::kModuleType] =
mobile_apis::ModuleType::RADIO;
@@ -205,7 +205,7 @@ TEST_F(
Execute_MessageValidationFailed_ExpectMessageNotSentToHMI_AndFalseSentToMobile) {
// Arrange
MessageSharedPtr mobile_message = CreateBasicMessage();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& msg_params =
+ ns_smart_device_link::ns_smart_objects::SmartObject& msg_params =
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleData][message_params::kModuleType] =
mobile_apis::ModuleType::RADIO;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
index 12b075af7a..4564858845 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
@@ -221,8 +221,8 @@ class CreateInteractionChoiceSetRequest
* otherwise FALSE
*/
bool compareSynonyms(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2);
+ const ns_smart_device_link::ns_smart_objects::SmartObject& choice1,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& choice2);
/*
* @brief Checks VR synonyms ignoring differences in case.
@@ -234,8 +234,8 @@ class CreateInteractionChoiceSetRequest
* otherwise FALSE
*/
static bool compareStr(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2);
+ const ns_smart_device_link::ns_smart_objects::SmartObject& str1,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& str2);
/**
* @brief Checks choice set params(menuName, tertiaryText, ...)
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
index d50708c4eb..cd1f95b93c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -197,8 +197,8 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
}
bool CreateInteractionChoiceSetRequest::compareSynonyms(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& choice2) {
+ const ns_smart_device_link::ns_smart_objects::SmartObject& choice1,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& choice2) {
// only compare if they both have vr commands
if (!(choice1.keyExists(strings::vr_commands) &&
choice2.keyExists(strings::vr_commands))) {
@@ -227,8 +227,8 @@ bool CreateInteractionChoiceSetRequest::compareSynonyms(
}
bool CreateInteractionChoiceSetRequest::compareStr(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str1,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& str2) {
+ const ns_smart_device_link::ns_smart_objects::SmartObject& str1,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& str2) {
return 0 == strcasecmp(str1.asCharArray(), str2.asCharArray());
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc
index eef2750376..b0715225e4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/generic_response.cc
@@ -41,7 +41,7 @@ using namespace application_manager;
namespace commands {
void GenericResponse::Run() {
- /*NsSmartDeviceLink::NsSmartObjects::SmartObject response;
+ /*ns_smart_device_link::ns_smart_objects::SmartObject response;
response[strings::params][strings::correlation_id] =
(*message_)[strings::params][strings::correlation_id];
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc
index 78de02b527..cea00a9d5e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/system_request.cc
@@ -589,7 +589,7 @@ void SystemRequest::Run() {
SendResponse(true, mobile_apis::Result::SUCCESS);
return;
} else if (mobile_apis::RequestType::QUERY_APPS == request_type) {
- using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
+ using namespace ns_smart_device_link::ns_json_handler::formatters;
smart_objects::SmartObject sm_object;
Json::Reader reader;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc
index e39681498c..2191900750 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/get_urls_test.cc
@@ -90,7 +90,7 @@ class GetUrlsTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
GetUrlsTest() {
command_msg_ =
- CreateMessage(NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
+ CreateMessage(ns_smart_device_link::ns_smart_objects::SmartType_Map);
(*command_msg_)[am::strings::params][am::strings::connection_key] =
kConnectionKey;
(*command_msg_)[am::strings::msg_params][am::hmi_request::service] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
index dfcceea889..7c99b5f2b8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/add_command_request_test.cc
@@ -68,7 +68,7 @@ using ::testing::_;
using ::testing::Return;
using ::testing::InSequence;
using sdl_rpc_plugin::commands::AddCommandRequest;
-using NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr;
+using ns_smart_device_link::ns_smart_objects::SmartObjectSPtr;
using ::test::components::application_manager_test::MockApplication;
using am::event_engine::EventObserver;
using namespace smart_objects;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h
index f7e6ae7887..ead6af841f 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h
@@ -99,8 +99,8 @@ class VehicleInfoAppExtension : public app_mngr::AppExtension {
* @brief SaveResumptionData saves vehicle info data
* @param resumption_data plase to store resumption data
*/
- void SaveResumptionData(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) OVERRIDE;
+ void SaveResumptionData(ns_smart_device_link::ns_smart_objects::SmartObject&
+ resumption_data) OVERRIDE;
/**
* @brief ProcessResumption load resumtion data back to plugin during
diff --git a/src/components/application_manager/src/application_data_impl.cc b/src/components/application_manager/src/application_data_impl.cc
index ea7893ddc5..0636748977 100644
--- a/src/components/application_manager/src/application_data_impl.cc
+++ b/src/components/application_manager/src/application_data_impl.cc
@@ -470,7 +470,7 @@ void DynamicApplicationDataImpl::set_display_layout(const std::string& layout) {
void DynamicApplicationDataImpl::SetGlobalProperties(
const smart_objects::SmartObject& param,
void (DynamicApplicationData::*callback)(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject&)) {
+ const ns_smart_device_link::ns_smart_objects::SmartObject&)) {
smart_objects::SmartType so_type = param.getType();
if (so_type != smart_objects::SmartType::SmartType_Invalid &&
so_type != smart_objects::SmartType::SmartType_Null) {
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index c40b5292ca..3f877895ef 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -133,10 +133,10 @@ bool policy_app_id_comparator(const std::string& policy_app_id,
uint32_t ApplicationManagerImpl::corelation_id_ = 0;
const uint32_t ApplicationManagerImpl::max_corelation_id_ = UINT_MAX;
-namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-namespace jhs = NsSmartDeviceLink::NsJSONHandler::strings;
+namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
+namespace jhs = ns_smart_device_link::ns_json_handler::strings;
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
ApplicationManagerImpl::ApplicationManagerImpl(
const ApplicationManagerSettings& am_settings,
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index dcc521ae57..04fabfb2ec 100644
--- a/src/components/application_manager/src/commands/command_impl.cc
+++ b/src/components/application_manager/src/commands/command_impl.cc
@@ -111,7 +111,7 @@ void CommandImpl::SetAllowedToTerminate(const bool allowed) {
}
bool CommandImpl::ReplaceMobileWithHMIAppId(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& message) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& message) {
LOG4CXX_AUTO_TRACE(logger_);
if (message.keyExists(strings::app_id)) {
ApplicationSharedPtr application =
@@ -156,7 +156,7 @@ bool CommandImpl::ReplaceMobileWithHMIAppId(
}
bool CommandImpl::ReplaceHMIWithMobileAppId(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& message) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& message) {
if (message.keyExists(strings::app_id)) {
ApplicationSharedPtr application =
application_manager_.application_by_hmi_app(
diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc
index 420dbf6156..68e8cfe6b4 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -456,7 +456,7 @@ uint32_t CommandRequestImpl::SendHMIRequest(
void CommandRequestImpl::CreateHMINotification(
const hmi_apis::FunctionID::eType& function_id,
- const NsSmart::SmartObject& msg_params) const {
+ const ns_smart::SmartObject& msg_params) const {
smart_objects::SmartObjectSPtr result =
std::make_shared<smart_objects::SmartObject>();
if (!result) {
@@ -959,7 +959,7 @@ const std::string InfoInterfaceSeparator(
void CommandRequestImpl::AddTimeOutComponentInfoToMessage(
smart_objects::SmartObject& response) const {
- using NsSmartDeviceLink::NsSmartObjects::SmartObject;
+ using ns_smart_device_link::ns_smart_objects::SmartObject;
LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock lock(awaiting_response_interfaces_lock_);
if (awaiting_response_interfaces_.empty()) {
diff --git a/src/components/application_manager/src/commands/notification_from_hmi.cc b/src/components/application_manager/src/commands/notification_from_hmi.cc
index c8765be18a..75e49b180e 100644
--- a/src/components/application_manager/src/commands/notification_from_hmi.cc
+++ b/src/components/application_manager/src/commands/notification_from_hmi.cc
@@ -87,7 +87,7 @@ void NotificationFromHMI::CreateHMIRequest(
const uint32_t hmi_correlation_id_ =
application_manager_.GetNextHMICorrelationID();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
+ ns_smart_device_link::ns_smart_objects::SmartObject& request = *result;
request[strings::params][strings::message_type] =
static_cast<int32_t>(application_manager::MessageType::kRequest);
request[strings::params][strings::function_id] =
diff --git a/src/components/application_manager/src/commands/response_from_hmi.cc b/src/components/application_manager/src/commands/response_from_hmi.cc
index bdf5686159..c88b14bf9c 100644
--- a/src/components/application_manager/src/commands/response_from_hmi.cc
+++ b/src/components/application_manager/src/commands/response_from_hmi.cc
@@ -92,7 +92,7 @@ void ResponseFromHMI::CreateHMIRequest(
const uint32_t hmi_correlation_id_ =
application_manager_.GetNextHMICorrelationID();
- NsSmartDeviceLink::NsSmartObjects::SmartObject& request = *result;
+ ns_smart_device_link::ns_smart_objects::SmartObject& request = *result;
request[strings::params][strings::message_type] = MessageType::kRequest;
request[strings::params][strings::function_id] = function_id;
request[strings::params][strings::correlation_id] = hmi_correlation_id_;
diff --git a/src/components/application_manager/src/hmi_capabilities_impl.cc b/src/components/application_manager/src/hmi_capabilities_impl.cc
index 806feac58a..f67590543d 100644
--- a/src/components/application_manager/src/hmi_capabilities_impl.cc
+++ b/src/components/application_manager/src/hmi_capabilities_impl.cc
@@ -44,7 +44,7 @@
#include "utils/file_system.h"
namespace application_manager {
-namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
+namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
namespace {
std::map<std::string, hmi_apis::Common_VrCapabilities::eType>
@@ -886,7 +886,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
if (check_existing_json_member(ui, "displayCapabilities")) {
smart_objects::SmartObject display_capabilities_so;
Json::Value display_capabilities = ui.get("displayCapabilities", "");
- Formatters::CFormatterJsonBase::jsonValueToObj(display_capabilities,
+ formatters::CFormatterJsonBase::jsonValueToObj(display_capabilities,
display_capabilities_so);
if (display_capabilities_so.keyExists(hmi_response::display_type)) {
@@ -1083,7 +1083,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
Json::Value soft_button_capabilities =
ui.get("softButtonCapabilities", "");
smart_objects::SmartObject soft_button_capabilities_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(
+ formatters::CFormatterJsonBase::jsonValueToObj(
soft_button_capabilities, soft_button_capabilities_so);
set_soft_button_capabilities(soft_button_capabilities_so);
}
@@ -1094,7 +1094,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
Json::Value navigation_capability =
system_capabilities.get("navigationCapability", "");
smart_objects::SmartObject navigation_capability_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(
+ formatters::CFormatterJsonBase::jsonValueToObj(
navigation_capability, navigation_capability_so);
set_navigation_capability(navigation_capability_so);
if (!navigation_capability_so.empty()) {
@@ -1106,7 +1106,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
Json::Value phone_capability =
system_capabilities.get("phoneCapability", "");
smart_objects::SmartObject phone_capability_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(phone_capability,
+ formatters::CFormatterJsonBase::jsonValueToObj(phone_capability,
phone_capability_so);
set_phone_capability(phone_capability_so);
if (!phone_capability_so.empty()) {
@@ -1118,7 +1118,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
Json::Value vs_capability =
system_capabilities.get("videoStreamingCapability", "");
smart_objects::SmartObject vs_capability_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(vs_capability,
+ formatters::CFormatterJsonBase::jsonValueToObj(vs_capability,
vs_capability_so);
if (vs_capability_so.keyExists("supportedFormats")) {
@@ -1168,7 +1168,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
Json::Value rc_capability =
system_capabilities.get("remoteControlCapability", "");
smart_objects::SmartObject rc_capability_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(rc_capability,
+ formatters::CFormatterJsonBase::jsonValueToObj(rc_capability,
rc_capability_so);
set_rc_capability(rc_capability_so);
if (!rc_capability_so.empty()) {
@@ -1247,7 +1247,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
if (check_existing_json_member(buttons, "capabilities")) {
Json::Value bt_capabilities = buttons.get("capabilities", "");
smart_objects::SmartObject buttons_capabilities_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(bt_capabilities,
+ formatters::CFormatterJsonBase::jsonValueToObj(bt_capabilities,
buttons_capabilities_so);
for (uint32_t i = 0; i < buttons_capabilities_so.length(); ++i) {
@@ -1267,7 +1267,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
if (check_existing_json_member(buttons, "presetBankCapabilities")) {
Json::Value presetBank = buttons.get("presetBankCapabilities", "");
smart_objects::SmartObject preset_bank_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(presetBank,
+ formatters::CFormatterJsonBase::jsonValueToObj(presetBank,
preset_bank_so);
set_preset_bank_capabilities(preset_bank_so);
}
@@ -1277,7 +1277,7 @@ bool HMICapabilitiesImpl::load_capabilities_from_file() {
if (check_existing_json_member(root_json, "VehicleInfo")) {
Json::Value vehicle_info = root_json.get("VehicleInfo", "");
smart_objects::SmartObject vehicle_type_so;
- Formatters::CFormatterJsonBase::jsonValueToObj(vehicle_info,
+ formatters::CFormatterJsonBase::jsonValueToObj(vehicle_info,
vehicle_type_so);
set_vehicle_type(vehicle_type_so);
} // VehicleType end
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index 0ad86b5541..5bda17ecbd 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -247,7 +247,7 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateNotification(
return object;
}
-NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr
+ns_smart_device_link::ns_smart_objects::SmartObjectSPtr
MessageHelper::CreateHMINotification(hmi_apis::FunctionID::eType function_id) {
using smart_objects::SmartObject;
using smart_objects::SmartObjectSPtr;
@@ -277,7 +277,7 @@ const uint32_t MessageHelper::GetPriorityCode(const std::string& priority) {
hmi_apis::Common_Language::eType MessageHelper::CommonLanguageFromString(
const std::string& language) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
hmi_apis::Common_Language::eType value;
if (EnumConversionHelper<hmi_apis::Common_Language::eType>::StringToEnum(
language, &value)) {
@@ -298,7 +298,7 @@ std::string MessageHelper::GetDeviceMacAddressForHandle(
std::string MessageHelper::CommonLanguageToString(
hmi_apis::Common_Language::eType language) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
const char* str = 0;
if (EnumConversionHelper<hmi_apis::Common_Language::eType>::EnumToCString(
language, &str)) {
@@ -630,7 +630,7 @@ const VehicleData& MessageHelper::vehicle_data() {
std::string MessageHelper::HMIResultToString(
hmi_apis::Common_Result::eType hmi_result) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
const char* str = 0;
if (EnumConversionHelper<hmi_apis::Common_Result::eType>::EnumToCString(
hmi_result, &str)) {
@@ -641,7 +641,7 @@ std::string MessageHelper::HMIResultToString(
hmi_apis::Common_Result::eType MessageHelper::HMIResultFromString(
const std::string& hmi_result) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
hmi_apis::Common_Result::eType value;
if (EnumConversionHelper<hmi_apis::Common_Result::eType>::StringToEnum(
hmi_result, &value)) {
@@ -652,7 +652,7 @@ hmi_apis::Common_Result::eType MessageHelper::HMIResultFromString(
std::string MessageHelper::MobileResultToString(
mobile_apis::Result::eType mobile_result) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
const char* str = 0;
if (EnumConversionHelper<mobile_apis::Result::eType>::EnumToCString(
mobile_result, &str)) {
@@ -663,7 +663,7 @@ std::string MessageHelper::MobileResultToString(
mobile_apis::Result::eType MessageHelper::MobileResultFromString(
const std::string& mobile_result) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
mobile_apis::Result::eType value;
if (EnumConversionHelper<mobile_apis::Result::eType>::StringToEnum(
mobile_result, &value)) {
@@ -781,7 +781,7 @@ void MessageHelper::SendActivateAppToHMI(
mobile_apis::HMILevel::eType MessageHelper::StringToHMILevel(
const std::string& hmi_level) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
mobile_apis::HMILevel::eType value;
if (EnumConversionHelper<mobile_apis::HMILevel::eType>::StringToEnum(
hmi_level, &value)) {
@@ -792,7 +792,7 @@ mobile_apis::HMILevel::eType MessageHelper::StringToHMILevel(
std::string MessageHelper::StringifiedHMILevel(
const mobile_apis::HMILevel::eType hmi_level) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
const char* str = 0;
if (EnumConversionHelper<mobile_apis::HMILevel::eType>::EnumToCString(
hmi_level, &str)) {
@@ -804,7 +804,7 @@ std::string MessageHelper::StringifiedHMILevel(
std::string MessageHelper::StringifiedFunctionID(
mobile_apis::FunctionID::eType function_id) {
LOG4CXX_AUTO_TRACE(logger_);
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
const char* str = 0;
if (EnumConversionHelper<mobile_apis::FunctionID::eType>::EnumToCString(
function_id, &str)) {
@@ -1517,9 +1517,9 @@ bool MessageHelper::CreateHMIApplicationStruct(
ApplicationConstSharedPtr app,
const protocol_handler::SessionObserver& session_observer,
const policy::PolicyHandlerInterface& policy_handler,
- NsSmartDeviceLink::NsSmartObjects::SmartObject* output,
+ ns_smart_device_link::ns_smart_objects::SmartObject* output,
ApplicationManager& app_mngr) {
- using NsSmartDeviceLink::NsSmartObjects::SmartObject;
+ using ns_smart_device_link::ns_smart_objects::SmartObject;
DCHECK_OR_RETURN(output, false);
SmartObject& message = *output;
@@ -2557,7 +2557,8 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
smart_objects::SmartObject& message,
ApplicationConstSharedPtr app,
ApplicationManager& app_mngr) {
- if (NsSmartDeviceLink::NsSmartObjects::SmartType_Array == message.getType()) {
+ if (ns_smart_device_link::ns_smart_objects::SmartType_Array ==
+ message.getType()) {
for (uint32_t i = 0; i < message.length(); ++i) {
mobile_apis::Result::eType res =
VerifyImageFiles(message[i], app, app_mngr);
@@ -2566,7 +2567,7 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
return res;
}
}
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Map ==
+ } else if (ns_smart_device_link::ns_smart_objects::SmartType_Map ==
message.getType()) {
if (message.keyExists(strings::image_type)) {
mobile_apis::Result::eType verification_result =
@@ -2888,7 +2889,7 @@ bool MessageHelper::PrintSmartObject(const smart_objects::SmartObject& object) {
}
switch (object.getType()) {
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Array: {
+ case ns_smart_device_link::ns_smart_objects::SmartType_Array: {
for (size_t i = 0; i < object.length(); i++) {
++tab;
@@ -2900,7 +2901,7 @@ bool MessageHelper::PrintSmartObject(const smart_objects::SmartObject& object) {
}
break;
}
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Map: {
+ case ns_smart_device_link::ns_smart_objects::SmartType_Map: {
std::set<std::string> keys = object.enumerate();
for (std::set<std::string>::const_iterator key = keys.begin();
@@ -2916,20 +2917,20 @@ bool MessageHelper::PrintSmartObject(const smart_objects::SmartObject& object) {
}
break;
}
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Boolean:
+ case ns_smart_device_link::ns_smart_objects::SmartType_Boolean:
object.asBool() ? printf("true\n") : printf("false\n");
break;
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Double: {
+ case ns_smart_device_link::ns_smart_objects::SmartType_Double: {
printf("%f", object.asDouble());
break;
}
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Integer:
+ case ns_smart_device_link::ns_smart_objects::SmartType_Integer:
printf("%lld", static_cast<long long int>(object.asInt()));
break;
- case NsSmartDeviceLink::NsSmartObjects::SmartType_String:
+ case ns_smart_device_link::ns_smart_objects::SmartType_String:
printf("%s", object.asString().c_str());
break;
- case NsSmartDeviceLink::NsSmartObjects::SmartType_Character:
+ case ns_smart_device_link::ns_smart_objects::SmartType_Character:
printf("%c", object.asChar());
break;
default:
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc
index 87241c883a..c8e9032dfa 100644
--- a/src/components/application_manager/src/resumption/resumption_data_json.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_json.cc
@@ -41,7 +41,7 @@
namespace resumption {
-namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
+namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption")
@@ -81,22 +81,22 @@ void ResumptionDataJson::SaveApplication(
json_app[strings::hmi_level] = static_cast<int32_t>(hmi_level);
json_app[strings::ign_off_count] = 0;
json_app[strings::hash_id] = hash;
- Formatters::CFormatterJsonBase::objToJsonValue(
+ formatters::CFormatterJsonBase::objToJsonValue(
GetApplicationCommands(application), tmp);
json_app[strings::application_commands] = tmp;
- Formatters::CFormatterJsonBase::objToJsonValue(
+ formatters::CFormatterJsonBase::objToJsonValue(
GetApplicationSubMenus(application), tmp);
json_app[strings::application_submenus] = tmp;
- Formatters::CFormatterJsonBase::objToJsonValue(
+ formatters::CFormatterJsonBase::objToJsonValue(
GetApplicationInteractionChoiseSets(application), tmp);
json_app[strings::application_choice_sets] = tmp;
- Formatters::CFormatterJsonBase::objToJsonValue(
+ formatters::CFormatterJsonBase::objToJsonValue(
GetApplicationGlobalProperties(application), tmp);
json_app[strings::application_global_properties] = tmp;
- Formatters::CFormatterJsonBase::objToJsonValue(
+ formatters::CFormatterJsonBase::objToJsonValue(
GetApplicationSubscriptions(application), tmp);
json_app[strings::application_subscriptions] = tmp;
- Formatters::CFormatterJsonBase::objToJsonValue(
+ formatters::CFormatterJsonBase::objToJsonValue(
GetApplicationFiles(application), tmp);
json_app[strings::application_files] = tmp;
json_app[strings::time_stamp] = time_stamp;
@@ -225,7 +225,7 @@ bool ResumptionDataJson::GetSavedApplication(
return false;
}
const Json::Value& json_saved_app = GetSavedApplications()[idx];
- Formatters::CFormatterJsonBase::jsonValueToObj(json_saved_app, saved_app);
+ formatters::CFormatterJsonBase::jsonValueToObj(json_saved_app, saved_app);
return true;
}
diff --git a/src/components/application_manager/src/rpc_handler_impl.cc b/src/components/application_manager/src/rpc_handler_impl.cc
index 54f85c6c0a..0ccdf8b758 100644
--- a/src/components/application_manager/src/rpc_handler_impl.cc
+++ b/src/components/application_manager/src/rpc_handler_impl.cc
@@ -36,8 +36,8 @@ namespace application_manager {
namespace rpc_handler {
CREATE_LOGGERPTR_LOCAL(logger_, "RPCHandlerImpl")
-namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-namespace jhs = NsSmartDeviceLink::NsJSONHandler::strings;
+namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
+namespace jhs = ns_smart_device_link::ns_json_handler::strings;
RPCHandlerImpl::RPCHandlerImpl(ApplicationManager& app_manager)
: app_manager_(app_manager)
@@ -195,15 +195,15 @@ void RPCHandlerImpl::SetTelemetryObserver(AMTelemetryObserver* observer) {
#endif // TELEMETRY_MONITOR
void RPCHandlerImpl::GetMessageVersion(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& output,
+ ns_smart_device_link::ns_smart_objects::SmartObject& output,
utils::SemanticVersion& message_version) {
if (output.keyExists(
- NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS) &&
- output[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS].keyExists(
- strings::sync_msg_version)) {
+ ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS) &&
+ output[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS]
+ .keyExists(strings::sync_msg_version)) {
// SyncMsgVersion exists, check if it is valid.
auto sync_msg_version =
- output[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS]
+ output[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS]
[strings::sync_msg_version];
uint16_t major = 0;
uint16_t minor = 0;
@@ -227,7 +227,7 @@ void RPCHandlerImpl::GetMessageVersion(
bool RPCHandlerImpl::ConvertMessageToSO(
const Message& message,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& output) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& output) {
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_,
"\t\t\tMessage to convert: protocol "
@@ -263,7 +263,7 @@ bool RPCHandlerImpl::ConvertMessageToSO(
if (!conversion_result ||
!mobile_so_factory().attachSchema(output, true, msg_version) ||
((output.validate(&report, msg_version) !=
- smart_objects::Errors::OK))) {
+ smart_objects::errors::OK))) {
LOG4CXX_WARN(logger_,
"Failed to parse string to smart object with API version "
<< msg_version.toString() << " : "
@@ -329,7 +329,7 @@ bool RPCHandlerImpl::ConvertMessageToSO(
rpc::ValidationReport report("RPC");
- if (output.validate(&report) != smart_objects::Errors::OK) {
+ if (output.validate(&report) != smart_objects::errors::OK) {
LOG4CXX_ERROR(logger_,
"Incorrect parameter from HMI"
<< rpc::PrettyFormat(report));
@@ -343,15 +343,15 @@ bool RPCHandlerImpl::ConvertMessageToSO(
break;
}
case protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1: {
- static NsSmartDeviceLinkRPC::V1::v4_protocol_v1_2_no_extra v1_shema;
+ static ns_smart_device_link_rpc::V1::v4_protocol_v1_2_no_extra v1_shema;
if (message.function_id() == 0 || message.type() == kUnknownType) {
LOG4CXX_ERROR(logger_, "Message received: UNSUPPORTED_VERSION");
int32_t conversation_result =
formatters::CFormatterJsonSDLRPCv1::fromString<
- NsSmartDeviceLinkRPC::V1::FunctionID::eType,
- NsSmartDeviceLinkRPC::V1::messageType::eType>(
+ ns_smart_device_link_rpc::V1::FunctionID::eType,
+ ns_smart_device_link_rpc::V1::messageType::eType>(
message.json_message(), output);
if (formatters::CFormatterJsonSDLRPCv1::kSuccess ==
@@ -360,7 +360,7 @@ bool RPCHandlerImpl::ConvertMessageToSO(
smart_objects::SmartType::SmartType_Map);
output[strings::params][strings::message_type] =
- NsSmartDeviceLinkRPC::V1::messageType::response;
+ ns_smart_device_link_rpc::V1::messageType::response;
output[strings::params][strings::connection_key] =
message.connection_key();
@@ -368,7 +368,7 @@ bool RPCHandlerImpl::ConvertMessageToSO(
smart_objects::SmartType::SmartType_Map);
output[strings::msg_params][strings::success] = false;
output[strings::msg_params][strings::result_code] =
- NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION;
+ ns_smart_device_link_rpc::V1::Result::UNSUPPORTED_VERSION;
smart_objects::SmartObjectSPtr msg_to_send =
std::make_shared<smart_objects::SmartObject>(output);
diff --git a/src/components/application_manager/src/rpc_service_impl.cc b/src/components/application_manager/src/rpc_service_impl.cc
index bdd6c8e0c2..217af091b5 100644
--- a/src/components/application_manager/src/rpc_service_impl.cc
+++ b/src/components/application_manager/src/rpc_service_impl.cc
@@ -36,8 +36,8 @@ namespace application_manager {
namespace rpc_service {
CREATE_LOGGERPTR_LOCAL(logger_, "RPCServiceImpl")
-namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-namespace jhs = NsSmartDeviceLink::NsJSONHandler::strings;
+namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
+namespace jhs = ns_smart_device_link::ns_json_handler::strings;
RPCServiceImpl::RPCServiceImpl(
ApplicationManager& app_manager,
@@ -380,7 +380,7 @@ void RPCServiceImpl::SendMessageToMobile(
LOG4CXX_ERROR(logger_, "No application associated with connection key");
if (is_result_code_exists &&
((*message)[strings::msg_params][strings::result_code] ==
- NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION)) {
+ ns_smart_device_link_rpc::V1::Result::UNSUPPORTED_VERSION)) {
(*message)[strings::params][strings::protocol_version] =
protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_1;
} else {
@@ -518,7 +518,7 @@ void RPCServiceImpl::set_hmi_message_handler(
}
bool RPCServiceImpl::ConvertSOtoMessage(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& message,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& message,
Message& output) {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/usage_statistics.cc b/src/components/application_manager/src/usage_statistics.cc
index 1146d60717..1cfccd816e 100644
--- a/src/components/application_manager/src/usage_statistics.cc
+++ b/src/components/application_manager/src/usage_statistics.cc
@@ -37,7 +37,7 @@
#include "utils/macro.h"
using namespace mobile_apis;
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
using namespace usage_statistics;
namespace application_manager {
diff --git a/src/components/application_manager/test/application_manager_impl_test.cc b/src/components/application_manager/test/application_manager_impl_test.cc
index 22ac534215..cf848ba159 100644
--- a/src/components/application_manager/test/application_manager_impl_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_test.cc
@@ -213,7 +213,7 @@ class ApplicationManagerImplTest : public ::testing::Test {
};
TEST_F(ApplicationManagerImplTest, ProcessQueryApp_ExpectSuccess) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject app_data;
const uint32_t connection_key = 65537u;
app_data[am::json::name] = "application_manager_test";
@@ -712,7 +712,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
OnSecondaryTransportStartedCallback_AfterAppRegistration) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
AddMockApplication();
EXPECT_CALL(*mock_app_ptr_, app_id()).WillRepeatedly(Return(app_id_));
@@ -739,7 +739,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
OnSecondaryTransportEndedCallback_AfterAppRegistration) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
const connection_handler::DeviceHandle device_handle = 1;
const int32_t session_key = app_id_;
@@ -1130,7 +1130,7 @@ bool ApplicationManagerImplTest::CheckResumptionRequiredTransportAvailableTest(
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_Success) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
app_types_array[0] = mobile_apis::AppHMIType::eType::DEFAULT;
@@ -1158,7 +1158,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_NotListed) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
app_types_array[0] = mobile_apis::AppHMIType::eType::SOCIAL;
@@ -1183,7 +1183,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_Disabled) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
app_types_array[0] = mobile_apis::AppHMIType::eType::TESTING;
@@ -1208,7 +1208,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_NoAppTypes) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
// we don't specify any app type
@@ -1233,7 +1233,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_PrimaryOnly_NoAppTypes2) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
const connection_handler::DeviceHandle primary_device_handle = 1;
const connection_handler::DeviceHandle secondary_device_handle = 0;
@@ -1255,7 +1255,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_TwoTransports_Success) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
app_types_array[0] = mobile_apis::AppHMIType::eType::MEDIA;
@@ -1283,7 +1283,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_TwoTransports_Failure) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
app_types_array[0] = mobile_apis::AppHMIType::eType::NAVIGATION;
@@ -1311,7 +1311,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_MultipleAppTypes_Failure) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
app_types_array[0] = mobile_apis::AppHMIType::eType::MEDIA;
@@ -1341,7 +1341,7 @@ TEST_F(ApplicationManagerImplTest,
TEST_F(ApplicationManagerImplTest,
CheckResumptionRequiredTransportAvailableTest_MultipleAppTypes_Empty) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
smart_objects::SmartObject app_types_array(SmartType_Array);
app_types_array[0] = mobile_apis::AppHMIType::eType::NAVIGATION;
diff --git a/src/components/application_manager/test/include/application_manager/mock_message_helper.h b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
index 8a06102e99..84a3b6bc87 100644
--- a/src/components/application_manager/test/include/application_manager/mock_message_helper.h
+++ b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
@@ -208,7 +208,7 @@ class MockMessageHelper {
bool send_policy_priority,
ApplicationManager& app_mngr));
MOCK_METHOD2(GetOnAppInterfaceUnregisteredNotificationToMobile,
- NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr(
+ ns_smart_device_link::ns_smart_objects::SmartObjectSPtr(
int32_t connection_key,
mobile_apis::AppInterfaceUnregisteredReason::eType reason));
MOCK_METHOD4(ProcessSoftButtons,
diff --git a/src/components/application_manager/test/include/application_manager/resumption_data_test.h b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
index 4f8c9fd25e..4e614c4d9f 100644
--- a/src/components/application_manager/test/include/application_manager/resumption_data_test.h
+++ b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
@@ -125,7 +125,8 @@ class ResumptionDataTest : public ::testing::Test {
void CheckMenuIcon(sm::SmartObject& res_list);
void CheckHelpPrompt(sm::SmartObject& res_list);
void CheckTimeoutPrompt(sm::SmartObject& res_list);
- void CheckVRHelp(NsSmartDeviceLink::NsSmartObjects::SmartObject& res_list);
+ void CheckVRHelp(
+ ns_smart_device_link::ns_smart_objects::SmartObject& res_list);
void CheckVRTitle(sm::SmartObject& res_list);
void CheckSubscriptions(sm::SmartObject& res_list);
diff --git a/src/components/application_manager/test/mock_message_helper.cc b/src/components/application_manager/test/mock_message_helper.cc
index 0850361a20..f091e183dc 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -376,7 +376,7 @@ smart_objects::SmartObjectSPtr MessageHelper::GetBCActivateAppRequestToHMI(
app_mngr);
}
-NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr
+ns_smart_device_link::ns_smart_objects::SmartObjectSPtr
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
int32_t connection_key,
mobile_apis::AppInterfaceUnregisteredReason::eType reason) {
diff --git a/src/components/application_manager/test/policy_handler_test.cc b/src/components/application_manager/test/policy_handler_test.cc
index 855d318f24..15123385a0 100644
--- a/src/components/application_manager/test/policy_handler_test.cc
+++ b/src/components/application_manager/test/policy_handler_test.cc
@@ -997,8 +997,8 @@ TEST_F(PolicyHandlerTest,
AppPermissions permissions(kPolicyAppId_);
permissions.appUnauthorized = true;
- NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr message =
- std::make_shared<NsSmartDeviceLink::NsSmartObjects::SmartObject>();
+ ns_smart_device_link::ns_smart_objects::SmartObjectSPtr message =
+ std::make_shared<ns_smart_device_link::ns_smart_objects::SmartObject>();
// Check expectations
EXPECT_CALL(mock_message_helper_,
SendOnAppPermissionsChangedNotification(kAppId1_, _, _));
@@ -1050,8 +1050,8 @@ TEST_F(PolicyHandlerTest,
AppPermissions permissions(kPolicyAppId_);
permissions.appUnauthorized = true;
- NsSmartDeviceLink::NsSmartObjects::SmartObjectSPtr message =
- std::make_shared<NsSmartDeviceLink::NsSmartObjects::SmartObject>();
+ ns_smart_device_link::ns_smart_objects::SmartObjectSPtr message =
+ std::make_shared<ns_smart_device_link::ns_smart_objects::SmartObject>();
// Check expectations
// Notification won't be sent
EXPECT_CALL(mock_message_helper_,
diff --git a/src/components/application_manager/test/resumption/resumption_data_json_test.cc b/src/components/application_manager/test/resumption/resumption_data_json_test.cc
index d049d0f541..40e61a3c53 100644
--- a/src/components/application_manager/test/resumption/resumption_data_json_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_json_test.cc
@@ -61,7 +61,7 @@ using namespace file_system;
using namespace resumption;
using namespace mobile_apis;
-namespace Formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
+namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
class ResumptionDataJsonTest : public ResumptionDataTest {
protected:
@@ -92,7 +92,7 @@ class ResumptionDataJsonTest : public ResumptionDataTest {
dictionary[am::strings::resumption][am::strings::resume_app_list];
sm::SmartObject res_app_list;
for (uint32_t i = 0; i < resume_app_list.size(); i++) {
- Formatters::CFormatterJsonBase::jsonValueToObj(resume_app_list[i],
+ formatters::CFormatterJsonBase::jsonValueToObj(resume_app_list[i],
res_app_list);
CheckSavedApp(res_app_list);
}
diff --git a/src/components/application_manager/test/resumption/resumption_data_test.cc b/src/components/application_manager/test/resumption/resumption_data_test.cc
index 5658ab8535..fe24ea39b6 100644
--- a/src/components/application_manager/test/resumption/resumption_data_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_test.cc
@@ -291,7 +291,7 @@ void ResumptionDataTest::CheckHelpPrompt(sm::SmartObject& res_list) {
}
void ResumptionDataTest::CheckTimeoutPrompt(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& res_list) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& res_list) {
for (uint i = 0; i < tts_chunks_count; ++i) {
std::string text = (*timeout_prompt_)[i][am::strings::text].asString();
SpeechCapabilities::eType speech = static_cast<SpeechCapabilities::eType>(
@@ -315,7 +315,7 @@ void ResumptionDataTest::CheckVRHelp(sm::SmartObject& res_list) {
}
void ResumptionDataTest::CheckVRTitle(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& res_list) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& res_list) {
std::string vtitle = (*vr_help_title_)[am::strings::vr_help_title].asString();
EXPECT_EQ(vtitle, res_list[am::strings::vr_help_title].asString());
}
diff --git a/src/components/application_manager/test/usage_statistics_test.cc b/src/components/application_manager/test/usage_statistics_test.cc
index 8d2ed690b6..dfc694f3c5 100644
--- a/src/components/application_manager/test/usage_statistics_test.cc
+++ b/src/components/application_manager/test/usage_statistics_test.cc
@@ -41,9 +41,9 @@ namespace test {
namespace components {
namespace usage_statistics_test {
-using namespace mobile_apis; // For Language enums
-using namespace NsSmartDeviceLink::NsSmartObjects; // For EnumToCString &
- // EnumConversionHelper
+using namespace mobile_apis; // For Language enums
+using namespace ns_smart_device_link::ns_smart_objects; // For EnumToCString &
+ // EnumConversionHelper
using namespace usage_statistics;
using testing::_;
diff --git a/src/components/application_manager/test/zero_request_amount_test.cc b/src/components/application_manager/test/zero_request_amount_test.cc
index cce0b2abf2..640a186e2b 100644
--- a/src/components/application_manager/test/zero_request_amount_test.cc
+++ b/src/components/application_manager/test/zero_request_amount_test.cc
@@ -51,7 +51,7 @@ using namespace ::profile;
using namespace application_manager::request_controller;
using namespace application_manager;
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
commands::Command* RegisterApplication() {
SmartObjectSPtr resultsmart =
diff --git a/src/components/formatters/include/formatters/CFormatterJsonBase.h b/src/components/formatters/include/formatters/CFormatterJsonBase.h
index 1df706839f..66ffa0c1c5 100644
--- a/src/components/formatters/include/formatters/CFormatterJsonBase.h
+++ b/src/components/formatters/include/formatters/CFormatterJsonBase.h
@@ -38,9 +38,9 @@
#include "smart_objects/smart_object.h"
#include "json/json.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
namespace meta_formatter_error_code {
/**
@@ -99,7 +99,7 @@ class CFormatterJsonBase {
*/
static void jsonValueToObj(
const Json::Value& value,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& obj);
+ ns_smart_device_link::ns_smart_objects::SmartObject& obj);
/**
* @brief The method constructs a JSON object from the input SmartObject
@@ -109,11 +109,11 @@ class CFormatterJsonBase {
*input SmartObject.
*/
static void objToJsonValue(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& obj,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& obj,
Json::Value& value);
};
}
}
-} // namespace NsSmartDeviceLink::NsJSONHandler::Formatters
+} // namespace ns_smart_device_link::ns_json_handler::formatters
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONBASE_H_
diff --git a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h
index f22b1216ab..d2fdf87957 100644
--- a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h
+++ b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h
@@ -40,9 +40,9 @@
#include "formatters/CSmartFactory.h"
#include "formatters/meta_formatter.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
/**
* @brief Class is used to convert SmartObjects to JSON string and vice versa.
@@ -69,7 +69,7 @@ class CFormatterJsonSDLRPCv1 : public CFormatterJsonBase {
* @brief Extracts a message type from the SmartObject
*/
static const std::string getMessageType(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& obj);
+ const ns_smart_device_link::ns_smart_objects::SmartObject& obj);
/**
* @brief Extracts a message type from the root JSON object.
@@ -117,7 +117,7 @@ class CFormatterJsonSDLRPCv1 : public CFormatterJsonBase {
static const int32_t kMessageTypeNotFound;
static const int32_t kCorrelationIdNotFound;
- typedef NsSmartDeviceLink::NsJSONHandler::Formatters::
+ typedef ns_smart_device_link::ns_json_handler::formatters::
meta_formatter_error_code::tMetaFormatterErrorCode
tMetaFormatterErrorCode;
@@ -129,7 +129,7 @@ class CFormatterJsonSDLRPCv1 : public CFormatterJsonBase {
* @return true if success, false otherwise
*/
static bool toString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& obj,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& obj,
std::string& outStr);
/**
@@ -142,7 +142,7 @@ class CFormatterJsonSDLRPCv1 : public CFormatterJsonBase {
template <typename FunctionId, typename MessageType>
static int32_t fromString(
const std::string& str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& out);
+ ns_smart_device_link::ns_smart_objects::SmartObject& out);
/**
* @brief Converts to string the smart object against the given schema
@@ -154,17 +154,17 @@ class CFormatterJsonSDLRPCv1 : public CFormatterJsonBase {
* @return formatting error code
*/
static tMetaFormatterErrorCode MetaFormatToString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& object,
+ const ns_smart_device_link::ns_smart_objects::CSmartSchema& schema,
std::string& outStr);
};
// ----------------------------------------------------------------------------
template <typename FunctionId, typename MessageType>
-int32_t Formatters::CFormatterJsonSDLRPCv1::fromString(
+int32_t formatters::CFormatterJsonSDLRPCv1::fromString(
const std::string& str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& out) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& out) {
int32_t result = kSuccess;
try {
@@ -189,7 +189,7 @@ int32_t Formatters::CFormatterJsonSDLRPCv1::fromString(
MessageType messageType = MessageType::INVALID_ENUM;
if (kSuccess == result) {
- if (!NsSmartObjects::EnumConversionHelper<MessageType>::StringToEnum(
+ if (!ns_smart_objects::EnumConversionHelper<MessageType>::StringToEnum(
type, &messageType)) {
// If MessageType is not found than FunctionId and CorrelationId can not
// be found either
@@ -199,14 +199,14 @@ int32_t Formatters::CFormatterJsonSDLRPCv1::fromString(
}
if (kSuccess == result) {
- if (!NsSmartObjects::EnumConversionHelper<FunctionId>::StringToEnum(
+ if (!ns_smart_objects::EnumConversionHelper<FunctionId>::StringToEnum(
root[type][S_NAME].asString(), &functionId)) {
result = kFunctionIdNotFound;
functionId = FunctionId::INVALID_ENUM;
}
}
- namespace S = NsSmartDeviceLink::NsJSONHandler::strings;
+ namespace S = ns_smart_device_link::ns_json_handler::strings;
if (!(result & kMessageTypeNotFound)) {
jsonValueToObj(root[type][S_PARAMETERS], out[S::S_MSG_PARAMS]);
@@ -234,6 +234,6 @@ int32_t Formatters::CFormatterJsonSDLRPCv1::fromString(
}
}
}
-} // namespace NsSmartDeviceLink::NsJSONHandler::Formatters
+} // namespace ns_smart_device_link::ns_json_handler::formatters
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONSDLRPCV1_H_
diff --git a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
index 8260a35959..e248954552 100644
--- a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
+++ b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
@@ -38,9 +38,9 @@
#include "CFormatterJsonBase.h"
#include "formatters/CSmartFactory.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
/**
* @brief Class is used to convert SmartObjects to JSON string and vice versa.
@@ -64,7 +64,7 @@ class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
CFormatterJsonSDLRPCv2(const CFormatterJsonSDLRPCv2&);
public:
- typedef NsSmartDeviceLink::NsJSONHandler::Formatters::
+ typedef ns_smart_device_link::ns_json_handler::formatters::
meta_formatter_error_code::tMetaFormatterErrorCode
tMetaFormatterErrorCode;
@@ -76,7 +76,7 @@ class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
* @return true if success, false otherwise
*/
static bool toString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& obj,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& obj,
std::string& outStr);
/**
@@ -91,10 +91,11 @@ class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
* @return true if success, otherwise - false
*/
template <typename FunctionId, typename MessageType>
- static bool fromString(const std::string& str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& out,
- FunctionId functionId,
- MessageType messageType);
+ static bool fromString(
+ const std::string& str,
+ ns_smart_device_link::ns_smart_objects::SmartObject& out,
+ FunctionId functionId,
+ MessageType messageType);
/**
* @brief Creates a SmartObject from a JSON string.
@@ -113,11 +114,12 @@ class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
* @return true if success, otherwise - false
*/
template <typename FunctionId, typename MessageType>
- static bool fromString(const std::string& str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& out,
- FunctionId functionId,
- MessageType messageType,
- int32_t correlationId);
+ static bool fromString(
+ const std::string& str,
+ ns_smart_device_link::ns_smart_objects::SmartObject& out,
+ FunctionId functionId,
+ MessageType messageType,
+ int32_t correlationId);
/**
* @brief Converts to string the smart object against the given schema
@@ -129,15 +131,15 @@ class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
* @return formatting error code
*/
static tMetaFormatterErrorCode MetaFormatToString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& object,
+ const ns_smart_device_link::ns_smart_objects::CSmartSchema& schema,
std::string& outStr);
};
template <typename FunctionId, typename MessageType>
inline bool CFormatterJsonSDLRPCv2::fromString(
const std::string& str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& out,
+ ns_smart_device_link::ns_smart_objects::SmartObject& out,
FunctionId functionId,
MessageType messageType) {
bool result = true;
@@ -146,7 +148,7 @@ inline bool CFormatterJsonSDLRPCv2::fromString(
Json::Value root;
Json::Reader reader;
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
+ namespace strings = ns_smart_device_link::ns_json_handler::strings;
bool result = reader.parse(str, root);
if (true == result) {
@@ -167,12 +169,12 @@ inline bool CFormatterJsonSDLRPCv2::fromString(
template <typename FunctionId, typename MessageType>
inline bool CFormatterJsonSDLRPCv2::fromString(
const std::string& str,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& out,
+ ns_smart_device_link::ns_smart_objects::SmartObject& out,
FunctionId functionId,
MessageType messageType,
int32_t correlationId) {
bool result = fromString(str, out, functionId, messageType);
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
+ namespace strings = ns_smart_device_link::ns_json_handler::strings;
if (true == result) {
out[strings::S_PARAMS][strings::S_CORRELATION_ID] = correlationId;
@@ -182,6 +184,6 @@ inline bool CFormatterJsonSDLRPCv2::fromString(
}
}
}
-} // namespace NsSmartDeviceLink::NsJSONHandler::Formatters
+} // namespace ns_smart_device_link::ns_json_handler::formatters
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONSDLRPCV2_H_
diff --git a/src/components/formatters/include/formatters/CSmartFactory.h b/src/components/formatters/include/formatters/CSmartFactory.h
index a459f179c0..a48eab2a6b 100644
--- a/src/components/formatters/include/formatters/CSmartFactory.h
+++ b/src/components/formatters/include/formatters/CSmartFactory.h
@@ -40,8 +40,8 @@
#include <map>
#include <string>
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
/**
* @brief String constants used by SmartFactory.
*/
@@ -154,7 +154,7 @@ class CSmartFactory {
* @return True if operation was successful or false otherwise.
*/
bool attachSchema(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
+ ns_smart_device_link::ns_smart_objects::SmartObject& object,
const bool RemoveFakeParameters,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion());
@@ -166,8 +166,9 @@ class CSmartFactory {
*
* @return True if operation was successful of false otherwise.
*/
- bool AttachSchema(const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& object);
+ bool AttachSchema(
+ const StructIdEnum struct_id,
+ ns_smart_device_link::ns_smart_objects::SmartObject& object);
/**
* @brief Create new SmartObject with attached function SmartSchema.
@@ -182,7 +183,7 @@ class CSmartFactory {
* SmartObject) function returns empty SmartObject with
* null type.
*/
- NsSmartDeviceLink::NsSmartObjects::SmartObject CreateSmartObject(
+ ns_smart_device_link::ns_smart_objects::SmartObject CreateSmartObject(
const FunctionIdEnum function_id, const MessageTypeEnum message_type);
/**
@@ -197,7 +198,7 @@ class CSmartFactory {
* SmartObject) function returns empty SmartObject with
* null type.
*/
- NsSmartDeviceLink::NsSmartObjects::SmartObject CreateSmartObject(
+ ns_smart_device_link::ns_smart_objects::SmartObject CreateSmartObject(
const StructIdEnum struct_id);
/**
@@ -216,7 +217,7 @@ class CSmartFactory {
*/
bool GetSchema(const FunctionIdEnum function_id,
const MessageTypeEnum message_type,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema& result);
+ ns_smart_device_link::ns_smart_objects::CSmartSchema& result);
/**
* @brief Get SmartSchema for specific struct.
@@ -233,7 +234,7 @@ class CSmartFactory {
* found or false otherwise.
*/
bool GetSchema(const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema& result);
+ ns_smart_device_link::ns_smart_objects::CSmartSchema& result);
protected:
/**
@@ -243,7 +244,7 @@ class CSmartFactory {
* functions.
*/
typedef std::map<SmartSchemaKey<FunctionIdEnum, MessageTypeEnum>,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema>
+ ns_smart_device_link::ns_smart_objects::CSmartSchema>
FuncionsSchemesMap;
/**
@@ -253,7 +254,7 @@ class CSmartFactory {
* structs.
*/
typedef std::map<StructIdEnum,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema>
+ ns_smart_device_link::ns_smart_objects::CSmartSchema>
StructsSchemesMap;
/**
@@ -274,7 +275,7 @@ CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::CSmartFactory(
template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
+ ns_smart_device_link::ns_smart_objects::SmartObject& object,
const bool RemoveFakeParameters,
const utils::SemanticVersion& MessageVersion) {
if (false == object.keyExists(strings::S_PARAMS))
@@ -312,7 +313,7 @@ bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema(
template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::AttachSchema(
const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& object) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& object) {
typename StructsSchemesMap::iterator structs_iterator =
structs_schemes_.find(struct_id);
@@ -327,7 +328,7 @@ bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::AttachSchema(
}
template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
-NsSmartDeviceLink::NsSmartObjects::SmartObject
+ns_smart_device_link::ns_smart_objects::SmartObject
CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::CreateSmartObject(
const FunctionIdEnum function_id, const MessageTypeEnum message_type) {
SmartSchemaKey<FunctionIdEnum, MessageTypeEnum> key(function_id,
@@ -337,34 +338,34 @@ CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::CreateSmartObject(
functions_schemes_.find(key);
if (schema_iterator != functions_schemes_.end()) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject function_object(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
+ ns_smart_device_link::ns_smart_objects::SmartObject function_object(
+ ns_smart_device_link::ns_smart_objects::SmartType_Map);
function_object.setSchema(schema_iterator->second);
schema_iterator->second.applySchema(function_object, false);
return function_object;
}
- return NsSmartDeviceLink::NsSmartObjects::SmartObject();
+ return ns_smart_device_link::ns_smart_objects::SmartObject();
}
template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
-NsSmartDeviceLink::NsSmartObjects::SmartObject
+ns_smart_device_link::ns_smart_objects::SmartObject
CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::CreateSmartObject(
const StructIdEnum struct_id) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject struct_object(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
+ ns_smart_device_link::ns_smart_objects::SmartObject struct_object(
+ ns_smart_device_link::ns_smart_objects::SmartType_Map);
if (AttachSchema(struct_id, struct_object)) {
return struct_object;
}
- return NsSmartDeviceLink::NsSmartObjects::SmartObject();
+ return ns_smart_device_link::ns_smart_objects::SmartObject();
}
template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::GetSchema(
const FunctionIdEnum function_id,
const MessageTypeEnum message_type,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema& result) {
+ ns_smart_device_link::ns_smart_objects::CSmartSchema& result) {
SmartSchemaKey<FunctionIdEnum, MessageTypeEnum> key(function_id,
message_type);
@@ -382,7 +383,7 @@ bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::GetSchema(
template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum>
bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::GetSchema(
const StructIdEnum struct_id,
- NsSmartDeviceLink::NsSmartObjects::CSmartSchema& result) {
+ ns_smart_device_link::ns_smart_objects::CSmartSchema& result) {
typename StructsSchemesMap::iterator structs_iterator =
structs_schemes_.find(struct_id);
diff --git a/src/components/formatters/include/formatters/formatter_json_rpc.h b/src/components/formatters/include/formatters/formatter_json_rpc.h
index 3d921ea901..842e176976 100644
--- a/src/components/formatters/include/formatters/formatter_json_rpc.h
+++ b/src/components/formatters/include/formatters/formatter_json_rpc.h
@@ -45,9 +45,9 @@
#include "CFormatterJsonBase.h"
#include "formatters/CSmartFactory.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
/**
* @brief Formatter for JSON RPC format.
@@ -108,7 +108,7 @@ class FormatterJsonRpc : public CFormatterJsonBase {
*
* @return true if success, false otherwise.
*/
- static bool ToString(const NsSmartObjects::SmartObject& obj,
+ static bool ToString(const ns_smart_objects::SmartObject& obj,
std::string& out_str);
/**
@@ -125,7 +125,7 @@ class FormatterJsonRpc : public CFormatterJsonBase {
*/
template <typename FunctionId, typename MessageType>
static int32_t FromString(const std::string& str,
- NsSmartObjects::SmartObject& out);
+ ns_smart_objects::SmartObject& out);
private:
/**
@@ -223,7 +223,7 @@ class FormatterJsonRpc : public CFormatterJsonBase {
*/
template <typename FunctionId>
static int32_t ParseFunctionId(const Json::Value& method_value,
- NsSmartObjects::SmartObject& out);
+ ns_smart_objects::SmartObject& out);
/**
* @brief Set method.
@@ -237,7 +237,7 @@ class FormatterJsonRpc : public CFormatterJsonBase {
* @return true if function id was extracted successfully and set as a
* value of "method" field.
*/
- static bool SetMethod(const NsSmartObjects::SmartObject& params,
+ static bool SetMethod(const ns_smart_objects::SmartObject& params,
Json::Value& method_container);
/**
@@ -252,7 +252,7 @@ class FormatterJsonRpc : public CFormatterJsonBase {
* @return true if request/response id was extracted successfully and set
* as a value of "id" field.
*/
- static bool SetId(const NsSmartObjects::SmartObject& params,
+ static bool SetId(const ns_smart_objects::SmartObject& params,
Json::Value& id_container);
/**
@@ -267,18 +267,18 @@ class FormatterJsonRpc : public CFormatterJsonBase {
* @return true if message string was extracted successfully and set
* as a value of "message" field.
*/
- static bool SetMessage(const NsSmartObjects::SmartObject& params,
+ static bool SetMessage(const ns_smart_objects::SmartObject& params,
Json::Value& id_container);
};
template <typename FunctionId, typename MessageType>
int32_t FormatterJsonRpc::FromString(const std::string& str,
- NsSmartObjects::SmartObject& out) {
+ ns_smart_objects::SmartObject& out) {
int32_t result = kSuccess;
try {
Json::Value root;
Json::Reader reader;
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
+ namespace strings = ns_smart_device_link::ns_json_handler::strings;
if (false == reader.parse(str, root)) {
result = kParsingError | kMethodNotSpecified | kUnknownMethod |
@@ -309,7 +309,7 @@ int32_t FormatterJsonRpc::FromString(const std::string& str,
result |= ParseFunctionId<FunctionId>(root[kMethod], out);
}
out[strings::S_MSG_PARAMS] =
- NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
+ ns_smart_objects::SmartObject(ns_smart_objects::SmartType_Map);
} else {
const Json::Value& id_value = root[kId];
@@ -323,7 +323,7 @@ int32_t FormatterJsonRpc::FromString(const std::string& str,
id_value.asDouble();
} else if (true == id_value.isNull()) {
out[strings::S_PARAMS][strings::S_CORRELATION_ID] =
- NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Null);
+ ns_smart_objects::SmartObject(ns_smart_objects::SmartType_Null);
} else {
result |= kInvalidFormat | kInvalidId;
}
@@ -332,14 +332,14 @@ int32_t FormatterJsonRpc::FromString(const std::string& str,
message_type_string = kRequest;
result |= ParseFunctionId<FunctionId>(root[kMethod], out);
out[strings::S_MSG_PARAMS] =
- NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
+ ns_smart_objects::SmartObject(ns_smart_objects::SmartType_Map);
} else {
Json::Value method_container;
bool method_container_found = false;
if (true == root.isMember(kResult)) {
out[strings::S_MSG_PARAMS] =
- NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
+ ns_smart_objects::SmartObject(ns_smart_objects::SmartType_Map);
message_type_string = kResponse;
response_value = root[kResult];
@@ -348,7 +348,7 @@ int32_t FormatterJsonRpc::FromString(const std::string& str,
method_container_found = true;
} else if (true == root.isMember(kError)) {
out[strings::S_MSG_PARAMS] =
- NsSmartObjects::SmartObject(NsSmartObjects::SmartType_Map);
+ ns_smart_objects::SmartObject(ns_smart_objects::SmartType_Map);
message_type_string = kErrorResponse;
response_value = root[kError];
response_value_found = true;
@@ -382,7 +382,7 @@ int32_t FormatterJsonRpc::FromString(const std::string& str,
if (0 == (result & kUnknownMessageType)) {
MessageType message_type;
- if (!NsSmartObjects::EnumConversionHelper<MessageType>::StringToEnum(
+ if (!ns_smart_objects::EnumConversionHelper<MessageType>::StringToEnum(
message_type_string, &message_type)) {
result |= kUnknownMessageType;
} else {
@@ -469,7 +469,7 @@ int32_t FormatterJsonRpc::FromString(const std::string& str,
template <typename FunctionId>
int32_t FormatterJsonRpc::ParseFunctionId(const Json::Value& method_value,
- NsSmartObjects::SmartObject& out) {
+ ns_smart_objects::SmartObject& out) {
int32_t result = kSuccess;
if (false == method_value.isString()) {
@@ -477,11 +477,11 @@ int32_t FormatterJsonRpc::ParseFunctionId(const Json::Value& method_value,
} else {
FunctionId function_id;
- if (!NsSmartObjects::EnumConversionHelper<FunctionId>::CStringToEnum(
+ if (!ns_smart_objects::EnumConversionHelper<FunctionId>::CStringToEnum(
method_value.asCString(), &function_id)) {
result |= kUnknownMethod;
} else {
- namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
+ namespace strings = ns_smart_device_link::ns_json_handler::strings;
out[strings::S_PARAMS][strings::S_FUNCTION_ID] = function_id;
}
@@ -490,8 +490,8 @@ int32_t FormatterJsonRpc::ParseFunctionId(const Json::Value& method_value,
return result;
}
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_FORMATTER_JSON_RPC_H_
diff --git a/src/components/formatters/include/formatters/generic_json_formatter.h b/src/components/formatters/include/formatters/generic_json_formatter.h
index 2b5d95fd4a..c9b9431ee5 100644
--- a/src/components/formatters/include/formatters/generic_json_formatter.h
+++ b/src/components/formatters/include/formatters/generic_json_formatter.h
@@ -37,9 +37,9 @@
#include "CFormatterJsonBase.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
class GenericJsonFormatter : public CFormatterJsonBase {
public:
@@ -49,7 +49,7 @@ class GenericJsonFormatter : public CFormatterJsonBase {
* @param obj Input SmartObject.
* @param out_str Resulting JSON string.
*/
- static void ToString(const NsSmartObjects::SmartObject& obj,
+ static void ToString(const ns_smart_objects::SmartObject& obj,
std::string& out_str);
/**
@@ -61,11 +61,11 @@ class GenericJsonFormatter : public CFormatterJsonBase {
* @return true if success, false otherwise.
*/
static bool FromString(const std::string& str,
- NsSmartObjects::SmartObject& out);
+ ns_smart_objects::SmartObject& out);
};
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_GENERIC_JSON_FORMATTER_H_
diff --git a/src/components/formatters/include/formatters/meta_formatter.h b/src/components/formatters/include/formatters/meta_formatter.h
index 20abb3b848..36e39301f6 100644
--- a/src/components/formatters/include/formatters/meta_formatter.h
+++ b/src/components/formatters/include/formatters/meta_formatter.h
@@ -39,9 +39,9 @@
#include "smart_objects/smart_object.h"
#include "smart_objects/smart_schema.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
/**
* @brief Formats to string the smart object against given schema for given
@@ -66,13 +66,13 @@ class CMetaFormatter {
* @return true if successful, false - otherwise
*/
static bool CreateObjectByPattern(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& result_object);
+ const ns_smart_device_link::ns_smart_objects::SmartObject& object,
+ const ns_smart_device_link::ns_smart_objects::CSmartSchema& schema,
+ ns_smart_device_link::ns_smart_objects::SmartObject& result_object);
};
-} // namespace NsSmartDeviceLink
-} // namespace NsSmartDeviceLink::NsJSONHandler
-} // namespace NsSmartDeviceLink::NsJSONHandler::Formatters
+} // namespace ns_smart_device_link
+} // namespace ns_smart_device_link::ns_json_handler
+} // namespace ns_smart_device_link::ns_json_handler::formatters
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_META_FORMATTER_H_
diff --git a/src/components/formatters/src/CFormatterJsonBase.cc b/src/components/formatters/src/CFormatterJsonBase.cc
index 0a85a93d21..af8668543a 100644
--- a/src/components/formatters/src/CFormatterJsonBase.cc
+++ b/src/components/formatters/src/CFormatterJsonBase.cc
@@ -35,13 +35,13 @@
#include "formatters/CFormatterJsonBase.h"
#include "utils/convert_utils.h"
-void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::
+void ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::
jsonValueToObj(const Json::Value& value,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& obj) {
+ ns_smart_device_link::ns_smart_objects::SmartObject& obj) {
try {
if (value.type() == Json::objectValue) {
- obj = NsSmartDeviceLink::NsSmartObjects::SmartObject(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Map);
+ obj = ns_smart_device_link::ns_smart_objects::SmartObject(
+ ns_smart_device_link::ns_smart_objects::SmartType_Map);
Json::Value::Members members = value.getMemberNames();
@@ -49,8 +49,8 @@ void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::
jsonValueToObj(value[members[i]], obj[members[i]]);
}
} else if (value.type() == Json::arrayValue) {
- obj = NsSmartDeviceLink::NsSmartObjects::SmartObject(
- NsSmartDeviceLink::NsSmartObjects::SmartType_Array);
+ obj = ns_smart_device_link::ns_smart_objects::SmartObject(
+ ns_smart_device_link::ns_smart_objects::SmartType_Array);
for (uint32_t i = 0; i < value.size(); i++) {
jsonValueToObj(value[i], obj[i]);
@@ -72,11 +72,13 @@ void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::
// ----------------------------------------------------------------------------
-void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::
- objToJsonValue(const NsSmartDeviceLink::NsSmartObjects::SmartObject& obj,
- Json::Value& item) {
+void ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::
+ objToJsonValue(
+ const ns_smart_device_link::ns_smart_objects::SmartObject& obj,
+ Json::Value& item) {
try {
- if (NsSmartDeviceLink::NsSmartObjects::SmartType_Array == obj.getType()) {
+ if (ns_smart_device_link::ns_smart_objects::SmartType_Array ==
+ obj.getType()) {
item = Json::arrayValue;
for (uint32_t i = 0; i < obj.length(); i++) {
@@ -86,7 +88,7 @@ void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::
item.append(value);
}
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Map ==
+ } else if (ns_smart_device_link::ns_smart_objects::SmartType_Map ==
obj.getType()) {
item = Json::objectValue;
std::set<std::string> keys = obj.enumerate();
@@ -100,19 +102,19 @@ void NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::
item[*key] = value;
}
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Boolean ==
+ } else if (ns_smart_device_link::ns_smart_objects::SmartType_Boolean ==
obj.getType()) {
item = obj.asBool();
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Integer ==
+ } else if (ns_smart_device_link::ns_smart_objects::SmartType_Integer ==
obj.getType()) {
item = utils::ConvertInt64ToLongLongInt(obj.asInt());
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_UInteger ==
+ } else if (ns_smart_device_link::ns_smart_objects::SmartType_UInteger ==
obj.getType()) {
item = utils::ConvertUInt64ToLongLongUInt(obj.asUInt());
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Double ==
+ } else if (ns_smart_device_link::ns_smart_objects::SmartType_Double ==
obj.getType()) {
item = obj.asDouble();
- } else if (NsSmartDeviceLink::NsSmartObjects::SmartType_Null ==
+ } else if (ns_smart_device_link::ns_smart_objects::SmartType_Null ==
obj.getType()) {
item = Json::nullValue;
} else {
diff --git a/src/components/formatters/src/CFormatterJsonSDLRPCv1.cc b/src/components/formatters/src/CFormatterJsonSDLRPCv1.cc
index b776b9abd8..121fd43131 100644
--- a/src/components/formatters/src/CFormatterJsonSDLRPCv1.cc
+++ b/src/components/formatters/src/CFormatterJsonSDLRPCv1.cc
@@ -34,12 +34,12 @@
#include "formatters/meta_formatter.h"
#include "utils/convert_utils.h"
-namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
-namespace smart_objects_ns = NsSmartDeviceLink::NsSmartObjects;
+namespace strings = ns_smart_device_link::ns_json_handler::strings;
+namespace smart_objects_ns = ns_smart_device_link::ns_smart_objects;
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
// ----------------------------------------------------------------------------
diff --git a/src/components/formatters/src/CFormatterJsonSDLRPCv2.cc b/src/components/formatters/src/CFormatterJsonSDLRPCv2.cc
index 9e177ea4a8..ffbb644cc6 100644
--- a/src/components/formatters/src/CFormatterJsonSDLRPCv2.cc
+++ b/src/components/formatters/src/CFormatterJsonSDLRPCv2.cc
@@ -31,12 +31,12 @@
#include "formatters/CFormatterJsonSDLRPCv2.h"
#include "formatters/meta_formatter.h"
-namespace smart_objects_ns = NsSmartDeviceLink::NsSmartObjects;
-namespace strings = NsSmartDeviceLink::NsJSONHandler::strings;
+namespace smart_objects_ns = ns_smart_device_link::ns_smart_objects;
+namespace strings = ns_smart_device_link::ns_json_handler::strings;
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
// ----------------------------------------------------------------------------
diff --git a/src/components/formatters/src/CSmartFactory.cc b/src/components/formatters/src/CSmartFactory.cc
index 6efd895500..c1ee9133ca 100644
--- a/src/components/formatters/src/CSmartFactory.cc
+++ b/src/components/formatters/src/CSmartFactory.cc
@@ -34,21 +34,27 @@
#include "formatters/CSmartFactory.h"
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS(
+const std::string ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS(
"msg_params");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS("params");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID(
+const std::string ns_smart_device_link::ns_json_handler::strings::S_PARAMS(
+ "params");
+const std::string ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID(
"function_id");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE(
- "message_type");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION(
- "protocol_version");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE(
- "protocol_type");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID(
- "correlation_id");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::S_RPC_MSG_VERSION(
- "rpc_msg_version");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::kCode("code");
-const std::string NsSmartDeviceLink::NsJSONHandler::strings::kMessage(
+const std::string
+ ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE(
+ "message_type");
+const std::string
+ ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION(
+ "protocol_version");
+const std::string
+ ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE(
+ "protocol_type");
+const std::string
+ ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID(
+ "correlation_id");
+const std::string
+ ns_smart_device_link::ns_json_handler::strings::S_RPC_MSG_VERSION(
+ "rpc_msg_version");
+const std::string ns_smart_device_link::ns_json_handler::strings::kCode("code");
+const std::string ns_smart_device_link::ns_json_handler::strings::kMessage(
"message");
diff --git a/src/components/formatters/src/formatter_json_rpc.cc b/src/components/formatters/src/formatter_json_rpc.cc
index e349ced4d6..d50d04d0e9 100644
--- a/src/components/formatters/src/formatter_json_rpc.cc
+++ b/src/components/formatters/src/formatter_json_rpc.cc
@@ -35,11 +35,11 @@
#include "formatters/formatter_json_rpc.h"
#include "utils/convert_utils.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
-namespace strings = NsJSONHandler::strings;
+namespace strings = ns_json_handler::strings;
const char* FormatterJsonRpc::kRequest = "request";
const char* FormatterJsonRpc::kResponse = "response";
@@ -56,7 +56,7 @@ const char* FormatterJsonRpc::kCode = "code";
const char* FormatterJsonRpc::kData = "data";
const char* FormatterJsonRpc::kMessage = "message";
-bool FormatterJsonRpc::ToString(const NsSmartObjects::SmartObject& obj,
+bool FormatterJsonRpc::ToString(const ns_smart_objects::SmartObject& obj,
std::string& out_str) {
bool result = true;
try {
@@ -64,17 +64,17 @@ bool FormatterJsonRpc::ToString(const NsSmartObjects::SmartObject& obj,
root[kJsonRpc] = kJsonRpcExpectedValue;
- NsSmartObjects::SmartObject formatted_object(obj);
+ ns_smart_objects::SmartObject formatted_object(obj);
Json::Value msg_params_json(Json::objectValue);
formatted_object.getSchema().unapplySchema(formatted_object);
bool is_message_params = formatted_object.keyExists(strings::S_MSG_PARAMS);
bool empty_message_params = true;
if (true == is_message_params) {
- const NsSmartObjects::SmartObject& msg_params =
+ const ns_smart_objects::SmartObject& msg_params =
formatted_object.getElement(strings::S_MSG_PARAMS);
- result = (NsSmartObjects::SmartType_Map == msg_params.getType());
+ result = (ns_smart_objects::SmartType_Map == msg_params.getType());
if (true == result) {
objToJsonValue(msg_params, msg_params_json);
}
@@ -86,15 +86,16 @@ bool FormatterJsonRpc::ToString(const NsSmartObjects::SmartObject& obj,
if (false == formatted_object.keyExists(strings::S_PARAMS)) {
result = false;
} else {
- const NsSmartObjects::SmartObject& params =
+ const ns_smart_objects::SmartObject& params =
formatted_object.getElement(strings::S_PARAMS);
- if (NsSmartObjects::SmartType_Map != params.getType()) {
+ if (ns_smart_objects::SmartType_Map != params.getType()) {
result = false;
} else {
- const NsSmartObjects::SmartObject& message_type_object =
+ const ns_smart_objects::SmartObject& message_type_object =
params.getElement(strings::S_MESSAGE_TYPE);
- if (NsSmartObjects::SmartType_String != message_type_object.getType()) {
+ if (ns_smart_objects::SmartType_String !=
+ message_type_object.getType()) {
result = false;
} else {
const std::string message_type = message_type_object.asString();
@@ -113,10 +114,10 @@ bool FormatterJsonRpc::ToString(const NsSmartObjects::SmartObject& obj,
if (false == params.keyExists(strings::kCode)) {
result = false;
} else {
- const NsSmartObjects::SmartObject& code =
+ const ns_smart_objects::SmartObject& code =
params.getElement(strings::kCode);
- if (NsSmartObjects::SmartType_Integer != code.getType()) {
+ if (ns_smart_objects::SmartType_Integer != code.getType()) {
result = false;
} else {
root[kResult][kCode] =
@@ -131,9 +132,9 @@ bool FormatterJsonRpc::ToString(const NsSmartObjects::SmartObject& obj,
result = result && SetMethod(params, root[kError][kData]);
result = result && SetMessage(params, root[kError]);
- const NsSmartObjects::SmartObject& code =
+ const ns_smart_objects::SmartObject& code =
params.getElement(strings::kCode);
- if (NsSmartObjects::SmartType_Integer != code.getType()) {
+ if (ns_smart_objects::SmartType_Integer != code.getType()) {
result = false;
} else {
root[kError][kCode] =
@@ -151,15 +152,15 @@ bool FormatterJsonRpc::ToString(const NsSmartObjects::SmartObject& obj,
return result;
}
-bool FormatterJsonRpc::SetMethod(const NsSmartObjects::SmartObject& params,
+bool FormatterJsonRpc::SetMethod(const ns_smart_objects::SmartObject& params,
Json::Value& method_container) {
bool result = false;
if (true == params.keyExists(strings::S_FUNCTION_ID)) {
- const NsSmartObjects::SmartObject& function_id =
+ const ns_smart_objects::SmartObject& function_id =
params.getElement(strings::S_FUNCTION_ID);
- if (NsSmartObjects::SmartType_String == function_id.getType()) {
+ if (ns_smart_objects::SmartType_String == function_id.getType()) {
method_container[kMethod] = function_id.asString();
result = true;
}
@@ -168,15 +169,15 @@ bool FormatterJsonRpc::SetMethod(const NsSmartObjects::SmartObject& params,
return result;
}
-bool FormatterJsonRpc::SetId(const NsSmartObjects::SmartObject& params,
+bool FormatterJsonRpc::SetId(const ns_smart_objects::SmartObject& params,
Json::Value& id_container) {
bool result = false;
if (true == params.keyExists(strings::S_CORRELATION_ID)) {
- const NsSmartObjects::SmartObject& id =
+ const ns_smart_objects::SmartObject& id =
params.getElement(strings::S_CORRELATION_ID);
- if (NsSmartObjects::SmartType_Integer == id.getType()) {
+ if (ns_smart_objects::SmartType_Integer == id.getType()) {
id_container[kId] = utils::ConvertUInt64ToLongLongUInt(id.asUInt());
result = true;
}
@@ -185,15 +186,15 @@ bool FormatterJsonRpc::SetId(const NsSmartObjects::SmartObject& params,
return result;
}
-bool FormatterJsonRpc::SetMessage(const NsSmartObjects::SmartObject& params,
+bool FormatterJsonRpc::SetMessage(const ns_smart_objects::SmartObject& params,
Json::Value& message_container) {
bool result = false;
if (true == params.keyExists(strings::kMessage)) {
- const NsSmartObjects::SmartObject& message =
+ const ns_smart_objects::SmartObject& message =
params.getElement(strings::kMessage);
- if (NsSmartObjects::SmartType_String == message.getType()) {
+ if (ns_smart_objects::SmartType_String == message.getType()) {
message_container[kMessage] = message.asString();
result = true;
}
@@ -202,6 +203,6 @@ bool FormatterJsonRpc::SetMessage(const NsSmartObjects::SmartObject& params,
return result;
}
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
diff --git a/src/components/formatters/src/generic_json_formatter.cc b/src/components/formatters/src/generic_json_formatter.cc
index 7789a915c2..07b03484d2 100644
--- a/src/components/formatters/src/generic_json_formatter.cc
+++ b/src/components/formatters/src/generic_json_formatter.cc
@@ -34,11 +34,11 @@
#include "formatters/generic_json_formatter.h"
-namespace NsSmartDeviceLink {
-namespace NsJSONHandler {
-namespace Formatters {
+namespace ns_smart_device_link {
+namespace ns_json_handler {
+namespace formatters {
-void GenericJsonFormatter::ToString(const NsSmartObjects::SmartObject& obj,
+void GenericJsonFormatter::ToString(const ns_smart_objects::SmartObject& obj,
std::string& out_str) {
Json::Value json_root;
objToJsonValue(obj, json_root);
@@ -46,7 +46,7 @@ void GenericJsonFormatter::ToString(const NsSmartObjects::SmartObject& obj,
}
bool GenericJsonFormatter::FromString(const std::string& str,
- NsSmartObjects::SmartObject& out) {
+ ns_smart_objects::SmartObject& out) {
Json::Value json_root;
Json::Reader reader;
bool result = reader.parse(str, json_root);
@@ -58,6 +58,6 @@ bool GenericJsonFormatter::FromString(const std::string& str,
return result;
}
-} // namespace Formatters
-} // namespace NsJSONHandler
-} // namespace NsSmartDeviceLink
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
diff --git a/src/components/formatters/src/meta_formatter.cc b/src/components/formatters/src/meta_formatter.cc
index fafb84e938..82dd611498 100644
--- a/src/components/formatters/src/meta_formatter.cc
+++ b/src/components/formatters/src/meta_formatter.cc
@@ -38,15 +38,15 @@
#include "formatters/meta_formatter.h"
-namespace formatter_ns = NsSmartDeviceLink::NsJSONHandler::Formatters;
-namespace smart_objects_ns = NsSmartDeviceLink::NsSmartObjects;
+namespace formatter_ns = ns_smart_device_link::ns_json_handler::formatters;
+namespace smart_objects_ns = ns_smart_device_link::ns_smart_objects;
//---------------------------------------------------------------
bool formatter_ns::CMetaFormatter::CreateObjectByPattern(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& object,
- const NsSmartDeviceLink::NsSmartObjects::CSmartSchema& schema,
- NsSmartDeviceLink::NsSmartObjects::SmartObject& result_object) {
+ const ns_smart_device_link::ns_smart_objects::SmartObject& object,
+ const ns_smart_device_link::ns_smart_objects::CSmartSchema& schema,
+ ns_smart_device_link::ns_smart_objects::SmartObject& result_object) {
if (smart_objects_ns::SmartType_Invalid == result_object.getType()) {
return false;
}
diff --git a/src/components/formatters/test/CFormatterJsonBase_test.cc b/src/components/formatters/test/CFormatterJsonBase_test.cc
index ff1f60b8df..1cd9c55bbc 100644
--- a/src/components/formatters/test/CFormatterJsonBase_test.cc
+++ b/src/components/formatters/test/CFormatterJsonBase_test.cc
@@ -42,8 +42,8 @@ namespace test {
namespace components {
namespace formatters {
-using namespace NsSmartDeviceLink::NsSmartObjects;
-using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
+using namespace ns_smart_device_link::ns_smart_objects;
+using namespace ns_smart_device_link::ns_json_handler::formatters;
TEST(CFormatterJsonBaseTest, JSonStringValueToSmartObj_ExpectSuccessful) {
// Arrange value
diff --git a/src/components/formatters/test/CSmartFactory_test.cc b/src/components/formatters/test/CSmartFactory_test.cc
index 3713d076e2..3aba109e58 100644
--- a/src/components/formatters/test/CSmartFactory_test.cc
+++ b/src/components/formatters/test/CSmartFactory_test.cc
@@ -68,7 +68,7 @@ TEST(CSmartFactoryTest,
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -82,7 +82,7 @@ TEST(CSmartFactoryTest,
EXPECT_FALSE(SmartType::SmartType_Map == obj.getType());
EXPECT_TRUE(SmartType::SmartType_Null == obj.getType());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -104,7 +104,7 @@ TEST(
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -127,7 +127,7 @@ TEST(
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OUT_OF_RANGE, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OUT_OF_RANGE, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -150,7 +150,7 @@ TEST(
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::INVALID_VALUE, obj.validate(&report));
+ EXPECT_EQ(errors::eType::INVALID_VALUE, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -174,7 +174,7 @@ TEST(CSmartFactoryTest,
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -198,7 +198,7 @@ TEST(
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -236,7 +236,7 @@ TEST(
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::INVALID_VALUE, obj.validate(&report));
+ EXPECT_EQ(errors::eType::INVALID_VALUE, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -253,7 +253,7 @@ TEST(CSmartFactoryTest,
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -270,7 +270,7 @@ TEST(
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(1u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -287,7 +287,7 @@ TEST(CSmartFactoryTest,
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -304,12 +304,12 @@ TEST(CSmartFactoryTest,
obj["image"]["text"] = "test2";
obj["image"]["position"] = 100;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj["image"].validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj["image"].validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(3u, keys.size());
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -328,13 +328,13 @@ TEST(
obj["image"]["position"] = 100;
// Check object "image"
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj["image"].validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj["image"].validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(3u, keys.size());
// Check global object
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -352,13 +352,13 @@ TEST(
obj["image"]["position"] = 100;
// Check object "image"
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj["image"].validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj["image"].validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(2u, keys.size());
// Check global object
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -377,13 +377,13 @@ TEST(
obj["image"]["position"] = 100;
// Check object "image"
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj["image"].validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj["image"].validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::set<std::string> keys = obj.enumerate();
EXPECT_EQ(3u, keys.size());
// Check global object
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_TRUE(obj.isValid());
}
@@ -402,7 +402,7 @@ TEST(
EXPECT_EQ(2u, keys.size());
// Check global object
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
@@ -422,7 +422,7 @@ TEST(
EXPECT_EQ(3u, keys.size());
// Check global object
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::INVALID_VALUE, obj.validate(&report));
+ EXPECT_EQ(errors::eType::INVALID_VALUE, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_FALSE(obj.isValid());
}
diff --git a/src/components/formatters/test/cFormatterJsonSDLRPCv1_test.cc b/src/components/formatters/test/cFormatterJsonSDLRPCv1_test.cc
index a4d40b4478..fe9d2ec0e1 100644
--- a/src/components/formatters/test/cFormatterJsonSDLRPCv1_test.cc
+++ b/src/components/formatters/test/cFormatterJsonSDLRPCv1_test.cc
@@ -43,7 +43,7 @@ TEST(CFormatterJsonSDLRPCv1Test, EmptySmartObjectToString) {
SmartObject srcObj;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, srcObj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, srcObj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::string jsonString;
@@ -74,7 +74,7 @@ TEST(CFormatterJsonSDLRPCv1Test, SmObjWithRequestWithoutMsgNotValid_ToString) {
srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 1;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER,
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER,
srcObj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
@@ -108,7 +108,7 @@ TEST(CFormatterJsonSDLRPCv1Test,
srcObj[S_MSG_PARAMS][""] = "";
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, srcObj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, srcObj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::string jsonString;
@@ -341,7 +341,7 @@ TEST(CFormatterJsonSDLRPCv1Test, StringRequestToSmObj) {
EXPECT_EQ(CFormatterJsonSDLRPCv1::kSuccess, result);
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_EQ(obj[S_PARAMS][S_MESSAGE_TYPE], MessageTypeTest::request);
EXPECT_EQ(obj[S_PARAMS][S_FUNCTION_ID], FunctionIDTest::RegisterAppInterface);
@@ -487,7 +487,7 @@ TEST(CFormatterJsonSDLRPCv1Test, StringNotificationToSmartObject) {
inputJsonString, obj);
EXPECT_EQ(CFormatterJsonSDLRPCv1::kSuccess, result);
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_EQ(obj[S_PARAMS][S_MESSAGE_TYPE], MessageTypeTest::notification);
EXPECT_EQ(obj[S_PARAMS][S_FUNCTION_ID], FunctionIDTest::SetGlobalProperties);
diff --git a/src/components/formatters/test/cFormatterJsonSDLRPCv2_test.cc b/src/components/formatters/test/cFormatterJsonSDLRPCv2_test.cc
index c7e6f61674..628e9956bb 100644
--- a/src/components/formatters/test/cFormatterJsonSDLRPCv2_test.cc
+++ b/src/components/formatters/test/cFormatterJsonSDLRPCv2_test.cc
@@ -42,7 +42,7 @@ TEST(CFormatterJsonSDLRPCv2Test, EmptySmartObjectToString) {
SmartObject srcObj;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, srcObj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, srcObj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::string jsonString;
@@ -67,7 +67,7 @@ TEST(CFormatterJsonSDLRPCv2Test, SmObjWithRequestWithoutMsgNotValid_ToString) {
srcObj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER,
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER,
srcObj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
@@ -94,7 +94,7 @@ TEST(CFormatterJsonSDLRPCv2Test,
srcObj[S_MSG_PARAMS][""] = "";
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, srcObj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, srcObj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::string jsonString;
@@ -270,7 +270,7 @@ TEST(CFormatterJsonSDLRPCv2Test, StringRequestWithoutCorIdToSmObj) {
EXPECT_EQ(true, result);
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
+ EXPECT_EQ(errors::eType::MISSING_MANDATORY_PARAMETER, obj.validate(&report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
EXPECT_EQ(obj[S_PARAMS][S_MESSAGE_TYPE], MessageTypeTest::request);
EXPECT_EQ(obj[S_PARAMS][S_FUNCTION_ID], FunctionIDTest::RegisterAppInterface);
@@ -317,7 +317,7 @@ TEST(CFormatterJsonSDLRPCv2Test, StringRequestWithCorIdToSmObj) {
EXPECT_EQ(true, result);
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_EQ(obj[S_PARAMS][S_MESSAGE_TYPE], MessageTypeTest::request);
EXPECT_EQ(obj[S_PARAMS][S_FUNCTION_ID], FunctionIDTest::RegisterAppInterface);
@@ -384,7 +384,7 @@ TEST(CFormatterJsonSDLRPCv2Test, StringNotificationToSmartObject) {
corId);
EXPECT_EQ(true, result);
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::eType::OK, obj.validate(&report));
+ EXPECT_EQ(errors::eType::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
EXPECT_EQ(obj[S_PARAMS][S_MESSAGE_TYPE], MessageTypeTest::notification);
EXPECT_EQ(obj[S_PARAMS][S_FUNCTION_ID], FunctionIDTest::SetGlobalProperties);
diff --git a/src/components/formatters/test/formatter_json_rpc_test.cc b/src/components/formatters/test/formatter_json_rpc_test.cc
index e882bed618..f397accbd4 100644
--- a/src/components/formatters/test/formatter_json_rpc_test.cc
+++ b/src/components/formatters/test/formatter_json_rpc_test.cc
@@ -49,9 +49,9 @@ namespace test {
namespace components {
namespace formatters_test {
-using namespace NsSmartDeviceLink::NsSmartObjects;
-using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
-using namespace NsSmartDeviceLink::NsJSONHandler::strings;
+using namespace ns_smart_device_link::ns_smart_objects;
+using namespace ns_smart_device_link::ns_json_handler::formatters;
+using namespace ns_smart_device_link::ns_json_handler::strings;
void CompactJson(std::string& str) {
Json::Value root;
@@ -150,7 +150,7 @@ TEST(FormatterJsonRPCTest, UpperBoundValuesInSystemRequest_ToString_Success) {
hmi_apis::HMI_API factory;
EXPECT_TRUE(factory.attachSchema(obj, false));
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::OK, obj.validate(&report));
+ EXPECT_EQ(errors::OK, obj.validate(&report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
std::string result;
// Convert SmartObject to Json string
diff --git a/src/components/formatters/test/generic_json_formatter_test.cc b/src/components/formatters/test/generic_json_formatter_test.cc
index 41ecfd9ee3..97840eb110 100644
--- a/src/components/formatters/test/generic_json_formatter_test.cc
+++ b/src/components/formatters/test/generic_json_formatter_test.cc
@@ -38,8 +38,8 @@ namespace components {
namespace formatters {
TEST(GenericJsonFormatter, ToString) {
- namespace smartobj = NsSmartDeviceLink::NsSmartObjects;
- namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
+ namespace smartobj = ns_smart_device_link::ns_smart_objects;
+ namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
smartobj::SmartObject obj;
std::string result;
@@ -93,8 +93,8 @@ TEST(GenericJsonFormatter, ToString) {
}
TEST(GenericJsonFormatter, FromString) {
- namespace smartobj = NsSmartDeviceLink::NsSmartObjects;
- namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
+ namespace smartobj = ns_smart_device_link::ns_smart_objects;
+ namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
smartobj::SmartObject result;
diff --git a/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h b/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h
index 934e4d5b08..4b1ca94b98 100644
--- a/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h
+++ b/src/components/formatters/test/include/formatters/SmartFactoryTestHelper.h
@@ -52,9 +52,9 @@ namespace test {
namespace components {
namespace formatters {
-using namespace NsSmartDeviceLink::NsSmartObjects;
-using namespace NsSmartDeviceLink::NsJSONHandler;
-using namespace NsSmartDeviceLink::NsJSONHandler::strings;
+using namespace ns_smart_device_link::ns_smart_objects;
+using namespace ns_smart_device_link::ns_json_handler;
+using namespace ns_smart_device_link::ns_json_handler::strings;
using namespace hmi_apis;
namespace TestType {
diff --git a/src/components/formatters/test/include/formatters/create_smartSchema.h b/src/components/formatters/test/include/formatters/create_smartSchema.h
index 4d7a217317..73ff9ba77b 100644
--- a/src/components/formatters/test/include/formatters/create_smartSchema.h
+++ b/src/components/formatters/test/include/formatters/create_smartSchema.h
@@ -40,9 +40,9 @@ namespace test {
namespace components {
namespace formatters {
-using namespace NsSmartDeviceLink::NsJSONHandler::strings;
-using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_json_handler::strings;
+using namespace ns_smart_device_link::ns_json_handler::formatters;
+using namespace ns_smart_device_link::ns_smart_objects;
namespace FunctionIDTest {
enum eType {
diff --git a/src/components/formatters/test/include/formatters/meta_formatter_test_helper.h b/src/components/formatters/test/include/formatters/meta_formatter_test_helper.h
index a58f69e386..0ee21d092c 100644
--- a/src/components/formatters/test/include/formatters/meta_formatter_test_helper.h
+++ b/src/components/formatters/test/include/formatters/meta_formatter_test_helper.h
@@ -51,24 +51,24 @@ class CMetaFormatterTestHelper : public ::testing::Test {
virtual void TearDown();
void AnyObjectToJsonString(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& obj,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& obj,
std::string& result_string);
void FillObjectIdenticalToSchema(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& obj);
+ ns_smart_device_link::ns_smart_objects::SmartObject& obj);
void FillObjectIdenticalToSchemaWithoutNoMandatoriesParams(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& obj);
+ ns_smart_device_link::ns_smart_objects::SmartObject& obj);
void CompareObjects(
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& first,
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& second);
+ const ns_smart_device_link::ns_smart_objects::SmartObject& first,
+ const ns_smart_device_link::ns_smart_objects::SmartObject& second);
void FillObjectWithDefaultValues(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& obj);
+ ns_smart_device_link::ns_smart_objects::SmartObject& obj);
void FillObjectWithoutSomeMandatoryFields(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& obj);
+ ns_smart_device_link::ns_smart_objects::SmartObject& obj);
// Members
std::set<FunctionIDTest::eType> function_id_items_;
diff --git a/src/components/formatters/test/src/SmartFactoryTestHelper.cc b/src/components/formatters/test/src/SmartFactoryTestHelper.cc
index 8c7716e9b4..d48f9f58a0 100644
--- a/src/components/formatters/test/src/SmartFactoryTestHelper.cc
+++ b/src/components/formatters/test/src/SmartFactoryTestHelper.cc
@@ -187,7 +187,7 @@ void CSmartFactoryTest::InitFunctionSchemes(
CObjectSchemaItem::SMember(CStringSchemaItem::create(), true);
CObjectSchemaItem::Members root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] =
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] =
CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members),
true);
@@ -506,5 +506,6 @@ CSmartFactoryTest::ProvideObjectSchemaItemForStruct(
if (it != struct_schema_items.end()) {
return it->second;
}
- return NsSmartDeviceLink::NsSmartObjects::CAlwaysFalseSchemaItem::create();
+ return ns_smart_device_link::ns_smart_objects::CAlwaysFalseSchemaItem::
+ create();
}
diff --git a/src/components/formatters/test/src/create_smartSchema.cc b/src/components/formatters/test/src/create_smartSchema.cc
index 1497fbf281..3602fc3de7 100644
--- a/src/components/formatters/test/src/create_smartSchema.cc
+++ b/src/components/formatters/test/src/create_smartSchema.cc
@@ -35,9 +35,9 @@ namespace test {
namespace components {
namespace formatters {
-using namespace NsSmartDeviceLink::NsJSONHandler::strings;
-using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_json_handler::strings;
+using namespace ns_smart_device_link::ns_json_handler::formatters;
+using namespace ns_smart_device_link::ns_smart_objects;
template <>
const EnumConversionHelper<FunctionIDTest::eType>::EnumToCStringMap
diff --git a/src/components/formatters/test/src/meta_formatter_test_helper.cc b/src/components/formatters/test/src/meta_formatter_test_helper.cc
index 897c8d364d..b322510f6c 100644
--- a/src/components/formatters/test/src/meta_formatter_test_helper.cc
+++ b/src/components/formatters/test/src/meta_formatter_test_helper.cc
@@ -36,8 +36,8 @@ namespace test {
namespace components {
namespace formatters {
-using namespace NsSmartDeviceLink::NsJSONHandler::strings;
-using namespace NsSmartDeviceLink::NsJSONHandler::Formatters;
+using namespace ns_smart_device_link::ns_json_handler::strings;
+using namespace ns_smart_device_link::ns_json_handler::formatters;
void CMetaFormatterTestHelper::SetUp() {
function_id_items_.insert(FunctionIDTest::RegisterAppInterface);
diff --git a/src/components/include/test/application_manager/mock_app_extension.h b/src/components/include/test/application_manager/mock_app_extension.h
index eb8fcd51cf..5898bc9b72 100644
--- a/src/components/include/test/application_manager/mock_app_extension.h
+++ b/src/components/include/test/application_manager/mock_app_extension.h
@@ -47,11 +47,11 @@ static unsigned MockAppExtensionUID = 123;
class MockAppExtension : public application_manager::AppExtension {
public:
MockAppExtension() : AppExtension(MockAppExtensionUID) {}
- MOCK_METHOD1(
- SaveResumptionData,
- void(NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data));
+ MOCK_METHOD1(SaveResumptionData,
+ void(ns_smart_device_link::ns_smart_objects::SmartObject&
+ resumption_data));
MOCK_METHOD1(ProcessResumption,
- void(const NsSmartDeviceLink::NsSmartObjects::SmartObject&
+ void(const ns_smart_device_link::ns_smart_objects::SmartObject&
resumption_data));
};
diff --git a/src/components/interfaces/CMakeLists.txt b/src/components/interfaces/CMakeLists.txt
index 660cbd661d..3cf1082e90 100644
--- a/src/components/interfaces/CMakeLists.txt
+++ b/src/components/interfaces/CMakeLists.txt
@@ -38,7 +38,7 @@ include_directories (
${CMAKE_BINARY_DIR}
)
-generate_interface("v4_protocol_v1_2_no_extra.xml" "NsSmartDeviceLinkRPC::V1" "sdlrpcv1")
+generate_interface("v4_protocol_v1_2_no_extra.xml" "ns_smart_device_link_rpc::V1" "sdlrpcv1")
add_library(v4_protocol_v1_2_no_extra ${CMAKE_CURRENT_BINARY_DIR}/v4_protocol_v1_2_no_extra_schema.cc)
generate_interface("MOBILE_API.xml" "mobile_apis" "sdlrpcv2")
diff --git a/src/components/policy/policy_external/doc/doxygen/components/JSONHandler/Formatters/index.txt b/src/components/policy/policy_external/doc/doxygen/components/JSONHandler/Formatters/index.txt
index 9854b88d5f..0144efaf7f 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/JSONHandler/Formatters/index.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/JSONHandler/Formatters/index.txt
@@ -1,9 +1,9 @@
-/*! \page components_jsonhandler_formatters Smart Objects Formatters
+/*! \page components_jsonhandler_formatters Smart Objects formatters
In order to create JSON string representation from Smart Object or create Smart Object data structure from JSON string representation JSON Handler component has special classes called formatters.
-The interface of formatter is quite simple and defined by NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase class. Actually it has two methods - NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::objToJsonValue to convert JSON string to object and NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::jsonValueToObj to create JSON string from object.
+The interface of formatter is quite simple and defined by ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase class. Actually it has two methods - ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::objToJsonValue to convert JSON string to object and ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::jsonValueToObj to create JSON string from object.
-Current implementation has two different implementations of NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase class: NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonALRPCv1 for ALRPC.v1 and NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonALRPCv2 for ALRPC.v2. These implementations handle specifics of each format.
+Current implementation has two different implementations of ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase class: ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonALRPCv1 for ALRPC.v1 and ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonALRPCv2 for ALRPC.v2. These implementations handle specifics of each format.
*/
diff --git a/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt b/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt
index 6505ae6f43..2c23555902 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Types/Value representation.txt
@@ -1,11 +1,11 @@
/*! \page components_smartobjects_types_repr Type value representation methods for SmartObjects
-As alternative to the type casts NsSmartDeviceLink::NsSmartObjects::CSmartObject class defines set of usable methods that allow to represent object values as desired type. Use of these methods may change code style and readability but functionally it completely similar to the type casts of Smart Objects.
+As alternative to the type casts ns_smart_device_link::ns_smart_objects::CSmartObject class defines set of usable methods that allow to represent object values as desired type. Use of these methods may change code style and readability but functionally it completely similar to the type casts of Smart Objects.
Example:
<pre>
-NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
+ns_smart_device_link::ns_smart_objects::CSmartObject obj;
obj[0] = 1;
diff --git a/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt b/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt
index 2e611f74b9..a031e9fd86 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Schema Structure.txt
@@ -1,25 +1,25 @@
/*! \page components_smartobjects_validation_items Schema structure: Schema Items
-In order to create new Schema (new object of class NsSmartDeviceLink::NsSmartObjects::CSmartSchema) client first must define all required Schema Items. Actually every Schema is a tree of respective Schema Items. Each node and leaf of that tree defines structural rules for some Smart Object data structure.
+In order to create new Schema (new object of class ns_smart_device_link::ns_smart_objects::CSmartSchema) client first must define all required Schema Items. Actually every Schema is a tree of respective Schema Items. Each node and leaf of that tree defines structural rules for some Smart Object data structure.
-Schema Items are represented as class hierarchy. The base class for all schema items is a NsSmartDeviceLink::NsSmartObjects::ISchemaItem class. This base class defines generic validation interface for Schema Items.
+Schema Items are represented as class hierarchy. The base class for all schema items is a ns_smart_device_link::ns_smart_objects::ISchemaItem class. This base class defines generic validation interface for Schema Items.
-To define special elements with always successful or always failing validation there are two special Schema Items: NsSmartDeviceLink::NsSmartObjects::CAlwaysTrueSchemaItem and NsSmartDeviceLink::NsSmartObjects::CAlwaysFalseSchemaItem.
+To define special elements with always successful or always failing validation there are two special Schema Items: ns_smart_device_link::ns_smart_objects::CAlwaysTrueSchemaItem and ns_smart_device_link::ns_smart_objects::CAlwaysFalseSchemaItem.
-NsSmartDeviceLink::NsSmartObjects::CBoolSchemaItem is used for boolean values and has no parameters (only verifies that respective Smart Object is really has boolean value).
+ns_smart_device_link::ns_smart_objects::CBoolSchemaItem is used for boolean values and has no parameters (only verifies that respective Smart Object is really has boolean value).
-NsSmartDeviceLink::NsSmartObjects::TNumberSchemaItem is template Schema Item that can be used for both integer and floating point values. In addition to the regular type verification it is possible to set min and max value range (these values are optional).
+ns_smart_device_link::ns_smart_objects::TNumberSchemaItem is template Schema Item that can be used for both integer and floating point values. In addition to the regular type verification it is possible to set min and max value range (these values are optional).
-NsSmartDeviceLink::NsSmartObjects::TEnumSchemaItem is used to verify any custom client-defined enum.
+ns_smart_device_link::ns_smart_objects::TEnumSchemaItem is used to verify any custom client-defined enum.
-NsSmartDeviceLink::NsSmartObjects::CStringSchemaItem is used to verify a string values. As optional parameter max length of the string could be set.
+ns_smart_device_link::ns_smart_objects::CStringSchemaItem is used to verify a string values. As optional parameter max length of the string could be set.
-NsSmartDeviceLink::NsSmartObjects::CArraySchemaItem provides validation for array. Can be used to verify special type and array size.
+ns_smart_device_link::ns_smart_objects::CArraySchemaItem provides validation for array. Can be used to verify special type and array size.
-NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem used in case when Schema Item includes another Schema Item. Actually this is only way to create tree node of new Schema. All other Schema Items will be used only to become leafs of validation tree.
+ns_smart_device_link::ns_smart_objects::CObjectSchemaItem used in case when Schema Item includes another Schema Item. Actually this is only way to create tree node of new Schema. All other Schema Items will be used only to become leafs of validation tree.
After creation of all required Schema Items (which is actually bind in the tree) it is possible to create Schema.
-Schema can be initialized not only by raw root Schema Item, but also by special abstraction called Member (defined by NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem::SMember class). So every root item (NsSmartDeviceLink::NsSmartObjects::CObjectSchemaItem) firstly should be wrapped as Member. This wrapping process also allows to set "is mandatory" status for every Member.
+Schema can be initialized not only by raw root Schema Item, but also by special abstraction called Member (defined by ns_smart_device_link::ns_smart_objects::CObjectSchemaItem::SMember class). So every root item (ns_smart_device_link::ns_smart_objects::CObjectSchemaItem) firstly should be wrapped as Member. This wrapping process also allows to set "is mandatory" status for every Member.
and pass root Schema Item as initial parameter to the new Schema.
@@ -77,21 +77,21 @@ schemaMembersMap["info"] = CObjectSchemaItem::SMember(info_SchemaItem, false);
std::map<std::string, CObjectSchemaItem::SMember> paramsMembersMap;
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(FunctionIDItems), true);
+paramsMembersMap[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(FunctionIDItems), true);
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(MessageTypeItems), true);
+paramsMembersMap[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(MessageTypeItems), true);
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+paramsMembersMap[ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(1, 2), true);
+paramsMembersMap[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(1, 2), true);
-paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+paramsMembersMap[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> rootMembersMap;
-rootMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schemaMembersMap), true);
+rootMembersMap[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schemaMembersMap), true);
-rootMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(paramsMembersMap), true);
+rootMembersMap[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(paramsMembersMap), true);
CSmartSchema(CObjectSchemaItem::create(rootMembersMap));
diff --git a/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt b/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt
index a02f0be4bd..c651af5294 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/SmartObjects/Smart Objects Validation/Validation.txt
@@ -1,9 +1,9 @@
/*! \page components_smartobjects_validation_use Using Schema for validation
-The main purpose of Schema is validation of existing Smart Object. This process includes type and value validation. The client can use results of validation to determine if given Smart Object is valid or not. Validation of specific Smart Object can be triggered by using NsSmartDeviceLink::NsSmartObjects::CSmartSchema::validate method. Internally Schema triggers respective validate method of every Schema Item in order to perform validation.
+The main purpose of Schema is validation of existing Smart Object. This process includes type and value validation. The client can use results of validation to determine if given Smart Object is valid or not. Validation of specific Smart Object can be triggered by using ns_smart_device_link::ns_smart_objects::CSmartSchema::validate method. Internally Schema triggers respective validate method of every Schema Item in order to perform validation.
-Another feature of Schema is capability to be applied to the Smart Object. Applying means that Schema tries to modify object to "normalize" data. Currently this "normalization" effects on string representation of enums. Applying of the Schema can be triggered by using NsSmartDeviceLink::NsSmartObjects::CSmartSchema::applySchema method. Internally Schema triggers respective apply method of every Schema Item and at the moment only enum Schema Items try to covert string representation to enum values.
+Another feature of Schema is capability to be applied to the Smart Object. Applying means that Schema tries to modify object to "normalize" data. Currently this "normalization" effects on string representation of enums. Applying of the Schema can be triggered by using ns_smart_device_link::ns_smart_objects::CSmartSchema::applySchema method. Internally Schema triggers respective apply method of every Schema Item and at the moment only enum Schema Items try to covert string representation to enum values.
-To "unapply" modifications done by apply feature Schema has NsSmartDeviceLink::NsSmartObjects::CSmartSchema::unapplySchema method. It can be used to make string representations of enums.
+To "unapply" modifications done by apply feature Schema has ns_smart_device_link::ns_smart_objects::CSmartSchema::unapplySchema method. It can be used to make string representations of enums.
*/
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt
index 2ba273e9d4..dab3df104d 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/ConnectionManagement.txt
@@ -1,11 +1,11 @@
/** @page components_transportmanager_client_connection_management Connection Management
*
- * As all requests to TransportManager are asynchronous, client must implement NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener
- * interface and add itself as a device listener with NsSmartDeviceLink::NsTransportManager::ITransportManager::addDeviceListener()
+ * As all requests to TransportManager are asynchronous, client must implement ns_smart_device_link::ns_transport_manager::ITransportManagerDeviceListener
+ * interface and add itself as a device listener with ns_smart_device_link::ns_transport_manager::ITransportManager::addDeviceListener()
* in order to receive notifications.
- * To connect remote device client must use NsSmartDeviceLink::NsTransportManager::ITransportManager::connectDevice(). It will initiate connections to all
+ * To connect remote device client must use ns_smart_device_link::ns_transport_manager::ITransportManager::connectDevice(). It will initiate connections to all
* applications running on remove device. For TCP device this call has no effect as TCP connections are initiated by remote devices.
- * Client will be notified about each connected application with NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener::onApplicationConnected().
- * To disconnect all applications running on remote device client must use NsSmartDeviceLink::NsTransportManager::ITransportManager::disconnectDevice().
- * Client will be notified about each disconnected application with NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener::onApplicationDisconnected().
+ * Client will be notified about each connected application with ns_smart_device_link::ns_transport_manager::ITransportManagerDeviceListener::onApplicationConnected().
+ * To disconnect all applications running on remote device client must use ns_smart_device_link::ns_transport_manager::ITransportManager::disconnectDevice().
+ * Client will be notified about each disconnected application with ns_smart_device_link::ns_transport_manager::ITransportManagerDeviceListener::onApplicationDisconnected().
*/
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt
index 98dd7426be..831a0c7818 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DataTransfer.txt
@@ -1,11 +1,11 @@
/** @page components_transportmanager_client_data_transfer Data Transfer
*
- * As all requests to TransportManager are asynchronous, client must implement NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener
- * interface and add itself as a data listener with NsSmartDeviceLink::NsTransportManager::ITransportManager::addDataListener()
+ * As all requests to TransportManager are asynchronous, client must implement ns_smart_device_link::ns_transport_manager::ITransportManagerDataListener
+ * interface and add itself as a data listener with ns_smart_device_link::ns_transport_manager::ITransportManager::addDataListener()
* in order to receive notifications.
- * To send frame to remote device client must use NsSmartDeviceLink::NsTransportManager::ITransportManager::sendFrame() poviding connection handle,
+ * To send frame to remote device client must use ns_smart_device_link::ns_transport_manager::ITransportManager::sendFrame() poviding connection handle,
* frame data, data size and user data. User data is an integer that is assigned to a frame and will be sent back to client when sending of frame
* will be completed. Client may use this data to identify frame when send result will be reported. When sending of frame is completed
- * client is notified via NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener::onFrameSendCompleted(). When frame is received from a remote
- * device client is notified via NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener::onFrameReceived().
+ * client is notified via ns_smart_device_link::ns_transport_manager::ITransportManagerDataListener::onFrameSendCompleted(). When frame is received from a remote
+ * device client is notified via ns_smart_device_link::ns_transport_manager::ITransportManagerDataListener::onFrameReceived().
*/
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt
index eb5f3e477e..4b5b63bf87 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/DeviceManagement.txt
@@ -1,11 +1,11 @@
/** @page components_transportmanager_client_device_management Device Management
*
- * As all requests to TransportManager are asynchronous, client must implement NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener
- * interface and add itself as a device listener with NsSmartDeviceLink::NsTransportManager::ITransportManager::addDeviceListener()
+ * As all requests to TransportManager are asynchronous, client must implement ns_smart_device_link::ns_transport_manager::ITransportManagerDeviceListener
+ * interface and add itself as a device listener with ns_smart_device_link::ns_transport_manager::ITransportManager::addDeviceListener()
* in order to receive notifications.
- * Client of TransportManager may use NsSmartDeviceLink::NsTransportManager::ITransportManager::scanForNewDevices()
+ * Client of TransportManager may use ns_smart_device_link::ns_transport_manager::ITransportManager::scanForNewDevices()
* to initiate device scan on all device adapters that support this feature. In order to get list of available
- * devices client must override NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener::onDeviceListUpdated().
+ * devices client must override ns_smart_device_link::ns_transport_manager::ITransportManagerDeviceListener::onDeviceListUpdated().
* Each device adapter will perform scan independently from other device adapters and device list might be updated
* several times (after each adapter that supports scanning finishes scanning operation). Device list might also be
* updated without device scan request, e.g. if new client connects via TCP this device will be added to device list
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/index.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/index.txt
index 8916dbeb55..d4d0efeb7b 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/index.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Client Specification/index.txt
@@ -3,12 +3,12 @@
This chapter describes details of correct use of Transport Manager on the client side. In other words this chapter can be called "How to create effective and safe client of Transport Manager".
Transport Manager defines set of asynchronous requests (means that operations are non-blocking in the calling thread) and provides two different interfaces to monitor asynchronous responses and notifications about data update.
-Clients of Transport Manager should use NsSmartDeviceLink::NsTransportManager::ITransportManager interface to initiate any request to the component.
+Clients of Transport Manager should use ns_smart_device_link::ns_transport_manager::ITransportManager interface to initiate any request to the component.
Also Transport Manager provides two different interfaces:
-1) NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener. Client can implement this interface if it needs information about data frame send/receive.
+1) ns_smart_device_link::ns_transport_manager::ITransportManagerDataListener. Client can implement this interface if it needs information about data frame send/receive.
-2) NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener. Client can implement this interface if it needs information about updates of devices available for communication and current client applications status.
+2) ns_smart_device_link::ns_transport_manager::ITransportManagerDeviceListener. Client can implement this interface if it needs information about updates of devices available for communication and current client applications status.
For more information about typical use of Transport Manager please read the following topics:
- \subpage components_transportmanager_client_device_management "Device Management"
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt
index 970aeffd83..eb5de23e35 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/BluetoothAdapter.txt
@@ -1,18 +1,18 @@
/** @page components_transportmanager_internal_design_transport_adapters_bluetooth_adapter Bluetooth Adapter
*
* Bluetooth adapter handles communication with external devices via bluetooth. It is implemented in
- * NsSmartDeviceLink::NsTransportManager::CBluetoothAdapter.
+ * ns_smart_device_link::ns_transport_manager::CBluetoothAdapter.
*
* @section components_transportmanager_internal_design_transport_adapters_bluetooth_adapter_discovery Device discovery
*
- * When requested by a call to NsSmartDeviceLink::NsTransportManager::CTransportAdapter::scanForNewDevices() bluetooth adapter
+ * When requested by a call to ns_smart_device_link::ns_transport_manager::CTransportAdapter::scanForNewDevices() bluetooth adapter
* searches for bluetooth devices. For each found device it runs SDP query for service with SmartDeviceLink UUID
* (936DA01F-9ABD-4D9D-80C7-02AF85C822A8). Devices that support this service are added to bluetooth adapter device list.
* Bluetooth device scans are performed only when explicitly requested.
*
* @section components_transportmanager_internal_design_transport_adapters_bluetooth_adapter_connecting_devices Connecting devices
*
- * NsSmartDeviceLink::NsTransportManager::CBluetoothAdapter::createConnectionsListForDevice() runs SDP query for specified device
+ * ns_smart_device_link::ns_transport_manager::CBluetoothAdapter::createConnectionsListForDevice() runs SDP query for specified device
* and fills connection list with connections to all RFCOMM channels on remote device where SmartDeviceLink service has been discovered.
*
* @see @ref components_transportmanager_internal_design_transport_adapters_common_connecting_devices
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt
index d81b70dfe8..2fbd835ec9 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt
@@ -1,11 +1,11 @@
/** @page components_transportmanager_internal_design_transport_adapters_tcp_adapter TCP Adapter
*
* TCP adapter handles communication with remote devices via TCP/IP socket. It is implemented in
- * NsSmartDeviceLink::NsTransportManager::CTCPAdapter.
+ * ns_smart_device_link::ns_transport_manager::CTCPAdapter.
*
* @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_listen Listening for connections
*
- * TCP adapter creates listening TCP socket (TCP port is specified in NsSmartDeviceLink::NsTransportManager::CTCPAdapter::cTCPAdapterPort)
+ * TCP adapter creates listening TCP socket (TCP port is specified in ns_smart_device_link::ns_transport_manager::CTCPAdapter::cTCPAdapterPort)
* and listens for incoming connections. Devices are identified by their IP address.
*
* @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_accept Accepting connection
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt
index 3a5d0f0e91..015978b773 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/index.txt
@@ -4,80 +4,80 @@
*
* @section components_transportmanager_internal_design_transport_adapters_common Common logic
*
- * Logic common to all device adapters is implemented in class NsSmartDeviceLink::NsTransportManager::CTransportAdapter.
+ * Logic common to all device adapters is implemented in class ns_smart_device_link::ns_transport_manager::CTransportAdapter.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_devices_map Devices map
*
- * Devices map is a map of device handle to internal device structure NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SDevice.
- * Devices map is stored in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDevices. Any access to this map must be performed
- * with NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDevicesMutex locked.
+ * Devices map is a map of device handle to internal device structure ns_smart_device_link::ns_transport_manager::CTransportAdapter::SDevice.
+ * Devices map is stored in ns_smart_device_link::ns_transport_manager::CTransportAdapter::mDevices. Any access to this map must be performed
+ * with ns_smart_device_link::ns_transport_manager::CTransportAdapter::mDevicesMutex locked.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_connections_map Connections map
*
- * Connections map is a map of connection handle to internal connection structure NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection.
- * Connections map is stored in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mConnections. Any access to this map must be performed
- * with NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mConnectionsMutex locked.
+ * Connections map is a map of connection handle to internal connection structure ns_smart_device_link::ns_transport_manager::CTransportAdapter::SConnection.
+ * Connections map is stored in ns_smart_device_link::ns_transport_manager::CTransportAdapter::mConnections. Any access to this map must be performed
+ * with ns_smart_device_link::ns_transport_manager::CTransportAdapter::mConnectionsMutex locked.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_main_thread Device adapter main thread
*
- * Device adapter main thread is started in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::run().
- * Specific device adapter must implement virtual function NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mainThread()
+ * Device adapter main thread is started in ns_smart_device_link::ns_transport_manager::CTransportAdapter::run().
+ * Specific device adapter must implement virtual function ns_smart_device_link::ns_transport_manager::CTransportAdapter::mainThread()
* and implement its specific main thread logic there.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_connection_thread Device adapter connection thread
*
- * Device adapter connection thread is started in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::startConnection().
- * Specific device adapter must implement virtual function NsSmartDeviceLink::NsTransportManager::CTransportAdapter::connectionThread()
+ * Device adapter connection thread is started in ns_smart_device_link::ns_transport_manager::CTransportAdapter::startConnection().
+ * Specific device adapter must implement virtual function ns_smart_device_link::ns_transport_manager::CTransportAdapter::connectionThread()
* and implement its specific connection thread logic there. When connection is established and socket file descriptor is set
- * in NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mConnectionSocket specific device adapter may call
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::handleCommunication() to handle all communication through this socket
+ * in ns_smart_device_link::ns_transport_manager::CTransportAdapter::SConnection::mConnectionSocket specific device adapter may call
+ * ns_smart_device_link::ns_transport_manager::CTransportAdapter::handleCommunication() to handle all communication through this socket
* until connection is terminated.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_threads_termination Termination of device adapter threads
*
- * Specific device adapter implementation must call in its destructor NsSmartDeviceLink::NsTransportManager::CTransportAdapter::waitForThreadsTermination()
+ * Specific device adapter implementation must call in its destructor ns_smart_device_link::ns_transport_manager::CTransportAdapter::waitForThreadsTermination()
* to wait for termination of all threads (main thread and connection threads). Device adapter threads must be terminated before specific
* device adapter class is destructed, so it can't be called in the destructor of base class and must be called explicitly from the inherited
* class's destructor.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_device_scan Requesting scan for new devices
*
- * Device scan is requested by setting flag NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDeviceScanRequested
- * and signaling conditional variable NsSmartDeviceLink::NsTransportManager::CTransportAdapter::mDeviceScanRequestedCond, which may be monitored
+ * Device scan is requested by setting flag ns_smart_device_link::ns_transport_manager::CTransportAdapter::mDeviceScanRequested
+ * and signaling conditional variable ns_smart_device_link::ns_transport_manager::CTransportAdapter::mDeviceScanRequestedCond, which may be monitored
* by specific device adapter if it supports device scanning. Specific device adaptere may call for this purpose
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::waitForDeviceScanRequest() which will wait on this conditional variable
+ * ns_smart_device_link::ns_transport_manager::CTransportAdapter::waitForDeviceScanRequest() which will wait on this conditional variable
* until it's signaled or specified timeout expires.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_connecting_devices Connecting devices
*
- * Device connection is initiated with a call to NsSmartDeviceLink::NsTransportManager::CTransportAdapter::connectDevice().
- * This method calls virtual function NsSmartDeviceLink::NsTransportManager::CTransportAdapter::createConnectionsListForDevice()
+ * Device connection is initiated with a call to ns_smart_device_link::ns_transport_manager::CTransportAdapter::connectDevice().
+ * This method calls virtual function ns_smart_device_link::ns_transport_manager::CTransportAdapter::createConnectionsListForDevice()
* which may be implemented by specific device adapter to create a list of connections that must be established for the device.
- * For each connection created by device adapter it calls NsSmartDeviceLink::NsTransportManager::CTransportAdapter::startConnection()
+ * For each connection created by device adapter it calls ns_smart_device_link::ns_transport_manager::CTransportAdapter::startConnection()
* which adds connection to connections map and starts connection thread.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_disconnecting_devices Disconnecting devices
*
- * Device disconnection is initiated with a call to NsSmartDeviceLink::NsTransportManager::CTransportAdapter::disconnectDevice().
+ * Device disconnection is initiated with a call to ns_smart_device_link::ns_transport_manager::CTransportAdapter::disconnectDevice().
* This method finds all connections in connections map that corresponds to specified device and calls
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::stopConnection() for each of them.
+ * ns_smart_device_link::ns_transport_manager::CTransportAdapter::stopConnection() for each of them.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_handling_communication Handling communication
*
- * All frames requested to be sent via NsSmartDeviceLink::NsTransportManager::CTransportAdapter::sendFrame() are stored in
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mFramesToSend. Pipe
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mNotificationPipeFds is used by
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::sendFrame() to notify connection thread that data is available
- * to be sent. NsSmartDeviceLink::NsTransportManager::CTransportAdapter::sendFrame() writes one byte to the write end of this pipe.
- * NsSmartDeviceLink::NsTransportManager::CTransportAdapter::handleCommunication() uses poll() to wait for
+ * All frames requested to be sent via ns_smart_device_link::ns_transport_manager::CTransportAdapter::sendFrame() are stored in
+ * ns_smart_device_link::ns_transport_manager::CTransportAdapter::SConnection::mFramesToSend. Pipe
+ * ns_smart_device_link::ns_transport_manager::CTransportAdapter::SConnection::mNotificationPipeFds is used by
+ * ns_smart_device_link::ns_transport_manager::CTransportAdapter::sendFrame() to notify connection thread that data is available
+ * to be sent. ns_smart_device_link::ns_transport_manager::CTransportAdapter::sendFrame() writes one byte to the write end of this pipe.
+ * ns_smart_device_link::ns_transport_manager::CTransportAdapter::handleCommunication() uses poll() to wait for
* incoming data using connection socket file descriptor and outgoing data using file descriptor of the read end of this pipe.
* When either of them become available for reading or some error occurs (e.g. socket gets disconnected) connection thread
* wakes up and handles this event. Notification pipe is also used to notify connection thread that connection has to be
- * terminated using NsSmartDeviceLink::NsTransportManager::CTransportAdapter::SConnection::mTerminateFlag.
+ * terminated using ns_smart_device_link::ns_transport_manager::CTransportAdapter::SConnection::mTerminateFlag.
*
* @subsection components_transportmanager_internal_design_transport_adapters_common_update_client_device_list Updating client device list.
*
- * Specific device adapter may call NsSmartDeviceLink::NsTransportManager::CTransportAdapter::updateClientDeviceList() when its internal
+ * Specific device adapter may call ns_smart_device_link::ns_transport_manager::CTransportAdapter::updateClientDeviceList() when its internal
* knowledge about available devices is updated to notify device adapter client (TransportManager) about this update.
*
* @section components_transportmanager_internal_design_transport_adapters_common_specific Specific device adapters
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt
index 6c35f0962f..3d2fcb5094 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/MultiThreading.txt
@@ -2,8 +2,8 @@
Internally Transport Manager uses different threads for different operations. This design solution was used to provide efficient asynchronous communication with clients and underlying Device Adapters.
-Transport Manager uses one thread to operate with all device-related callbacks. In other word all callbacks declared in NsSmartDeviceLink::NsTransportManager::ITransportManagerDeviceListener will be called from that thread.
+Transport Manager uses one thread to operate with all device-related callbacks. In other word all callbacks declared in ns_smart_device_link::ns_transport_manager::ITransportManagerDeviceListener will be called from that thread.
-For every active connection one service thread will be created. This thread will be used for all connection-related callbacks. Therefore every implementation of NsSmartDeviceLink::NsTransportManager::ITransportManagerDataListener will be called in separated thread that allows client to support multiple connection simultaneously.
+For every active connection one service thread will be created. This thread will be used for all connection-related callbacks. Therefore every implementation of ns_smart_device_link::ns_transport_manager::ITransportManagerDataListener will be called in separated thread that allows client to support multiple connection simultaneously.
*/
diff --git a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt
index c96fd46a22..164fad9140 100644
--- a/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt
+++ b/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/TrasportManager.txt
@@ -2,13 +2,13 @@
Actually Transport Manager component is implemented as classical manager component. It manages connections and abstract devices and provides unified information for the clients.
-Connection-related information encapsulated in structure NsSmartDeviceLink::NsTransportManager::CTransportManager::SConnectionInfo. Transport Manager manages these structures to store information about every active connection.
+Connection-related information encapsulated in structure ns_smart_device_link::ns_transport_manager::CTransportManager::SConnectionInfo. Transport Manager manages these structures to store information about every active connection.
-Frame processing encapsulated in structure NsSmartDeviceLink::NsTransportManager::CTransportManager::SFrameDataForConnection. Transport Manager manages these structures to store information related to data for specific connection.
+Frame processing encapsulated in structure ns_smart_device_link::ns_transport_manager::CTransportManager::SFrameDataForConnection. Transport Manager manages these structures to store information related to data for specific connection.
Callback information between transport manager threads passed in form of special structures:
-NsSmartDeviceLink::NsTransportManager::CTransportManager::SDeviceListenerCallback.
-NsSmartDeviceLink::NsTransportManager::CTransportManager::SDataListenerCallback.
+ns_smart_device_link::ns_transport_manager::CTransportManager::SDeviceListenerCallback.
+ns_smart_device_link::ns_transport_manager::CTransportManager::SDataListenerCallback.
Client calls to TM guarded by separate mutex. This allows use component from different threads without any risk.
diff --git a/src/components/policy/policy_regular/doc/doxygen/components/JSONHandler/Formatters/index.txt b/src/components/policy/policy_regular/doc/doxygen/components/JSONHandler/Formatters/index.txt
index 9854b88d5f..0144efaf7f 100644
--- a/src/components/policy/policy_regular/doc/doxygen/components/JSONHandler/Formatters/index.txt
+++ b/src/components/policy/policy_regular/doc/doxygen/components/JSONHandler/Formatters/index.txt
@@ -1,9 +1,9 @@
-/*! \page components_jsonhandler_formatters Smart Objects Formatters
+/*! \page components_jsonhandler_formatters Smart Objects formatters
In order to create JSON string representation from Smart Object or create Smart Object data structure from JSON string representation JSON Handler component has special classes called formatters.
-The interface of formatter is quite simple and defined by NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase class. Actually it has two methods - NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::objToJsonValue to convert JSON string to object and NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase::jsonValueToObj to create JSON string from object.
+The interface of formatter is quite simple and defined by ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase class. Actually it has two methods - ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::objToJsonValue to convert JSON string to object and ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::jsonValueToObj to create JSON string from object.
-Current implementation has two different implementations of NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonBase class: NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonALRPCv1 for ALRPC.v1 and NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonALRPCv2 for ALRPC.v2. These implementations handle specifics of each format.
+Current implementation has two different implementations of ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase class: ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonALRPCv1 for ALRPC.v1 and ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonALRPCv2 for ALRPC.v2. These implementations handle specifics of each format.
*/
diff --git a/src/components/smart_objects/include/smart_objects/always_false_schema_item.h b/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
index a6cd1cb4ed..bfa39af10a 100644
--- a/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/always_false_schema_item.h
@@ -35,8 +35,8 @@
#include "smart_objects/schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Always false schema item.
**/
@@ -53,9 +53,9 @@ class CAlwaysFalseSchemaItem : public ISchemaItem {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -64,6 +64,6 @@ class CAlwaysFalseSchemaItem : public ISchemaItem {
CAlwaysFalseSchemaItem();
DISALLOW_COPY_AND_ASSIGN(CAlwaysFalseSchemaItem);
};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_FALSE_SCHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/always_true_schema_item.h b/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
index 5651cffc9e..4750c280e5 100644
--- a/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/always_true_schema_item.h
@@ -35,8 +35,8 @@
#include "smart_objects/schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Always true schema item.
**/
@@ -53,9 +53,9 @@ class CAlwaysTrueSchemaItem : public ISchemaItem {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -64,6 +64,6 @@ class CAlwaysTrueSchemaItem : public ISchemaItem {
CAlwaysTrueSchemaItem();
DISALLOW_COPY_AND_ASSIGN(CAlwaysTrueSchemaItem);
};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ALWAYS_TRUE_SCHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/array_schema_item.h b/src/components/smart_objects/include/smart_objects/array_schema_item.h
index d92283ba76..a81fdd637e 100644
--- a/src/components/smart_objects/include/smart_objects/array_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/array_schema_item.h
@@ -40,8 +40,8 @@
#include "utils/semantic_version.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Array schema item.
**/
@@ -68,9 +68,9 @@ class CArraySchemaItem : public ISchemaItem {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -130,7 +130,7 @@ class CArraySchemaItem : public ISchemaItem {
const TSchemaItemParameter<size_t> mMaxSize;
DISALLOW_COPY_AND_ASSIGN(CArraySchemaItem);
};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ARRAY_SCHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/bool_schema_item.h b/src/components/smart_objects/include/smart_objects/bool_schema_item.h
index 14bca2f487..3a9f6c929d 100644
--- a/src/components/smart_objects/include/smart_objects/bool_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/bool_schema_item.h
@@ -35,8 +35,8 @@
#include "smart_objects/default_shema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Bool schema item.
**/
@@ -59,6 +59,6 @@ class CBoolSchemaItem : public CDefaultSchemaItem<bool> {
private:
DISALLOW_COPY_AND_ASSIGN(CBoolSchemaItem);
};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_BOOL_SCHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/default_shema_item.h b/src/components/smart_objects/include/smart_objects/default_shema_item.h
index 2b0802ee7e..5978fcb282 100644
--- a/src/components/smart_objects/include/smart_objects/default_shema_item.h
+++ b/src/components/smart_objects/include/smart_objects/default_shema_item.h
@@ -38,8 +38,8 @@
#include "smart_objects/schema_item_parameter.h"
#include "smart_objects/smart_object.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Default schema item.
@@ -53,9 +53,9 @@ class CDefaultSchemaItem : public ISchemaItem {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -102,7 +102,7 @@ CDefaultSchemaItem<Type>::CDefaultSchemaItem(const ParameterType& DefaultValue)
: mDefaultValue(DefaultValue) {}
template <typename Type>
-Errors::eType CDefaultSchemaItem<Type>::validate(
+errors::eType CDefaultSchemaItem<Type>::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
@@ -112,9 +112,9 @@ Errors::eType CDefaultSchemaItem<Type>::validate(
", got: " +
SmartObject::typeToString(Object.getType());
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
} else {
- return Errors::OK;
+ return errors::OK;
}
}
@@ -140,6 +140,6 @@ void CDefaultSchemaItem<Type>::BuildObjectBySchema(
}
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_DEFAULT_SHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/enum_schema_item.h b/src/components/smart_objects/include/smart_objects/enum_schema_item.h
index 52301656e1..cbba5bd7cd 100644
--- a/src/components/smart_objects/include/smart_objects/enum_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/enum_schema_item.h
@@ -44,8 +44,8 @@
#include "utils/semantic_version.h"
#include <boost/optional.hpp>
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
struct ElementSignature {
boost::optional<utils::SemanticVersion> mSince;
@@ -108,9 +108,9 @@ class TEnumSchemaItem : public CDefaultSchemaItem<EnumType> {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -304,7 +304,7 @@ const ElementSignature TEnumSchemaItem<EnumType>::getSignature(
}
template <typename EnumType>
-Errors::eType TEnumSchemaItem<EnumType>::validate(
+errors::eType TEnumSchemaItem<EnumType>::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
@@ -319,7 +319,7 @@ Errors::eType TEnumSchemaItem<EnumType>::validate(
SmartObject::typeToString(Object.getType());
}
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
}
auto elements_it =
@@ -330,7 +330,7 @@ Errors::eType TEnumSchemaItem<EnumType>::validate(
stream << "Invalid enum value: " << Object.asInt();
std::string validation_info = stream.str();
report__->set_validation_info(validation_info);
- return Errors::OUT_OF_RANGE;
+ return errors::OUT_OF_RANGE;
}
// Element exists in schema. Check if version is also valid.
@@ -347,7 +347,7 @@ Errors::eType TEnumSchemaItem<EnumType>::validate(
" removed for SyncMsgVersion " +
MessageVersion.toString();
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
} else if (signature.mSince == boost::none &&
signature.mUntil == boost::none) {
// Element does not exist for this version
@@ -355,12 +355,12 @@ Errors::eType TEnumSchemaItem<EnumType>::validate(
" does not exist for SyncMsgVersion " +
MessageVersion.toString();
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
}
}
}
}
- return Errors::OK;
+ return errors::OK;
}
template <typename EnumType>
@@ -412,6 +412,6 @@ TEnumSchemaItem<EnumType>::TEnumSchemaItem(
, mAllowedElements(AllowedElements)
, mElementSignatures(ElementSignatures) {}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ENUM_SCHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/errors.h b/src/components/smart_objects/include/smart_objects/errors.h
index 5d22d2386e..8fc73be049 100644
--- a/src/components/smart_objects/include/smart_objects/errors.h
+++ b/src/components/smart_objects/include/smart_objects/errors.h
@@ -31,9 +31,9 @@
#ifndef SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ERRORS_H_
#define SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ERRORS_H_
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
-namespace Errors {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
+namespace errors {
/**
* @brief Enumeration that provides information about SmartObject validation
*errors
@@ -64,8 +64,8 @@ enum eType {
**/
ERROR
};
-} // namespace Errors
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace errors
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_ERRORS_H_
diff --git a/src/components/smart_objects/include/smart_objects/number_schema_item.h b/src/components/smart_objects/include/smart_objects/number_schema_item.h
index dff3617246..6481605daf 100644
--- a/src/components/smart_objects/include/smart_objects/number_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/number_schema_item.h
@@ -41,8 +41,8 @@
#include "utils/convert_utils.h"
#include "utils/helpers.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Number schema item.
* @tparam NumberType Number type.
@@ -70,9 +70,9 @@ class TNumberSchemaItem : public CDefaultSchemaItem<NumberType> {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -134,7 +134,7 @@ bool TNumberSchemaItem<NumberType>::isValidNumberType(SmartType type) {
}
template <typename NumberType>
-Errors::eType TNumberSchemaItem<NumberType>::validate(
+errors::eType TNumberSchemaItem<NumberType>::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
@@ -146,7 +146,7 @@ Errors::eType TNumberSchemaItem<NumberType>::validate(
"Incorrect type, expected: " + SmartObject::typeToString(expectedType) +
", got: " + SmartObject::typeToString(Object.getType());
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
}
NumberType value(0);
if (typeid(int32_t) == typeid(value)) {
@@ -170,7 +170,7 @@ Errors::eType TNumberSchemaItem<NumberType>::validate(
<< ", minimum allowed: " << rangeLimit;
std::string validation_info = stream.str();
report__->set_validation_info(validation_info);
- return Errors::OUT_OF_RANGE;
+ return errors::OUT_OF_RANGE;
}
if (mMaxValue.getValue(rangeLimit) && (value > rangeLimit)) {
@@ -179,9 +179,9 @@ Errors::eType TNumberSchemaItem<NumberType>::validate(
<< ", maximum allowed: " << rangeLimit;
std::string validation_info = stream.str();
report__->set_validation_info(validation_info);
- return Errors::OUT_OF_RANGE;
+ return errors::OUT_OF_RANGE;
}
- return Errors::OK;
+ return errors::OK;
}
template <typename NumberType>
@@ -219,6 +219,6 @@ SmartType TNumberSchemaItem<int64_t>::getSmartType() const;
template <>
SmartType TNumberSchemaItem<double>::getSmartType() const;
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_NUMBER_SCHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/object_schema_item.h b/src/components/smart_objects/include/smart_objects/object_schema_item.h
index ddb34ea518..45d161320b 100644
--- a/src/components/smart_objects/include/smart_objects/object_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/object_schema_item.h
@@ -43,8 +43,8 @@
#include "smart_objects/schema_item.h"
#include "smart_objects/schema_item_parameter.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Object schema item.
**/
@@ -109,9 +109,9 @@ class CObjectSchemaItem : public ISchemaItem {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -174,6 +174,6 @@ class CObjectSchemaItem : public ISchemaItem {
const Members mMembers;
DISALLOW_COPY_AND_ASSIGN(CObjectSchemaItem);
};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_OBJECT_SCHEMA_ITEM_H_
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 5626b0cf23..24c642c0ba 100644
--- a/src/components/smart_objects/include/smart_objects/schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/schema_item.h
@@ -43,8 +43,8 @@
#include "utils/macro.h"
#include "utils/semantic_version.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
class SmartObject;
/**
@@ -59,9 +59,9 @@ class ISchemaItem {
* @param report__ object for reporting errors during validation
* message if an error occurs
* @param MessageVersion to check mobile RPC version against RPC Spec Histor
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- virtual Errors::eType validate(
+ virtual errors::eType validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion());
@@ -92,7 +92,7 @@ class ISchemaItem {
* from smart object otherwise contains false.
**/
virtual void applySchema(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& Object,
+ ns_smart_device_link::ns_smart_objects::SmartObject& Object,
const bool RemoveFakeParameters,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion());
@@ -102,7 +102,7 @@ class ISchemaItem {
* @param Object Object to unapply schema.
**/
virtual void unapplySchema(
- NsSmartDeviceLink::NsSmartObjects::SmartObject& Object);
+ ns_smart_device_link::ns_smart_objects::SmartObject& Object);
/**
* @brief Build smart object by smart schema having copied matched
@@ -124,6 +124,6 @@ class ISchemaItem {
virtual ~ISchemaItem() {}
};
typedef std::shared_ptr<ISchemaItem> ISchemaItemPtr;
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_H_
diff --git a/src/components/smart_objects/include/smart_objects/schema_item_parameter.h b/src/components/smart_objects/include/smart_objects/schema_item_parameter.h
index 49fdb9541b..f747b0ae89 100644
--- a/src/components/smart_objects/include/smart_objects/schema_item_parameter.h
+++ b/src/components/smart_objects/include/smart_objects/schema_item_parameter.h
@@ -34,8 +34,8 @@
#include "utils/macro.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief SchemaItem parameter.
* Container for schema item parameter such as min/max value, size,
@@ -95,6 +95,6 @@ bool TSchemaItemParameter<ParameterType>::getValue(ParameterType& Value) const {
}
return mIsSpecified;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SCHEMA_ITEM_PARAMETER_H_
diff --git a/src/components/smart_objects/include/smart_objects/smart_object.h b/src/components/smart_objects/include/smart_objects/smart_object.h
index 022dc6cb13..2abc221972 100644
--- a/src/components/smart_objects/include/smart_objects/smart_object.h
+++ b/src/components/smart_objects/include/smart_objects/smart_object.h
@@ -43,8 +43,8 @@
#include "utils/custom_string.h"
#include "rpc_base/validation_report.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
namespace custom_str = utils::custom_string;
@@ -678,7 +678,7 @@ class SmartObject FINAL {
* @param messageVersion of the mobile app to check against RPC Spec Schema
* @return Result of validation.
*/
- Errors::eType validate(
+ errors::eType validate(
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion = utils::SemanticVersion());
@@ -700,7 +700,7 @@ class SmartObject FINAL {
/**
* @brief Returns current object type
*
- * @return NsSmartObjects::SmartType
+ * @return ns_smart_objects::SmartType
**/
SmartType getType() const;
@@ -1049,9 +1049,9 @@ static SmartObject invalid_object_value(SmartType_Invalid);
* @brief Value that is used as invalid value for object type
**/
static const SmartBinary invalid_binary_value;
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
-namespace smart_objects = NsSmartDeviceLink::NsSmartObjects;
+namespace smart_objects = ns_smart_device_link::ns_smart_objects;
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_OBJECT_H_
diff --git a/src/components/smart_objects/include/smart_objects/smart_schema.h b/src/components/smart_objects/include/smart_objects/smart_schema.h
index 80a85e1778..5e1497fdde 100644
--- a/src/components/smart_objects/include/smart_objects/smart_schema.h
+++ b/src/components/smart_objects/include/smart_objects/smart_schema.h
@@ -35,8 +35,8 @@
#include "utils/macro.h"
#include "smart_objects/schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
class SmartObject;
/**
@@ -66,9 +66,9 @@ class CSmartSchema FINAL {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& messageVersion =
utils::SemanticVersion()) const;
@@ -118,6 +118,6 @@ class CSmartSchema FINAL {
*/
ISchemaItemPtr mSchemaItem;
};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_SMART_OBJECTS_INCLUDE_SMART_OBJECTS_SMART_SCHEMA_H_
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 709cf7d568..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
@@ -39,8 +39,8 @@
#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.
**/
@@ -65,9 +65,9 @@ class CStringSchemaItem : public CDefaultSchemaItem<std::string> {
* @param Object Object to validate.
* @param report__ object for reporting errors during validation
* @param MessageVersion to check mobile RPC version against RPC Spec History
- * @return NsSmartObjects::Errors::eType
+ * @return ns_smart_objects::errors::eType
**/
- Errors::eType validate(const SmartObject& Object,
+ errors::eType validate(const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion =
utils::SemanticVersion()) OVERRIDE;
@@ -90,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_
diff --git a/src/components/smart_objects/src/always_false_schema_item.cc b/src/components/smart_objects/src/always_false_schema_item.cc
index 9975085b79..ca247eed09 100644
--- a/src/components/smart_objects/src/always_false_schema_item.cc
+++ b/src/components/smart_objects/src/always_false_schema_item.cc
@@ -32,8 +32,8 @@
#include "smart_objects/always_false_schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
CAlwaysFalseSchemaItem::CAlwaysFalseSchemaItem() {}
@@ -41,13 +41,13 @@ std::shared_ptr<CAlwaysFalseSchemaItem> CAlwaysFalseSchemaItem::create() {
return std::shared_ptr<CAlwaysFalseSchemaItem>(new CAlwaysFalseSchemaItem());
}
-Errors::eType CAlwaysFalseSchemaItem::validate(
+errors::eType CAlwaysFalseSchemaItem::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
report__->set_validation_info("Generic error");
- return Errors::ERROR;
+ return errors::ERROR;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/always_true_schema_item.cc b/src/components/smart_objects/src/always_true_schema_item.cc
index 93c20c9bce..983733165c 100644
--- a/src/components/smart_objects/src/always_true_schema_item.cc
+++ b/src/components/smart_objects/src/always_true_schema_item.cc
@@ -30,8 +30,8 @@
#include "smart_objects/always_true_schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
CAlwaysTrueSchemaItem::CAlwaysTrueSchemaItem() {}
@@ -39,12 +39,12 @@ std::shared_ptr<CAlwaysTrueSchemaItem> CAlwaysTrueSchemaItem::create() {
return std::shared_ptr<CAlwaysTrueSchemaItem>(new CAlwaysTrueSchemaItem());
}
-Errors::eType CAlwaysTrueSchemaItem::validate(
+errors::eType CAlwaysTrueSchemaItem::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
- return Errors::OK;
+ return errors::OK;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/array_schema_item.cc b/src/components/smart_objects/src/array_schema_item.cc
index 56a52da761..7d5f8bcf84 100644
--- a/src/components/smart_objects/src/array_schema_item.cc
+++ b/src/components/smart_objects/src/array_schema_item.cc
@@ -31,8 +31,8 @@
#include "smart_objects/array_schema_item.h"
#include "smart_objects/smart_object.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
std::shared_ptr<CArraySchemaItem> CArraySchemaItem::create(
const ISchemaItemPtr ElementSchemaItem,
@@ -42,7 +42,7 @@ std::shared_ptr<CArraySchemaItem> CArraySchemaItem::create(
new CArraySchemaItem(ElementSchemaItem, MinSize, MaxSize));
}
-Errors::eType CArraySchemaItem::validate(
+errors::eType CArraySchemaItem::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
@@ -52,7 +52,7 @@ Errors::eType CArraySchemaItem::validate(
", got: " +
SmartObject::typeToString(Object.getType());
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
}
size_t sizeLimit;
const size_t array_len = Object.length();
@@ -63,7 +63,7 @@ Errors::eType CArraySchemaItem::validate(
<< ", minimum allowed: " << sizeLimit;
std::string validation_info = stream.str();
report__->set_validation_info(validation_info);
- return Errors::OUT_OF_RANGE;
+ return errors::OUT_OF_RANGE;
}
if (mMaxSize.getValue(sizeLimit) && (array_len > sizeLimit)) {
std::stringstream stream;
@@ -71,21 +71,21 @@ Errors::eType CArraySchemaItem::validate(
<< ", maximum allowed: " << sizeLimit;
std::string validation_info = stream.str();
report__->set_validation_info(validation_info);
- return Errors::OUT_OF_RANGE;
+ return errors::OUT_OF_RANGE;
}
for (size_t i = 0u; i < array_len; ++i) {
std::stringstream strVal;
strVal << i;
- const Errors::eType result =
+ const errors::eType result =
mElementSchemaItem->validate(Object.getElement(i),
&report__->ReportSubobject(strVal.str()),
MessageVersion);
- if (Errors::OK != result) {
+ if (errors::OK != result) {
return result;
}
}
- return Errors::OK;
+ return errors::OK;
}
void CArraySchemaItem::applySchema(
@@ -131,5 +131,5 @@ CArraySchemaItem::CArraySchemaItem(const ISchemaItemPtr ElementSchemaItem,
, mMinSize(MinSize)
, mMaxSize(MaxSize) {}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/bool_schema_item.cc b/src/components/smart_objects/src/bool_schema_item.cc
index dcf1e13918..a4875a1b24 100644
--- a/src/components/smart_objects/src/bool_schema_item.cc
+++ b/src/components/smart_objects/src/bool_schema_item.cc
@@ -32,8 +32,8 @@
#include "smart_objects/bool_schema_item.h"
#include "smart_objects/smart_object.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
std::shared_ptr<CBoolSchemaItem> CBoolSchemaItem::create(
const TSchemaItemParameter<bool>& DefaultValue) {
@@ -51,5 +51,5 @@ bool CBoolSchemaItem::getDefaultValue() const {
return false;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/number_schema_item.cc b/src/components/smart_objects/src/number_schema_item.cc
index 9789434523..c383f6ecca 100644
--- a/src/components/smart_objects/src/number_schema_item.cc
+++ b/src/components/smart_objects/src/number_schema_item.cc
@@ -31,8 +31,8 @@
*/
#include "smart_objects/number_schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
template <>
SmartType TNumberSchemaItem<int32_t>::getSmartType() const {
@@ -54,5 +54,5 @@ SmartType TNumberSchemaItem<double>::getSmartType() const {
return SmartType_Double;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/object_schema_item.cc b/src/components/smart_objects/src/object_schema_item.cc
index cfe6f58efa..e0324d841e 100644
--- a/src/components/smart_objects/src/object_schema_item.cc
+++ b/src/components/smart_objects/src/object_schema_item.cc
@@ -41,8 +41,8 @@ const char connection_key[] = "connection_key";
const char binary_data[] = "binary_data";
const char app_id[] = "appID";
}
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
CObjectSchemaItem::SMember::SMember()
: mSchemaItem(CAlwaysFalseSchemaItem::create()), mIsMandatory(true) {}
@@ -104,7 +104,7 @@ std::shared_ptr<CObjectSchemaItem> CObjectSchemaItem::create(
return std::shared_ptr<CObjectSchemaItem>(new CObjectSchemaItem(members));
}
-Errors::eType CObjectSchemaItem::validate(
+errors::eType CObjectSchemaItem::validate(
const SmartObject& object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
@@ -114,7 +114,7 @@ Errors::eType CObjectSchemaItem::validate(
", got: " +
SmartObject::typeToString(object.getType());
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
}
std::set<std::string> object_keys = object.enumerate();
@@ -131,22 +131,22 @@ Errors::eType CObjectSchemaItem::validate(
correct_member.mIsRemoved == false) {
std::string validation_info = "Missing mandatory parameter: " + key;
report__->set_validation_info(validation_info);
- return Errors::MISSING_MANDATORY_PARAMETER;
+ return errors::MISSING_MANDATORY_PARAMETER;
}
continue;
}
const SmartObject& field = object.getElement(key);
- Errors::eType result = Errors::OK;
+ errors::eType result = errors::OK;
// Check if MessageVersion matches schema version
result = correct_member.mSchemaItem->validate(
field, &report__->ReportSubobject(key), MessageVersion);
- if (Errors::OK != result) {
+ if (errors::OK != result) {
return result;
}
object_keys.erase(key_it);
}
- return Errors::OK;
+ return errors::OK;
}
void CObjectSchemaItem::applySchema(
@@ -271,5 +271,5 @@ const CObjectSchemaItem::SMember& CObjectSchemaItem::GetCorrectMember(
return member;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/schema_item.cc b/src/components/smart_objects/src/schema_item.cc
index a47fe4d1fb..5e9358092a 100644
--- a/src/components/smart_objects/src/schema_item.cc
+++ b/src/components/smart_objects/src/schema_item.cc
@@ -32,14 +32,14 @@
#include "smart_objects/schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
-Errors::eType ISchemaItem::validate(
+errors::eType ISchemaItem::validate(
const SmartObject& object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
- return Errors::ERROR;
+ return errors::ERROR;
}
bool ISchemaItem::setDefaultValue(SmartObject& Object) {
@@ -63,5 +63,5 @@ size_t ISchemaItem::GetMemberSize() {
return 0;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/smart_object.cc b/src/components/smart_objects/src/smart_object.cc
index cf6f290971..1322757ab1 100644
--- a/src/components/smart_objects/src/smart_object.cc
+++ b/src/components/smart_objects/src/smart_object.cc
@@ -42,8 +42,8 @@
#include <iterator>
#include <limits>
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
/**
* @brief Value that is used as invalid value for string type
@@ -491,7 +491,7 @@ std::string SmartObject::convert_string() const {
default:
break;
}
- return NsSmartDeviceLink::NsSmartObjects::invalid_cstr_value;
+ return ns_smart_device_link::ns_smart_objects::invalid_cstr_value;
}
custom_str::CustomString SmartObject::convert_custom_string() const {
@@ -870,10 +870,10 @@ bool SmartObject::erase(const std::string& Key) {
bool SmartObject::isValid() const {
rpc::ValidationReport report("RPC");
- return (Errors::OK == m_schema.validate(*this, &report));
+ return (errors::OK == m_schema.validate(*this, &report));
}
-Errors::eType SmartObject::validate(
+errors::eType SmartObject::validate(
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
return m_schema.validate(*this, report__, MessageVersion);
@@ -887,5 +887,5 @@ CSmartSchema SmartObject::getSchema() {
return m_schema;
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/smart_schema.cc b/src/components/smart_objects/src/smart_schema.cc
index 62f2101f03..f7cd22c4bc 100644
--- a/src/components/smart_objects/src/smart_schema.cc
+++ b/src/components/smart_objects/src/smart_schema.cc
@@ -32,15 +32,15 @@
#include "smart_objects/smart_schema.h"
#include "smart_objects/always_true_schema_item.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
CSmartSchema::CSmartSchema() : mSchemaItem(CAlwaysTrueSchemaItem::create()) {}
CSmartSchema::CSmartSchema(const ISchemaItemPtr SchemaItem)
: mSchemaItem(SchemaItem) {}
-Errors::eType CSmartSchema::validate(
+errors::eType CSmartSchema::validate(
const SmartObject& object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) const {
@@ -66,5 +66,5 @@ void CSmartSchema::BuildObjectBySchema(const SmartObject& pattern_object,
mSchemaItem->BuildObjectBySchema(pattern_object, result_object);
}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/src/string_schema_item.cc b/src/components/smart_objects/src/string_schema_item.cc
index 936db7dbc9..0288ad85e8 100644
--- a/src/components/smart_objects/src/string_schema_item.cc
+++ b/src/components/smart_objects/src/string_schema_item.cc
@@ -33,8 +33,8 @@
#include "smart_objects/string_schema_item.h"
#include "utils/custom_string.h"
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
namespace custom_str = utils::custom_string;
@@ -46,7 +46,7 @@ std::shared_ptr<CStringSchemaItem> CStringSchemaItem::create(
new CStringSchemaItem(MinLength, MaxLength, DefaultValue));
}
-Errors::eType CStringSchemaItem::validate(
+errors::eType CStringSchemaItem::validate(
const SmartObject& Object,
rpc::ValidationReport* report__,
const utils::SemanticVersion& MessageVersion) {
@@ -56,7 +56,7 @@ Errors::eType CStringSchemaItem::validate(
", got: " +
SmartObject::typeToString(Object.getType());
report__->set_validation_info(validation_info);
- return Errors::INVALID_VALUE;
+ return errors::INVALID_VALUE;
}
const custom_str::CustomString value = Object.asCustomString();
@@ -68,7 +68,7 @@ Errors::eType CStringSchemaItem::validate(
<< ", minimum allowed: " << length;
std::string validation_info = stream.str();
report__->set_validation_info(validation_info);
- return Errors::OUT_OF_RANGE;
+ return errors::OUT_OF_RANGE;
}
if (mMaxLength.getValue(length) && (value.size() > length)) {
std::stringstream stream;
@@ -76,9 +76,9 @@ Errors::eType CStringSchemaItem::validate(
<< ", maximum allowed: " << length;
std::string validation_info = stream.str();
report__->set_validation_info(validation_info);
- return Errors::OUT_OF_RANGE;
+ return errors::OUT_OF_RANGE;
}
- return Errors::OK;
+ return errors::OK;
}
SmartType CStringSchemaItem::getSmartType() const {
@@ -97,5 +97,5 @@ CStringSchemaItem::CStringSchemaItem(
, mMinLength(MinLength)
, mMaxLength(MaxLength) {}
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc b/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc
index 9d88178598..1f514672fd 100644
--- a/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc
+++ b/src/components/smart_objects/test/AlwaysFalseSchemaItem_test.cc
@@ -41,7 +41,7 @@ namespace test {
namespace components {
namespace smart_object_test {
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
/**
* Test AlwaysFalseSchemaItem
@@ -54,38 +54,38 @@ TEST(test_AlwaysFalseSchemaItemTest, simple_test) {
obj = 5;
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
EXPECT_EQ(5, obj.asInt());
obj = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
EXPECT_TRUE(obj.asBool());
obj = "Test";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
EXPECT_EQ(std::string("Test"), obj.asString());
obj["First"] = "Some string";
obj["Second"] = 555;
resultType = item->validate(obj["First"], &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
resultType = item->validate(obj["Second"], &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
EXPECT_EQ(std::string("Some string"), obj["First"].asString());
EXPECT_EQ(555, obj["Second"].asInt());
obj[0] = true;
obj[1] = false;
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::ERROR, resultType);
+ EXPECT_EQ(errors::ERROR, resultType);
EXPECT_TRUE(obj[0].asBool());
EXPECT_FALSE(obj[1].asBool());
}
diff --git a/src/components/smart_objects/test/AlwaysTrueSchemaItem_test.cc b/src/components/smart_objects/test/AlwaysTrueSchemaItem_test.cc
index 40c827e17b..7f26a4968a 100644
--- a/src/components/smart_objects/test/AlwaysTrueSchemaItem_test.cc
+++ b/src/components/smart_objects/test/AlwaysTrueSchemaItem_test.cc
@@ -41,7 +41,7 @@ namespace test {
namespace components {
namespace smart_object_test {
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
/**
* Test AlwaysTrueSchemaItem
@@ -54,38 +54,38 @@ TEST(test_AlwaysTrueSchemaItemTest, simple_test) {
obj = 5;
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(5, obj.asInt());
obj = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_TRUE(obj.asBool());
obj = "Test";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(std::string("Test"), obj.asString());
obj["First"] = "Some string";
obj["Second"] = 555;
resultType = item->validate(obj["First"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["Second"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(std::string("Some string"), obj["First"].asString());
EXPECT_EQ(555, obj["Second"].asInt());
obj[0] = true;
obj[1] = false;
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_TRUE(obj[0].asBool());
EXPECT_FALSE(obj[1].asBool());
}
diff --git a/src/components/smart_objects/test/ArraySchemaItem_test.cc b/src/components/smart_objects/test/ArraySchemaItem_test.cc
index 9831f08442..28f435ee43 100644
--- a/src/components/smart_objects/test/ArraySchemaItem_test.cc
+++ b/src/components/smart_objects/test/ArraySchemaItem_test.cc
@@ -46,7 +46,7 @@ namespace smart_object_test {
* Test ArraySchemaItem no schema item, no min and max size
**/
TEST(test_no_default_value, test_ArraySchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item =
@@ -68,28 +68,28 @@ TEST(test_no_default_value, test_ArraySchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
item->applySchema(obj, false);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(38, obj[0].asInt());
EXPECT_TRUE(obj[1].asBool());
@@ -103,19 +103,19 @@ TEST(test_no_default_value, test_ArraySchemaItemTest) {
ASSERT_EQ(std::string("New valid string"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
// Obj - bool
obj = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
// Object - number
obj = 3.1415926;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
}
/**
@@ -125,7 +125,7 @@ TEST(test_no_default_value, test_ArraySchemaItemTest) {
* only if all array elements are valid schema item objects
**/
TEST(test_item_with_default_value, test_ArraySchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CArraySchemaItem::create(); // No min and max size
@@ -140,24 +140,24 @@ TEST(test_item_with_default_value, test_ArraySchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
item->applySchema(obj, false);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
EXPECT_EQ(std::string("Some String"), obj[0].asString());
EXPECT_EQ(std::string("true"), obj[1].asString());
@@ -172,21 +172,21 @@ TEST(test_item_with_default_value, test_ArraySchemaItemTest) {
EXPECT_EQ(std::string("Another String"), obj[3][2].asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj[3][3] = "Another very very loooooong String";
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
/**
* Test ArraySchemaItem with min size
**/
TEST(test_array_with_min_size, test_ArraySchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CArraySchemaItem::create(
@@ -197,17 +197,17 @@ TEST(test_array_with_min_size, test_ArraySchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
obj[1] = "true";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
obj[2] = "New String";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
EXPECT_EQ(std::string("Some String"), obj[0].asString());
EXPECT_EQ(std::string("true"), obj[1].asString());
@@ -218,7 +218,7 @@ TEST(test_array_with_min_size, test_ArraySchemaItemTest) {
* Test ArraySchemaItem with min size
**/
TEST(test_array_with_max_size, test_ArraySchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CArraySchemaItem::create(
@@ -231,22 +231,22 @@ TEST(test_array_with_max_size, test_ArraySchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj[1] = "true";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj[2] = "New String";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj[3] = "Another String";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
EXPECT_EQ(std::string("Some String"), obj[0].asString());
EXPECT_EQ(std::string("true"), obj[1].asString());
@@ -258,7 +258,7 @@ TEST(test_array_with_max_size, test_ArraySchemaItemTest) {
* Test ArraySchemaItem with min and max size
**/
TEST(test_array_with_min_and_max_size, test_ArraySchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CArraySchemaItem::create(
@@ -271,27 +271,27 @@ TEST(test_array_with_min_and_max_size, test_ArraySchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
obj[1] = "true";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj[2] = "New String";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj[3] = "Another String";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj[4] = "Out of array";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
EXPECT_EQ(std::string("Some String"), obj[0].asString());
EXPECT_EQ(std::string("true"), obj[1].asString());
@@ -301,7 +301,7 @@ TEST(test_array_with_min_and_max_size, test_ArraySchemaItemTest) {
}
TEST(test_map_validate, test_ArraySchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CArraySchemaItem::create(
@@ -314,29 +314,29 @@ TEST(test_map_validate, test_ArraySchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj["array"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
obj["array"][1] = "true";
resultType = item->validate(obj["array"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj["array"][2] = "New String";
resultType = item->validate(obj["array"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj["array"][3] = "Another String";
resultType = item->validate(obj["array"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
obj["array"][4] = "Out of array";
resultType = item->validate(obj["array"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
EXPECT_EQ(std::string("Some String"), obj["array"][0].asString());
EXPECT_EQ(std::string("true"), obj["array"][1].asString());
diff --git a/src/components/smart_objects/test/BoolSchemaItem_test.cc b/src/components/smart_objects/test/BoolSchemaItem_test.cc
index faad0bf4bb..ed0043925b 100644
--- a/src/components/smart_objects/test/BoolSchemaItem_test.cc
+++ b/src/components/smart_objects/test/BoolSchemaItem_test.cc
@@ -41,7 +41,7 @@ namespace test {
namespace components {
namespace smart_object_test {
-using NsSmartDeviceLink::NsSmartObjects::ISchemaItemPtr;
+using ns_smart_device_link::ns_smart_objects::ISchemaItemPtr;
/**
* Test BoolSchemaItem no default value
@@ -51,26 +51,26 @@ using NsSmartDeviceLink::NsSmartObjects::ISchemaItemPtr;
* and leave SmartObject in previous state.
**/
TEST(test_no_default_value, test_BoolSchemaItemTest) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject obj;
+ ns_smart_device_link::ns_smart_objects::SmartObject obj;
ISchemaItemPtr item =
- NsSmartDeviceLink::NsSmartObjects::CBoolSchemaItem::create(); // No
- // default
- // value
+ ns_smart_device_link::ns_smart_objects::CBoolSchemaItem::create(); // No
+ // default
+ // value
obj = 5;
ASSERT_EQ(5, obj.asInt());
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
obj = true;
ASSERT_TRUE(obj.asBool());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
EXPECT_TRUE(obj.asBool());
@@ -79,12 +79,12 @@ TEST(test_no_default_value, test_BoolSchemaItemTest) {
ASSERT_EQ(std::string("Test"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
}
@@ -98,11 +98,11 @@ TEST(test_no_default_value, test_BoolSchemaItemTest) {
*value.
**/
TEST(test_item_with_default_value, test_BoolSchemaItemTest) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject obj;
+ ns_smart_device_link::ns_smart_objects::SmartObject obj;
ISchemaItemPtr item =
- NsSmartDeviceLink::NsSmartObjects::CBoolSchemaItem::create(
- NsSmartDeviceLink::NsSmartObjects::TSchemaItemParameter<bool>(
+ ns_smart_device_link::ns_smart_objects::CBoolSchemaItem::create(
+ ns_smart_device_link::ns_smart_objects::TSchemaItemParameter<bool>(
false)); // Default value = false
obj = 5;
@@ -110,14 +110,14 @@ TEST(test_item_with_default_value, test_BoolSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
obj = true;
ASSERT_TRUE(obj.asBool());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_FALSE(obj.asBool());
@@ -126,22 +126,22 @@ TEST(test_item_with_default_value, test_BoolSchemaItemTest) {
ASSERT_EQ(std::string("Test"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_FALSE(obj.asBool());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
EXPECT_FALSE(obj.asBool());
}
TEST(test_map_validate, test_BoolSchemaItemTest) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject obj;
+ ns_smart_device_link::ns_smart_objects::SmartObject obj;
ISchemaItemPtr item =
- NsSmartDeviceLink::NsSmartObjects::CBoolSchemaItem::create(
- NsSmartDeviceLink::NsSmartObjects::TSchemaItemParameter<bool>(
+ ns_smart_device_link::ns_smart_objects::CBoolSchemaItem::create(
+ ns_smart_device_link::ns_smart_objects::TSchemaItemParameter<bool>(
false)); // Default value = false
obj["aa"] = true;
@@ -149,10 +149,10 @@ TEST(test_map_validate, test_BoolSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj["aa"], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
bool resDefault = item->setDefaultValue(obj["aa"]);
@@ -164,18 +164,18 @@ TEST(test_map_validate, test_BoolSchemaItemTest) {
EXPECT_FALSE(obj.asBool());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
obj["ind"] = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
}
TEST(test_array_validate, test_BoolSchemaItemTest) {
- NsSmartDeviceLink::NsSmartObjects::SmartObject obj;
+ ns_smart_device_link::ns_smart_objects::SmartObject obj;
ISchemaItemPtr item =
- NsSmartDeviceLink::NsSmartObjects::CBoolSchemaItem::create();
+ ns_smart_device_link::ns_smart_objects::CBoolSchemaItem::create();
obj[0] = true;
obj[1] = false;
@@ -185,13 +185,13 @@ TEST(test_array_validate, test_BoolSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj[0], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
bool resDefault = item->setDefaultValue(obj[0]);
@@ -203,13 +203,13 @@ TEST(test_array_validate, test_BoolSchemaItemTest) {
EXPECT_FALSE(obj[1].asBool());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
obj = false;
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
}
} // namespace smart_object_test
diff --git a/src/components/smart_objects/test/CObjectSchemaItem_test.cc b/src/components/smart_objects/test/CObjectSchemaItem_test.cc
index 5a0dcefa10..646e60bf61 100644
--- a/src/components/smart_objects/test/CObjectSchemaItem_test.cc
+++ b/src/components/smart_objects/test/CObjectSchemaItem_test.cc
@@ -46,11 +46,11 @@
#include "formatters/CSmartFactory.h"
#include "utils/semantic_version.h"
-namespace formatters = NsSmartDeviceLink::NsJSONHandler::Formatters;
-namespace smartobj = NsSmartDeviceLink::NsSmartObjects;
+namespace formatters = ns_smart_device_link::ns_json_handler::formatters;
+namespace smartobj = ns_smart_device_link::ns_smart_objects;
-using namespace NsSmartDeviceLink::NsSmartObjects;
-using namespace NsSmartDeviceLink::NsJSONHandler::strings;
+using namespace ns_smart_device_link::ns_smart_objects;
+using namespace ns_smart_device_link::ns_json_handler::strings;
namespace test {
namespace components {
@@ -187,7 +187,7 @@ TEST_F(ObjectSchemaItemTest, validation_correct) {
obj[S_MSG_PARAMS][Keys::SUCCESS] = true;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
}
@@ -202,7 +202,7 @@ TEST_F(ObjectSchemaItemTest, validation_correct_with_new_version) {
utils::SemanticVersion messageVersion(4, 5, 0);
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report, messageVersion));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report, messageVersion));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
}
@@ -217,7 +217,7 @@ TEST_F(ObjectSchemaItemTest, validation_invalid_data_with_old_version) {
utils::SemanticVersion messageVersion(3, 0, 0);
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::MISSING_MANDATORY_PARAMETER,
+ EXPECT_EQ(errors::MISSING_MANDATORY_PARAMETER,
schema_item->validate(obj, &report, messageVersion));
}
@@ -231,7 +231,7 @@ TEST_F(ObjectSchemaItemTest, validation_correct_skip_not_mandatory) {
obj[S_MSG_PARAMS][Keys::SUCCESS] = false;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
}
@@ -241,7 +241,7 @@ TEST_F(ObjectSchemaItemTest, validation_invalid_param) {
obj[S_MSG_PARAMS] = "some message parameters";
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_FUNCTION_ID] = "some function";
@@ -251,33 +251,33 @@ TEST_F(ObjectSchemaItemTest, validation_invalid_param) {
obj[S_MSG_PARAMS][Keys::SUCCESS] = 0xABC;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_FUNCTION_ID] = 1;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_CORRELATION_ID] = -0xFF1;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_PROTOCOL_VERSION] = 2;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_MSG_PARAMS][Keys::RESULT_CODE] = 1;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_MSG_PARAMS][Keys::SUCCESS] = false;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
}
TEST_F(ObjectSchemaItemTest, validation_invalid_not_mandatory_param) {
@@ -291,24 +291,24 @@ TEST_F(ObjectSchemaItemTest, validation_invalid_not_mandatory_param) {
// invalid non-mandatory obj[S_MSG_PARAMS][Keys::INFO]
obj[S_MSG_PARAMS][Keys::INFO] = 0x10;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
// invalid non-mandatory obj[S_MSG_PARAMS][Keys::INFO]
obj[S_MSG_PARAMS][Keys::INFO] = true;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
// invalid non-mandatory obj[S_MSG_PARAMS][Keys::INFO]
obj[S_MSG_PARAMS][Keys::INFO] = SmartObject();
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_MSG_PARAMS][Keys::INFO] = "info";
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
}
@@ -322,27 +322,27 @@ TEST_F(ObjectSchemaItemTest, validation_missing_mandatory) {
obj[S_MSG_PARAMS][Keys::SUCCESS] = false;
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::MISSING_MANDATORY_PARAMETER,
+ EXPECT_EQ(errors::MISSING_MANDATORY_PARAMETER,
schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_FUNCTION_ID] = 2;
// S_CORRELATION_ID and S_PROTOCOL_VERSION is still missed
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::MISSING_MANDATORY_PARAMETER,
+ EXPECT_EQ(errors::MISSING_MANDATORY_PARAMETER,
schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_CORRELATION_ID] = 0XFF2;
// S_PROTOCOL_VERSION is still missed
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::MISSING_MANDATORY_PARAMETER,
+ EXPECT_EQ(errors::MISSING_MANDATORY_PARAMETER,
schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][S_PROTOCOL_VERSION] = 1;
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
}
@@ -362,19 +362,19 @@ TEST_F(ObjectSchemaItemTest, validation_unexpected_param) {
obj[fake1] = SmartObject(static_cast<int64_t>(0));
// any fake parameter is OK
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
obj[S_PARAMS][fake2] = SmartObject("123");
// any fake parameters are OK
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
obj[S_MSG_PARAMS][fake3] = true;
// any fake parameters are OK
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
}
@@ -402,7 +402,7 @@ TEST_F(ObjectSchemaItemTest, validation_unexpected_param_remove) {
EXPECT_TRUE(obj[S_PARAMS].keyExists(fake2));
EXPECT_TRUE(obj[S_MSG_PARAMS].keyExists(fake3));
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
// Check apply schema, remove fake parameter
@@ -417,7 +417,7 @@ TEST_F(ObjectSchemaItemTest, validation_unexpected_param_remove) {
EXPECT_TRUE(obj[S_MSG_PARAMS].keyExists(Keys::INFO));
EXPECT_TRUE(obj[S_MSG_PARAMS].keyExists(Keys::SUCCESS));
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
obj[fake1] = SmartObject(static_cast<int64_t>(0));
@@ -433,7 +433,7 @@ TEST_F(ObjectSchemaItemTest, validation_unexpected_param_remove) {
EXPECT_FALSE(obj[S_MSG_PARAMS].keyExists(fake3));
// Invalide state after enum convertion
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
}
@@ -449,18 +449,18 @@ TEST_F(ObjectSchemaItemTest, validation_empty_params) {
obj[S_MSG_PARAMS]["FAKE_PARAM3"] = SmartObject("2");
rpc::ValidationReport report("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
schema_item->applySchema(obj, false);
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(obj, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
schema_item->unapplySchema(obj);
// Invalide state after enum convertion
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::INVALID_VALUE, schema_item->validate(obj, &report));
+ EXPECT_EQ(errors::INVALID_VALUE, schema_item->validate(obj, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
}
@@ -497,12 +497,12 @@ TEST_F(ObjectSchemaItemTest, test_strings_to_enum_conversion) {
// S_FUNCTION_ID and RESULT_CODE are not converted to int
rpc::ValidationReport report("RPC");
- EXPECT_NE(Errors::OK, schema_item->validate(object, &report));
+ EXPECT_NE(errors::OK, schema_item->validate(object, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
schema_item->applySchema(object, false);
report = rpc::ValidationReport("RPC");
- EXPECT_EQ(Errors::OK, schema_item->validate(object, &report));
+ EXPECT_EQ(errors::OK, schema_item->validate(object, &report));
EXPECT_EQ(std::string(""), rpc::PrettyFormat(report));
// check conversion result
@@ -512,7 +512,7 @@ TEST_F(ObjectSchemaItemTest, test_strings_to_enum_conversion) {
schema_item->unapplySchema(object);
// S_FUNCTION_ID and RESULT_CODE are string
report = rpc::ValidationReport("RPC");
- EXPECT_NE(Errors::OK, schema_item->validate(object, &report));
+ EXPECT_NE(errors::OK, schema_item->validate(object, &report));
EXPECT_NE(std::string(""), rpc::PrettyFormat(report));
// check conversion result
@@ -527,8 +527,8 @@ TEST_F(ObjectSchemaItemTest, test_strings_to_enum_conversion) {
} // namespace components
} // namespace test
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
namespace FunctionID = test::components::smart_object_test::FunctionID;
typedef EnumConversionHelper<FunctionID::eType> FunctionConvertor;
@@ -602,5 +602,5 @@ const ResultType::eType ResultTypeConvertor::enum_values_[] = {
ResultType::USER_DISALLOWED,
ResultType::GENERIC_ERROR,
ResultType::DISALLOWED};
-} // namespace NsSmartObjects
-} // namespace NsSmartDeviceLink
+} // namespace ns_smart_objects
+} // namespace ns_smart_device_link
diff --git a/src/components/smart_objects/test/EnumSchemaItem_test.cc b/src/components/smart_objects/test/EnumSchemaItem_test.cc
index 9914167e5a..edfa563336 100644
--- a/src/components/smart_objects/test/EnumSchemaItem_test.cc
+++ b/src/components/smart_objects/test/EnumSchemaItem_test.cc
@@ -42,7 +42,7 @@ namespace test {
namespace components {
namespace smart_object_test {
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
namespace TestType {
enum eType {
INVALID_ENUM = -1,
@@ -94,7 +94,7 @@ TEST_F(EnumSchemaItemTest, test_item_with_default_value) {
obj = TestType::BLUETOOTH_OFF;
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(TestType::FACTORY_DEFAULTS, obj.asInt());
@@ -103,7 +103,7 @@ TEST_F(EnumSchemaItemTest, test_item_with_default_value) {
obj = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(TestType::FACTORY_DEFAULTS, obj.asInt());
@@ -112,7 +112,7 @@ TEST_F(EnumSchemaItemTest, test_item_with_default_value) {
obj = 3.1415926;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
@@ -121,7 +121,7 @@ TEST_F(EnumSchemaItemTest, test_item_with_default_value) {
// Object - string
obj = "Some string";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
@@ -145,7 +145,7 @@ TEST_F(EnumSchemaItemTest, test_item_without_default_value) {
obj = TestType::BLUETOOTH_OFF;
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
EXPECT_EQ(TestType::BLUETOOTH_OFF, obj.asInt());
@@ -154,7 +154,7 @@ TEST_F(EnumSchemaItemTest, test_item_without_default_value) {
obj = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
EXPECT_TRUE(obj.asBool());
@@ -163,7 +163,7 @@ TEST_F(EnumSchemaItemTest, test_item_without_default_value) {
obj = 3.1415926;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
@@ -172,7 +172,7 @@ TEST_F(EnumSchemaItemTest, test_item_without_default_value) {
// Object - string
obj = "Some string";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
@@ -181,12 +181,12 @@ TEST_F(EnumSchemaItemTest, test_item_without_default_value) {
// Object - int in range of enum
obj = 6;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object - int out of enum range
obj = 15;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
}
/**
@@ -203,31 +203,31 @@ TEST_F(EnumSchemaItemTest, test_apply_unapply_schema) {
obj = TestType::BLUETOOTH_OFF;
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(TestType::FACTORY_DEFAULTS, obj.asInt());
item->unapplySchema(obj);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
EXPECT_EQ(std::string("FACTORY_DEFAULTS"), obj.asString());
item->applySchema(obj, false);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(TestType::FACTORY_DEFAULTS, obj.asInt());
obj = "TOO_MANY_REQUESTS";
item->applySchema(obj, false);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(TestType::TOO_MANY_REQUESTS, obj.asInt());
obj = "ENOUGH_REQUESTS";
item->applySchema(obj, false);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
EXPECT_EQ(std::string("ENOUGH_REQUESTS"), obj.asString());
}
@@ -235,8 +235,8 @@ TEST_F(EnumSchemaItemTest, test_apply_unapply_schema) {
} // namespace components
} // namespace test
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
template <>
const EnumConversionHelper<test::components::SmartObjects::SchemaItem::
diff --git a/src/components/smart_objects/test/NumberSchemaItem_test.cc b/src/components/smart_objects/test/NumberSchemaItem_test.cc
index 0315bcedb3..eb227e4e9b 100644
--- a/src/components/smart_objects/test/NumberSchemaItem_test.cc
+++ b/src/components/smart_objects/test/NumberSchemaItem_test.cc
@@ -40,7 +40,7 @@ namespace test {
namespace components {
namespace smart_object_test {
-using NsSmartDeviceLink::NsSmartObjects::ISchemaItemPtr;
+using ns_smart_device_link::ns_smart_objects::ISchemaItemPtr;
/**
* Test NumberSchemaItem as INT with no default value
@@ -50,7 +50,7 @@ using NsSmartDeviceLink::NsSmartObjects::ISchemaItemPtr;
* and leave SmartObject in previous state.
**/
TEST(test_int_no_default_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -63,20 +63,20 @@ TEST(test_int_no_default_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Obj bool
obj = true;
ASSERT_TRUE(obj.asBool());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
// Set default value
bool resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
EXPECT_TRUE(obj.asBool());
// Obj string
@@ -84,18 +84,18 @@ TEST(test_int_no_default_value, test_NumberSchemaItemTest) {
ASSERT_EQ(std::string("Test"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
}
/**
* Test NumberSchemaItem as INT with setted min value
**/
TEST(test_int_min_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -108,28 +108,28 @@ TEST(test_int_min_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = 9;
ASSERT_EQ(9, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object int correct
obj = 10;
ASSERT_EQ(10, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
/**
* Test NumberSchemaItem as INT with setted max value
**/
TEST(test_int_max_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -143,28 +143,28 @@ TEST(test_int_max_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = 750;
ASSERT_EQ(750, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object int correct
obj = -750;
ASSERT_EQ(-750, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
/**
* Test NumberSchemaItem as INT with setted min and max value
**/
TEST(test_int_min_max_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -178,35 +178,35 @@ TEST(test_int_min_max_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = 750;
ASSERT_EQ(750, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object int correct
obj = -949;
ASSERT_EQ(-949, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = -950;
ASSERT_EQ(-950, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
}
/**
* Test NumberSchemaItem as INT with correct default value
**/
TEST(test_int_correct_default_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -221,44 +221,44 @@ TEST(test_int_correct_default_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = -12001;
ASSERT_EQ(-12001, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object int correct
obj = 100;
ASSERT_EQ(100, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = 101;
ASSERT_EQ(101, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Set default value
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(-38, obj.asInt());
// Object string
obj = "string";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(-38, obj.asInt());
}
@@ -266,7 +266,7 @@ TEST(test_int_correct_default_value, test_NumberSchemaItemTest) {
* Test NumberSchemaItem as INT with default value out of range
**/
TEST(test_int_default_value_out_of_range, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -281,49 +281,49 @@ TEST(test_int_default_value_out_of_range, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = 89;
ASSERT_EQ(89, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object int correct
obj = 100;
ASSERT_EQ(100, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object int incorrect
obj = 101;
ASSERT_EQ(101, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Set default value
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
EXPECT_EQ(50, obj.asInt());
// Object string
obj = "string";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
EXPECT_EQ(50, obj.asInt());
}
TEST(test_int_map_validate, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -339,15 +339,15 @@ TEST(test_int_map_validate, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj["min"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["max"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["out_of_min"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj["out_of_max"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
// Set default value
bool resDefault = item->setDefaultValue(obj["aa"]);
@@ -359,17 +359,17 @@ TEST(test_int_map_validate, test_NumberSchemaItemTest) {
EXPECT_EQ(-38, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["min"], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
}
TEST(test_int_array_validate, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -385,21 +385,21 @@ TEST(test_int_array_validate, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj[0], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OUT_OF_RANGE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OUT_OF_RANGE,
resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OUT_OF_RANGE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OUT_OF_RANGE,
resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
bool resDefault = item->setDefaultValue(obj[0]);
@@ -411,14 +411,14 @@ TEST(test_int_array_validate, test_NumberSchemaItemTest) {
EXPECT_EQ(-38, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
}
@@ -430,7 +430,7 @@ TEST(test_int_array_validate, test_NumberSchemaItemTest) {
* and leave SmartObject in previous state.
**/
TEST(test_double_no_default_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -443,20 +443,20 @@ TEST(test_double_no_default_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Obj bool
obj = true;
ASSERT_TRUE(obj.asBool());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
// Set default value
bool resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
EXPECT_TRUE(obj.asBool());
// Obj string
@@ -464,20 +464,20 @@ TEST(test_double_no_default_value, test_NumberSchemaItemTest) {
ASSERT_EQ(std::string("Test"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
// Set default value
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
}
/**
* Test NumberSchemaItem as DOUBLE with setted min value
**/
TEST(test_double_min_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -490,28 +490,28 @@ TEST(test_double_min_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = 9.999999;
ASSERT_EQ(9.999999, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
/*
//Object int
obj = 10;
ASSERT_EQ(10, obj.asInt());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);*/
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);*/
}
/**
* Test NumberSchemaItem as DOUBLE with setted max value
**/
TEST(test_double_max_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -525,28 +525,28 @@ TEST(test_double_max_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = 749.0001;
ASSERT_EQ(749.0001, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object double correct
obj = -750.0;
ASSERT_EQ(-750.0, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
/**
* Test NumberSchemaItem as DOUBLE with setted min and max value
**/
TEST(test_double_min_max_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -560,35 +560,35 @@ TEST(test_double_min_max_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = 749.001;
ASSERT_EQ(749.001, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object double correct
obj = -949.0;
ASSERT_EQ(-949.0, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = -949.00001;
ASSERT_EQ(-949.00001, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
}
/**
* Test NumberSchemaItem as DOUBLE with correct default value
**/
TEST(test_double_correct_default_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -603,44 +603,44 @@ TEST(test_double_correct_default_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = -12000.01;
ASSERT_EQ(-12000.01, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object double correct
obj = 100.0;
ASSERT_EQ(100.0, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = 100.001;
ASSERT_EQ(100.001, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Set default value
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(-38.0, obj.asDouble());
// Object string
obj = "string";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(-38.0, obj.asDouble());
}
@@ -648,7 +648,7 @@ TEST(test_double_correct_default_value, test_NumberSchemaItemTest) {
* Test NumberSchemaItem as DOUBLE with default value out of range
**/
TEST(test_double_default_value_out_of_range, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -663,49 +663,49 @@ TEST(test_double_default_value_out_of_range, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = 89.999;
ASSERT_EQ(89.999, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Object double correct
obj = 100.0;
ASSERT_EQ(100.0, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
// Object double incorrect
obj = 100.001;
ASSERT_EQ(100.001, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
// Set default value
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
EXPECT_EQ(50.0, obj.asDouble());
// Object string
obj = "string";
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
EXPECT_EQ(50.0, obj.asDouble());
}
TEST(test_double_map_validate, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -721,15 +721,15 @@ TEST(test_double_map_validate, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj["min"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["max"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["out_of_min"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj["out_of_max"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
bool resDefault = item->setDefaultValue(obj["aa"]);
EXPECT_TRUE(resDefault);
@@ -740,17 +740,17 @@ TEST(test_double_map_validate, test_NumberSchemaItemTest) {
EXPECT_EQ(-38.0, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["min"], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
}
TEST(test_double_array_validate, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
@@ -766,21 +766,21 @@ TEST(test_double_array_validate, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj[0], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OUT_OF_RANGE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OUT_OF_RANGE,
resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OUT_OF_RANGE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OUT_OF_RANGE,
resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
bool resDefault = item->setDefaultValue(obj[0]);
@@ -792,19 +792,19 @@ TEST(test_double_array_validate, test_NumberSchemaItemTest) {
EXPECT_EQ(-38.0, obj.asDouble());
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::OK, resultType);
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::OK, resultType);
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(NsSmartDeviceLink::NsSmartObjects::Errors::INVALID_VALUE,
+ EXPECT_EQ(ns_smart_device_link::ns_smart_objects::errors::INVALID_VALUE,
resultType);
}
TEST(test_int_double_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
ISchemaItemPtr item = TNumberSchemaItem<int>::create(
TSchemaItemParameter<int>(10),
@@ -817,11 +817,11 @@ TEST(test_int_double_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
}
TEST(test_double_int_value, test_NumberSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
ISchemaItemPtr item = TNumberSchemaItem<double>::create(
TSchemaItemParameter<double>(10.0),
@@ -834,7 +834,7 @@ TEST(test_double_int_value, test_NumberSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
} // namespace smart_object_test
diff --git a/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc b/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
index fac9a5441b..7d95a40b26 100644
--- a/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
+++ b/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
@@ -56,8 +56,8 @@ namespace test {
namespace components {
namespace smart_object_test {
-using namespace NsSmartDeviceLink::NsJSONHandler::strings;
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_json_handler::strings;
+using namespace ns_smart_device_link::ns_smart_objects;
namespace TestType {
enum eType {
@@ -96,7 +96,7 @@ class SmartObjectConvertionTimeTest : public ::testing::Test {
clock_gettime(CLOCK_REALTIME, &convertionStartTime);
// SmartObjects --> JSON
- NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonSDLRPCv2::
+ ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonSDLRPCv2::
toString(srcObj, jsonString);
clock_gettime(CLOCK_REALTIME, &convertionEndTime);
@@ -114,7 +114,7 @@ class SmartObjectConvertionTimeTest : public ::testing::Test {
clock_gettime(CLOCK_REALTIME, &convertionStartTime);
// JSON --> SmartObjects
- NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonSDLRPCv2::
+ ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonSDLRPCv2::
fromString<FunctionIdTest::eType, MessageTypeTest::eType>(
jsonString,
dstObj,
@@ -136,7 +136,7 @@ class SmartObjectConvertionTimeTest : public ::testing::Test {
clock_gettime(CLOCK_REALTIME, &convertionStartTime);
// SmartObjects --> JSON
- NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonSDLRPCv1::
+ ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonSDLRPCv1::
toString(srcObj, jsonString);
clock_gettime(CLOCK_REALTIME, &convertionEndTime);
@@ -153,7 +153,7 @@ class SmartObjectConvertionTimeTest : public ::testing::Test {
clock_gettime(CLOCK_REALTIME, &convertionStartTime);
// JSON --> SmartObjects
- NsSmartDeviceLink::NsJSONHandler::Formatters::CFormatterJsonSDLRPCv1::
+ ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonSDLRPCv1::
fromString<FunctionIdTest::eType, MessageTypeTest::eType>(jsonString,
dstObj);
@@ -253,17 +253,18 @@ class SmartObjectConvertionTimeTest : public ::testing::Test {
messageType_allowedEnumSubsetValues);
CObjectSchemaItem::Members paramsMembersMap;
- paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] =
- CObjectSchemaItem::SMember(functionId_SchemaItem, true);
paramsMembersMap
- [NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] =
+ [ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] =
+ CObjectSchemaItem::SMember(functionId_SchemaItem, true);
+ paramsMembersMap
+ [ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] =
CObjectSchemaItem::SMember(messageType_SchemaItem, true);
paramsMembersMap
- [NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] =
+ [ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] =
CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> rootMembersMap;
- rootMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] =
+ rootMembersMap[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] =
CObjectSchemaItem::SMember(CObjectSchemaItem::create(paramsMembersMap),
true);
@@ -329,35 +330,37 @@ class SmartObjectConvertionTimeTest : public ::testing::Test {
CObjectSchemaItem::SMember(tryAgainTime_SchemaItem, true);
std::map<std::string, CObjectSchemaItem::SMember> paramsMembersMap;
- paramsMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] =
- CObjectSchemaItem::SMember(
- TEnumSchemaItem<FunctionIdTest::eType>::create(
- functionId_allowedEnumSubsetValues),
- true);
paramsMembersMap
- [NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] =
+ [ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] =
+ CObjectSchemaItem::SMember(
+ TEnumSchemaItem<FunctionIdTest::eType>::create(
+ functionId_allowedEnumSubsetValues),
+ true);
+ paramsMembersMap
+ [ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] =
CObjectSchemaItem::SMember(
TEnumSchemaItem<MessageTypeTest::eType>::create(
messageType_allowedEnumSubsetValues),
true);
paramsMembersMap
- [NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] =
+ [ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] =
CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
paramsMembersMap
- [NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] =
+ [ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] =
CObjectSchemaItem::SMember(
TNumberSchemaItem<int>::create(TSchemaItemParameter<int>(1),
TSchemaItemParameter<int>(2)),
true);
paramsMembersMap
- [NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] =
+ [ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] =
CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> rootMembersMap;
- rootMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] =
- CObjectSchemaItem::SMember(CObjectSchemaItem::create(schemaMembersMap),
- true);
- rootMembersMap[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] =
+ rootMembersMap
+ [ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] =
+ CObjectSchemaItem::SMember(
+ CObjectSchemaItem::create(schemaMembersMap), true);
+ rootMembersMap[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] =
CObjectSchemaItem::SMember(CObjectSchemaItem::create(paramsMembersMap),
true);
return CSmartSchema(CObjectSchemaItem::create(rootMembersMap));
@@ -638,8 +641,8 @@ TEST_F(SmartObjectConvertionTimeTest, test_object_without_enum_convertion) {
} // namespace components
} // namespace test
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
template <>
const EnumConversionHelper<test::components::SmartObjects::
diff --git a/src/components/smart_objects/test/SmartObjectDraft_test.cc b/src/components/smart_objects/test/SmartObjectDraft_test.cc
index de8103771c..cfb6785db7 100644
--- a/src/components/smart_objects/test/SmartObjectDraft_test.cc
+++ b/src/components/smart_objects/test/SmartObjectDraft_test.cc
@@ -44,8 +44,8 @@ namespace test {
namespace components {
namespace smart_object_test {
-using NsSmartDeviceLink::NsSmartObjects::SmartObject;
-using NsSmartDeviceLink::NsSmartObjects::SmartType;
+using ns_smart_device_link::ns_smart_objects::SmartObject;
+using ns_smart_device_link::ns_smart_objects::SmartType;
TEST(SmartObjectsDraftTest, primitive_types) {
SmartObject obj;
@@ -126,7 +126,7 @@ TEST(SmartObjectsDraftTest, test_public_interface) {
ASSERT_EQ(std::string("Hello, world"), obj.asString());
// ---- Binary ---- //
- NsSmartDeviceLink::NsSmartObjects::SmartBinary binaryData;
+ ns_smart_device_link::ns_smart_objects::SmartBinary binaryData;
binaryData.push_back('\0');
binaryData.push_back('a');
obj = binaryData;
@@ -203,7 +203,7 @@ TEST(SmartObjectsDraftTest, test_helper_methods) {
ASSERT_EQ(std::string("Hello, world"), obj.asString());
// ---- Binary ---- //
- NsSmartDeviceLink::NsSmartObjects::SmartBinary binaryData;
+ ns_smart_device_link::ns_smart_objects::SmartBinary binaryData;
binaryData.push_back('\0');
binaryData.push_back('a');
obj = binaryData;
diff --git a/src/components/smart_objects/test/SmartObjectInvalid_test.cc b/src/components/smart_objects/test/SmartObjectInvalid_test.cc
index 68afbb6237..ff5949df6a 100644
--- a/src/components/smart_objects/test/SmartObjectInvalid_test.cc
+++ b/src/components/smart_objects/test/SmartObjectInvalid_test.cc
@@ -40,7 +40,7 @@ namespace test {
namespace components {
namespace smart_object_test {
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
TEST(test_SmartObjectInvalidTest, simple_type_can_be_set_in_constructor) {
SmartObject objMap(SmartType_Map);
@@ -116,7 +116,7 @@ TEST(test_SmartObjectInvalidTest, invalid_object_remains_invalid) {
ASSERT_EQ(invalid_string_value, obj.asString());
// ---- BINARY ---- //
- NsSmartDeviceLink::NsSmartObjects::SmartBinary binaryData;
+ ns_smart_device_link::ns_smart_objects::SmartBinary binaryData;
binaryData.push_back('\0');
binaryData.push_back('a');
obj = binaryData;
diff --git a/src/components/smart_objects/test/SmartObjectStress_test.cc b/src/components/smart_objects/test/SmartObjectStress_test.cc
index 698bd0415a..4c0234589f 100644
--- a/src/components/smart_objects/test/SmartObjectStress_test.cc
+++ b/src/components/smart_objects/test/SmartObjectStress_test.cc
@@ -40,7 +40,7 @@
namespace test {
namespace components {
namespace smart_object_test {
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
class StressTestHelper : public ::testing::Test {
private:
@@ -184,8 +184,8 @@ class StressTestHelper : public ::testing::Test {
std::string strVal("c:");
strVal += strDataVal;
- NsSmartDeviceLink::NsSmartObjects::SmartBinary binaryVal(dataSize,
- randomChar);
+ ns_smart_device_link::ns_smart_objects::SmartBinary binaryVal(
+ dataSize, randomChar);
obj = binaryVal; // string with binary data filled with random chars
mVerifyMap[key_path] = strVal;
@@ -259,10 +259,10 @@ TEST_F(StressTestHelper, StressTest) {
if (!value.compare(0, 2, "c:")) {
std::string etalonData = value.substr(2);
- ASSERT_EQ(NsSmartDeviceLink::NsSmartObjects::SmartType_Binary,
+ ASSERT_EQ(ns_smart_device_link::ns_smart_objects::SmartType_Binary,
obj.getType());
- NsSmartDeviceLink::NsSmartObjects::SmartBinary binaryData =
+ ns_smart_device_link::ns_smart_objects::SmartBinary binaryData =
obj.asBinary();
ASSERT_EQ(etalonData.size(), binaryData.size());
@@ -270,10 +270,10 @@ TEST_F(StressTestHelper, StressTest) {
{
std::string etalonData = value.substr(2);
- ASSERT_EQ(NsSmartDeviceLink::NsSmartObjects::SmartType_Binary,
+ ASSERT_EQ(ns_smart_device_link::ns_smart_objects::SmartType_Binary,
obj.getType());
- NsSmartDeviceLink::NsSmartObjects::SmartBinary binaryData =
+ ns_smart_device_link::ns_smart_objects::SmartBinary binaryData =
obj.asBinary();
ASSERT_EQ(etalonData.size(), binaryData.size());
diff --git a/src/components/smart_objects/test/SmartObjectUnit_test.cc b/src/components/smart_objects/test/SmartObjectUnit_test.cc
index 0a67b7e922..2c03d8a329 100644
--- a/src/components/smart_objects/test/SmartObjectUnit_test.cc
+++ b/src/components/smart_objects/test/SmartObjectUnit_test.cc
@@ -37,7 +37,7 @@ namespace test {
namespace components {
namespace smart_object_test {
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
class TestHelper : public ::testing::Test {
protected:
diff --git a/src/components/smart_objects/test/StringSchemaItem_test.cc b/src/components/smart_objects/test/StringSchemaItem_test.cc
index 4e4688d354..7bf0d0ed89 100644
--- a/src/components/smart_objects/test/StringSchemaItem_test.cc
+++ b/src/components/smart_objects/test/StringSchemaItem_test.cc
@@ -49,7 +49,7 @@ namespace smart_object_test {
* and leave SmartObject in previous state.
**/
TEST(test_no_default_value, test_StringSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item =
@@ -61,7 +61,7 @@ TEST(test_no_default_value, test_StringSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
EXPECT_EQ(std::string("New valid string"), obj.asString());
@@ -70,7 +70,7 @@ TEST(test_no_default_value, test_StringSchemaItemTest) {
obj = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
EXPECT_TRUE(obj.asBool());
@@ -79,12 +79,12 @@ TEST(test_no_default_value, test_StringSchemaItemTest) {
obj = 3.1415926;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_FALSE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
EXPECT_EQ(3.1415926, obj.asDouble());
}
@@ -98,7 +98,7 @@ TEST(test_no_default_value, test_StringSchemaItemTest) {
*default value.
**/
TEST(test_item_with_default_value, test_StringSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CStringSchemaItem::create(
@@ -113,7 +113,7 @@ TEST(test_item_with_default_value, test_StringSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(std::string("Default string"), obj.asString());
@@ -122,7 +122,7 @@ TEST(test_item_with_default_value, test_StringSchemaItemTest) {
obj = true;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(std::string("Default string"), obj.asString());
@@ -131,12 +131,12 @@ TEST(test_item_with_default_value, test_StringSchemaItemTest) {
obj = 3.1415926;
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
EXPECT_EQ(std::string("Default string"), obj.asString());
}
@@ -144,7 +144,7 @@ TEST(test_item_with_default_value, test_StringSchemaItemTest) {
* Test StringSchemaItem with max length
**/
TEST(test_item_with_max_length, test_StringSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CStringSchemaItem::create(
@@ -158,7 +158,7 @@ TEST(test_item_with_max_length, test_StringSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
bool resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(std::string("Default string"), obj.asString());
@@ -168,17 +168,17 @@ TEST(test_item_with_max_length, test_StringSchemaItemTest) {
ASSERT_EQ(std::string("New very very loooooong string"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(std::string("Default string"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
TEST(test_map_validate, test_StringSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CStringSchemaItem::create(
@@ -193,19 +193,19 @@ TEST(test_map_validate, test_StringSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj["str"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["long"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj["bool"], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj["num"], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
bool resDefault = item->setDefaultValue(obj["str"]);
EXPECT_TRUE(resDefault);
@@ -220,27 +220,27 @@ TEST(test_map_validate, test_StringSchemaItemTest) {
EXPECT_EQ(std::string("Default string"), obj["num"].asString());
resultType = item->validate(obj["str"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["long"], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj["bool"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj["num"], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(std::string("Default string"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
TEST(test_array_validate, test_StringSchemaItemTest) {
- using namespace NsSmartDeviceLink::NsSmartObjects;
+ using namespace ns_smart_device_link::ns_smart_objects;
SmartObject obj;
ISchemaItemPtr item = CStringSchemaItem::create(
@@ -256,22 +256,22 @@ TEST(test_array_validate, test_StringSchemaItemTest) {
rpc::ValidationReport report("RPC");
int resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[4], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
bool resDefault = item->setDefaultValue(obj[0]);
EXPECT_TRUE(resDefault);
@@ -290,24 +290,24 @@ TEST(test_array_validate, test_StringSchemaItemTest) {
EXPECT_EQ(std::string("Default string"), obj[5].asString());
resultType = item->validate(obj[0], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[1], &report);
- EXPECT_EQ(Errors::OUT_OF_RANGE, resultType);
+ EXPECT_EQ(errors::OUT_OF_RANGE, resultType);
resultType = item->validate(obj[2], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[3], &report);
- EXPECT_EQ(Errors::INVALID_VALUE, resultType);
+ EXPECT_EQ(errors::INVALID_VALUE, resultType);
resultType = item->validate(obj[4], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resultType = item->validate(obj[5], &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
resDefault = item->setDefaultValue(obj);
EXPECT_TRUE(resDefault);
EXPECT_EQ(std::string("Default string"), obj.asString());
resultType = item->validate(obj, &report);
- EXPECT_EQ(Errors::OK, resultType);
+ EXPECT_EQ(errors::OK, resultType);
}
} // namespace smart_object_test
diff --git a/src/components/smart_objects/test/smart_object_performance_test.cc b/src/components/smart_objects/test/smart_object_performance_test.cc
index 503652dcda..11273e332f 100644
--- a/src/components/smart_objects/test/smart_object_performance_test.cc
+++ b/src/components/smart_objects/test/smart_object_performance_test.cc
@@ -37,7 +37,7 @@
#include "smart_objects/smart_object.h"
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
namespace test {
namespace components {
diff --git a/src/components/telemetry_monitor/src/application_manager_metric_wrapper.cc b/src/components/telemetry_monitor/src/application_manager_metric_wrapper.cc
index 2dabc210f7..006aac196f 100644
--- a/src/components/telemetry_monitor/src/application_manager_metric_wrapper.cc
+++ b/src/components/telemetry_monitor/src/application_manager_metric_wrapper.cc
@@ -43,7 +43,7 @@ Json::Value ApplicationManagerMetricWrapper::GetJsonMetric() {
result[strings::begin] =
Json::Int64(date_time::getuSecs(message_metric->begin));
result[strings::end] = Json::Int64(date_time::getuSecs(message_metric->end));
- const NsSmartDeviceLink::NsSmartObjects::SmartObject& params =
+ const ns_smart_device_link::ns_smart_objects::SmartObject& params =
message_metric->message->getElement(application_manager::strings::params);
result[strings::correlation_id] = utils::ConvertInt64ToLongLongInt(
params[application_manager::strings::correlation_id].asInt());
diff --git a/src/components/telemetry_monitor/test/application_manager_metric_test.cc b/src/components/telemetry_monitor/test/application_manager_metric_test.cc
index 01eb915326..2e6eaad9d8 100644
--- a/src/components/telemetry_monitor/test/application_manager_metric_test.cc
+++ b/src/components/telemetry_monitor/test/application_manager_metric_test.cc
@@ -58,11 +58,12 @@ TEST(ApplicationManagerMetricWrapper, GetJsonMetric) {
application_manager::AMTelemetryObserver::MessageMetric>();
metric_test.message_metric->begin = start_time;
metric_test.message_metric->end = end_time;
- NsSmartDeviceLink::NsSmartObjects::SmartObject obj;
+ ns_smart_device_link::ns_smart_objects::SmartObject obj;
obj["params"][application_manager::strings::correlation_id] = 11;
obj["params"][application_manager::strings::connection_key] = 12;
metric_test.message_metric->message =
- std::make_shared<NsSmartDeviceLink::NsSmartObjects::SmartObject>(obj);
+ std::make_shared<ns_smart_device_link::ns_smart_objects::SmartObject>(
+ obj);
Json::Value jvalue = metric_test.GetJsonMetric();
EXPECT_EQ("null\n",
@@ -95,11 +96,12 @@ TEST(ApplicationManagerMetricWrapper, GetJsonMetricWithGrabResources) {
application_manager::AMTelemetryObserver::MessageMetric>();
metric_test.message_metric->begin = start_time;
metric_test.message_metric->end = end_time;
- NsSmartDeviceLink::NsSmartObjects::SmartObject obj;
+ ns_smart_device_link::ns_smart_objects::SmartObject obj;
obj["params"][application_manager::strings::correlation_id] = 11;
obj["params"][application_manager::strings::connection_key] = 12;
metric_test.message_metric->message =
- std::make_shared<NsSmartDeviceLink::NsSmartObjects::SmartObject>(obj);
+ std::make_shared<ns_smart_device_link::ns_smart_objects::SmartObject>(
+ obj);
Json::Value jvalue = metric_test.GetJsonMetric();
EXPECT_EQ(date_time::getuSecs(start_time),
diff --git a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
index 6546b0ea89..c6a0145ac6 100755
--- a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
+++ b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
@@ -1572,10 +1572,10 @@ class CodeGenerator(object):
u'''#include "smart_objects/number_schema_item.h"\n'''
u'''#include "smart_objects/schema_item_parameter.h"\n'''
u'''\n'''
- u'''using namespace NsSmartDeviceLink::NsSmartObjects;\n'''
+ u'''using namespace ns_smart_device_link::ns_smart_objects;\n'''
u'''\n'''
u'''$namespace::$class_name::$class_name()\n'''
- u''' : NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::eType, '''
+ u''' : ns_smart_device_link::ns_json_handler::CSmartFactory<FunctionID::eType, '''
u'''messageType::eType, StructIdentifiers::eType>() {\n'''
u''' TStructsSchemaItems struct_schema_items;\n'''
u''' InitStructSchemes(struct_schema_items);\n'''
@@ -1600,7 +1600,7 @@ class CodeGenerator(object):
u''' return it->second;\n'''
u''' }\n'''
u'''\n'''
- u''' return NsSmartDeviceLink::NsSmartObjects::'''
+ u''' return ns_smart_device_link::ns_smart_objects::'''
u'''CAlwaysFalseSchemaItem::create();\n'''
u'''}\n'''
u'''\n'''
@@ -1627,13 +1627,13 @@ class CodeGenerator(object):
u'''\n'''
u'''//-------------- String to value enum mapping ----------------\n'''
u'''\n'''
- u'''namespace NsSmartDeviceLink {\n'''
- u'''namespace NsSmartObjects {\n'''
+ u'''namespace ns_smart_device_link {\n'''
+ u'''namespace ns_smart_objects {\n'''
u'''\n'''
u'''$enum_string_coversions'''
u'''\n'''
- u'''} // NsSmartObjects\n'''
- u'''} // NsSmartDeviceLink\n'''
+ u'''} // ns_smart_objects\n'''
+ u'''} // ns_smart_device_link\n'''
u'''\n''')
_enum_to_str_converter_template = string.Template(
@@ -1678,8 +1678,8 @@ class CodeGenerator(object):
u'''struct_schema_item_${name})));''')
_function_schema_template = string.Template(
- u'''functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::'''
- u'''NsJSONHandler::'''
+ u'''functions_schemes_.insert(std::make_pair(ns_smart_device_link::'''
+ u'''ns_json_handler::'''
u'''SmartSchemaKey<FunctionID::eType, messageType::eType>'''
u'''(FunctionID::$function_id, messageType::$message_type), '''
u'''InitFunction_${function_id}_${message_type}('''
@@ -1787,11 +1787,11 @@ class CodeGenerator(object):
u'''\n'''
u'''CObjectSchemaItem::Members '''
u'''root_members_map;\n'''
- u'''root_members_map[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''root_members_map[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_MSG_PARAMS] = '''
u'''CObjectSchemaItem::SMember(CObjectSchemaItem::'''
u'''create(schema_members), true);\n'''
- u'''root_members_map[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''root_members_map[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_PARAMS] = '''
u'''CObjectSchemaItem::SMember(CObjectSchemaItem::'''
u'''create(params_members), true);\n\n'''
@@ -1800,7 +1800,7 @@ class CodeGenerator(object):
_class_h_template = string.Template(
u'''$comment\n'''
- u'''class $class_name : public NsSmartDeviceLink::NsJSONHandler::'''
+ u'''class $class_name : public ns_smart_device_link::ns_json_handler::'''
u'''CSmartFactory<FunctionID::eType, messageType::eType, '''
u'''StructIdentifiers::eType> {\n'''
u''' public:\n'''
@@ -1814,7 +1814,7 @@ class CodeGenerator(object):
u''' * @brief Type that maps of struct IDs to schema items.\n'''
u''' */\n'''
u''' typedef std::map<const StructIdentifiers::eType, '''
- u'''std::shared_ptr<NsSmartDeviceLink::NsSmartObjects::'''
+ u'''std::shared_ptr<ns_smart_device_link::ns_smart_objects::'''
u'''ISchemaItem> > TStructsSchemaItems;\n'''
u'''\n'''
u''' /**\n'''
@@ -1826,7 +1826,7 @@ class CodeGenerator(object):
u''' * @return std::shared_ptr of strucute\n'''
u''' */\n'''
u''' static '''
- u'''std::shared_ptr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> '''
+ u'''std::shared_ptr<ns_smart_device_link::ns_smart_objects::ISchemaItem> '''
u'''ProvideObjectSchemaItemForStruct(\n'''
u''' const TStructsSchemaItems &struct_schema_items,\n'''
u''' const StructIdentifiers::eType struct_id);\n'''
@@ -1857,12 +1857,12 @@ class CodeGenerator(object):
u'''$init_struct_decls'''
u'''};''')
- _function_return_comment = u''' * @return NsSmartDeviceLink::''' \
- u'''NsSmartObjects::CSmartSchema\n'''
+ _function_return_comment = u''' * @return ns_smart_device_link::''' \
+ u'''ns_smart_objects::CSmartSchema\n'''
_function_decl_template = string.Template(
u'''$comment\n'''
- u'''static NsSmartDeviceLink::NsSmartObjects::CSmartSchema '''
+ u'''static ns_smart_device_link::ns_smart_objects::CSmartSchema '''
u'''InitFunction_${function_id}_${message_type}(\n'''
u''' const TStructsSchemaItems &struct_schema_items,\n'''
u''' const std::set<FunctionID::eType> &function_id_items,\n'''
@@ -1871,7 +1871,7 @@ class CodeGenerator(object):
_struct_decl_template = string.Template(
u'''$comment\n'''
u'''static '''
- u'''std::shared_ptr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> '''
+ u'''std::shared_ptr<ns_smart_device_link::ns_smart_objects::ISchemaItem> '''
u'''InitStructSchemaItem_${struct_name}(\n'''
u''' const TStructsSchemaItems &struct_schema_items);''')
diff --git a/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py b/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py
index cf9887d39d..6924ec67aa 100755
--- a/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py
+++ b/tools/InterfaceGenerator/generator/generators/SmartFactoryJSONRPC.py
@@ -94,7 +94,7 @@ class CodeGenerator(SmartFactoryBase.CodeGenerator):
_error_response_insert_template = string.Template(
u'''functions_schemes_.insert(std::make_pair('''
- u'''NsSmartDeviceLink::NsJSONHandler::'''
+ u'''ns_smart_device_link::ns_json_handler::'''
u'''SmartSchemaKey<FunctionID::eType, messageType::eType>('''
u'''FunctionID::${function_id}, messageType::error_response), '''
u'''error_response_schema));\n''')
@@ -102,32 +102,32 @@ class CodeGenerator(SmartFactoryBase.CodeGenerator):
_error_response_schema_template = (
u'''CObjectSchemaItem::Members '''
u'''params_members;\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember('''
u'''TEnumSchemaItem<FunctionID::eType>::create('''
u'''function_id_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember('''
u'''TEnumSchemaItem<messageType::eType>::create('''
u'''message_type_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember('''
u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember('''
u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember('''
u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::kCode] = CObjectSchemaItem::SMember('''
u'''TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::kMessage] = CObjectSchemaItem::SMember('''
u'''CStringSchemaItem::create(), true);\n'''
u'''\n'''
u'''CObjectSchemaItem::Members root_members_map;\n'''
- u'''root_members_map[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''root_members_map[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_PARAMS] = CObjectSchemaItem::SMember('''
u'''CObjectSchemaItem::create(params_members), true);\n'''
u'''\n'''
@@ -136,30 +136,30 @@ class CodeGenerator(SmartFactoryBase.CodeGenerator):
u'''\n''')
_base_params = (
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_FUNCTION_ID] = CObjectSchemaItem::'''
u'''SMember(TEnumSchemaItem<FunctionID::eType>::'''
u'''create(function_id_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_MESSAGE_TYPE] = CObjectSchemaItem::'''
u'''SMember(TEnumSchemaItem<messageType::eType>::'''
u'''create(message_type_items), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::'''
u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::'''
u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
)
_correlation_id_param = (
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::S_CORRELATION_ID] = CObjectSchemaItem::'''
u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
)
_additional_response_params = (
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::'''
+ u'''params_members[ns_smart_device_link::ns_json_handler::'''
u'''strings::kCode] = CObjectSchemaItem::'''
u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
)
diff --git a/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py b/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py
index b3fb61f4a9..c3244f7e95 100755
--- a/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py
+++ b/tools/InterfaceGenerator/generator/generators/SmartFactorySDLRPC.py
@@ -67,23 +67,23 @@ class CodeGenerator(SmartFactoryBase.CodeGenerator):
"""
base_params = \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
+ u'''params_members[ns_smart_device_link::ns_json_handler::''' \
u'''strings::S_FUNCTION_ID] = CObjectSchemaItem::''' \
u'''SMember(TEnumSchemaItem<FunctionID::eType>::''' \
u'''create(function_id_items), true);\n''' \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
+ u'''params_members[ns_smart_device_link::ns_json_handler::''' \
u'''strings::S_MESSAGE_TYPE] = CObjectSchemaItem::''' \
u'''SMember(TEnumSchemaItem<messageType::eType>::''' \
u'''create(message_type_items), true);\n''' \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
+ u'''params_members[ns_smart_device_link::ns_json_handler::''' \
u'''strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::''' \
u'''SMember(TNumberSchemaItem<int>::create(), true);\n''' \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
+ u'''params_members[ns_smart_device_link::ns_json_handler::''' \
u'''strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::''' \
u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
correlation_id_param = \
- u'''params_members[NsSmartDeviceLink::NsJSONHandler::''' \
+ u'''params_members[ns_smart_device_link::ns_json_handler::''' \
u'''strings::S_CORRELATION_ID] = CObjectSchemaItem::''' \
u'''SMember(TNumberSchemaItem<int>::create(), true);\n'''
diff --git a/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py b/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py
index b21e320038..c4813d00a8 100755
--- a/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py
+++ b/tools/InterfaceGenerator/test/generator/generators/test_SmartFactoryJSONRPC.py
@@ -17,61 +17,61 @@ from generator import Model
EXPECTED_RESULT_REQUEST = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<FunctionID::eType>::create("""
u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<messageType::eType>::create("""
u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
)
EXPECTED_RESULT_RESPONSE = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<FunctionID::eType>::create("""
u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<messageType::eType>::create("""
u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::kCode] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
)
EXPECTED_RESULT_NOTIFICATION = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<FunctionID::eType>::create("""
u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<messageType::eType>::create("""
u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
)
@@ -79,33 +79,33 @@ EXPECTED_RESULT_NOTIFICATION = (
EXPECTED_PRE_FUNCTION_CODE = (
u""" std::map<std::string, CObjectSchemaItem::SMember> """
u"""params_members;\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u""" params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<FunctionID::eType>::create("""
u"""function_id_items), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u""" params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<messageType::eType>::create("""
u"""message_type_items), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u""" params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u""" params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u""" params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler"""
+ u""" params_members[ns_smart_device_link::ns_json_handler"""
u"""::strings::kCode] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u""" params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u""" params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::kMessage] = CObjectSchemaItem::SMember("""
u"""CStringSchemaItem::create(), true);\n"""
u"""\n"""
u""" std::map<std::string, CObjectSchemaItem::SMember> """
u"""root_members_map;\n"""
- u""" root_members_map[NsSmartDeviceLink::NsJSONHandler::"""
+ u""" root_members_map[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PARAMS] = CObjectSchemaItem::SMember("""
u"""CObjectSchemaItem::create(params_members), true);\n"""
u"""\n"""
@@ -113,7 +113,7 @@ EXPECTED_PRE_FUNCTION_CODE = (
u"""root_members_map));\n"""
u"""\n"""
u""" functions_schemes_.insert(std::make_pair("""
- u"""NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<"""
+ u"""ns_smart_device_link::ns_json_handler::SmartSchemaKey<"""
u"""FunctionID::eType, messageType::eType>("""
u"""FunctionID::request, messageType::error_response)"""
u""", error_response_schema));\n"""
diff --git a/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py b/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py
index 111ffb3cbc..35e4aeb6ce 100755
--- a/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py
+++ b/tools/InterfaceGenerator/test/generator/generators/test_SmartFactorySDLRPC.py
@@ -17,23 +17,23 @@ from generator import Model
EXPECTED_NOTIFICATION_RESULT = (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<FunctionID::eType>::create("""
u"""function_id_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember("""
u"""TEnumSchemaItem<messageType::eType>::create("""
u"""message_type_items), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n"""
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n""")
EXPECTED_REQ_RESP_RESULT = "".join([EXPECTED_NOTIFICATION_RESULT, (
- u"""params_members[NsSmartDeviceLink::NsJSONHandler::"""
+ u"""params_members[ns_smart_device_link::ns_json_handler::"""
u"""strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember("""
u"""TNumberSchemaItem<int>::create(), true);\n""")])
diff --git a/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc b/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc
index 458c27543b..49369d2559 100644
--- a/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc
+++ b/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.cc
@@ -50,7 +50,7 @@
#include "SmartObjects/TNumberSchemaItem.hpp"
#include "SmartObjects/TSchemaItemParameter.hpp"
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
XXX::YYY::ZZZ::Test::Test()
: CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType>() {
@@ -77,7 +77,7 @@ TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::ProvideObjectSchemaItemForStruct(
return it->second;
}
- return NsSmartDeviceLink::NsSmartObjects::CAlwaysFalseSchemaItem::create();
+ return ns_smart_device_link::ns_smart_objects::CAlwaysFalseSchemaItem::create();
}
void XXX::YYY::ZZZ::Test::InitStructSchemes(
@@ -96,24 +96,24 @@ void XXX::YYY::ZZZ::Test::InitFunctionSchemes(
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items) {
std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::kCode] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::kMessage] = CObjectSchemaItem::SMember(CStringSchemaItem::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::kCode] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::kMessage] = CObjectSchemaItem::SMember(CStringSchemaItem::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
CSmartSchema error_response_schema(CObjectSchemaItem::create(root_members_map));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::error_response), error_response_schema));
+ functions_schemes_.insert(std::make_pair(ns_smart_device_link::ns_json_handler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::error_response), error_response_schema));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::name1, messageType::request), InitFunction_name1_request(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::response), InitFunction_val_1_response(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_2, messageType::notification), InitFunction_val_2_notification(struct_schema_items, function_id_items, message_type_items)));
+ functions_schemes_.insert(std::make_pair(ns_smart_device_link::ns_json_handler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::name1, messageType::request), InitFunction_name1_request(struct_schema_items, function_id_items, message_type_items)));
+ functions_schemes_.insert(std::make_pair(ns_smart_device_link::ns_json_handler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::response), InitFunction_val_1_response(struct_schema_items, function_id_items, message_type_items)));
+ functions_schemes_.insert(std::make_pair(ns_smart_device_link::ns_json_handler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_2, messageType::notification), InitFunction_val_2_notification(struct_schema_items, function_id_items, message_type_items)));
}
//------------- Functions schemes initialization -------------
@@ -153,15 +153,15 @@ CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_name1_request(
schema_members["param2"] = CObjectSchemaItem::SMember(param2_SchemaItem, true);
std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
return CSmartSchema(CObjectSchemaItem::create(root_members_map));
}
@@ -173,16 +173,16 @@ CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_1_response(
std::map<std::string, CObjectSchemaItem::SMember> schema_members;
std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::kCode] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::kCode] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
return CSmartSchema(CObjectSchemaItem::create(root_members_map));
}
@@ -194,14 +194,14 @@ CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_2_notification(
std::map<std::string, CObjectSchemaItem::SMember> schema_members;
std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
return CSmartSchema(CObjectSchemaItem::create(root_members_map));
}
@@ -298,8 +298,8 @@ TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::InitStructSchemaItem_Struct2(
//-------------- String to value enum mapping ----------------
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
template <>
const std::map<XXX::YYY::ZZZ::Enum1::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum1::eType>::getEnumElementsStringRepresentation() {
@@ -380,6 +380,6 @@ const std::map<XXX::YYY::ZZZ::messageType::eType, std::string> &TEnumSchemaItem<
return enum_string_representation;
}
-} // NsSmartObjects
-} // NsSmartDeviceLink
+} // ns_smart_objects
+} // ns_smart_device_link
diff --git a/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h b/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h
index b265603480..d7310e4d0f 100644
--- a/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h
+++ b/tools/InterfaceGenerator/test/generator/generators/test_expected_jsonrpc.h
@@ -223,7 +223,7 @@ enum eType {
* param2 - value2
* param1 - value1
*/
-class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType> {
+class Test : public ns_smart_device_link::ns_json_handler::CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType> {
public:
/**
* @brief Constructor.
@@ -234,7 +234,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Type that maps of struct IDs to schema items.
*/
- typedef std::map<const StructIdentifiers::eType, NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> > TStructsSchemaItems;
+ typedef std::map<const StructIdentifiers::eType, ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> > TStructsSchemaItems;
/**
* @brief Helper that allows to make reference to struct
@@ -244,7 +244,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
*
* @return TSharedPtr of strucute
*/
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> ProvideObjectSchemaItemForStruct(
+ static ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> ProvideObjectSchemaItemForStruct(
const TStructsSchemaItems &struct_schema_items,
const StructIdentifiers::eType struct_id);
@@ -268,9 +268,9 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Method that generates schema for function Function1.
*
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
+ * @return ns_smart_device_link::ns_smart_objects::CSmartSchema
*/
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_name1_request(
+ static ns_smart_device_link::ns_smart_objects::CSmartSchema InitFunction_name1_request(
const TStructsSchemaItems &struct_schema_items,
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items);
@@ -278,9 +278,9 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Method that generates schema for function Function2.
*
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
+ * @return ns_smart_device_link::ns_smart_objects::CSmartSchema
*/
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_1_response(
+ static ns_smart_device_link::ns_smart_objects::CSmartSchema InitFunction_val_1_response(
const TStructsSchemaItems &struct_schema_items,
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items);
@@ -288,9 +288,9 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Method that generates schema for function Function2.
*
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
+ * @return ns_smart_device_link::ns_smart_objects::CSmartSchema
*/
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_2_notification(
+ static ns_smart_device_link::ns_smart_objects::CSmartSchema InitFunction_val_2_notification(
const TStructsSchemaItems &struct_schema_items,
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items);
@@ -304,7 +304,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
* @note Issue2
* @note Issue3
*/
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct1(
+ static ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> InitStructSchemaItem_Struct1(
const TStructsSchemaItems &struct_schema_items);
/**
@@ -314,7 +314,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
* @note Issue2
* @note Issue3
*/
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct2(
+ static ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> InitStructSchemaItem_Struct2(
const TStructsSchemaItems &struct_schema_items);
};
diff --git a/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc b/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc
index 53e5b7f78a..a62f485eb9 100644
--- a/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc
+++ b/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.cc
@@ -50,7 +50,7 @@
#include "SmartObjects/TNumberSchemaItem.hpp"
#include "SmartObjects/TSchemaItemParameter.hpp"
-using namespace NsSmartDeviceLink::NsSmartObjects;
+using namespace ns_smart_device_link::ns_smart_objects;
XXX::YYY::ZZZ::Test::Test()
: CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType>() {
@@ -76,7 +76,7 @@ TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::ProvideObjectSchemaItemForStruct(
return it->second;
}
- return NsSmartDeviceLink::NsSmartObjects::CAlwaysFalseSchemaItem::create();
+ return ns_smart_device_link::ns_smart_objects::CAlwaysFalseSchemaItem::create();
}
void XXX::YYY::ZZZ::Test::InitStructSchemes(
@@ -94,9 +94,9 @@ void XXX::YYY::ZZZ::Test::InitFunctionSchemes(
const TStructsSchemaItems &struct_schema_items,
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items) {
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::name1, messageType::request), InitFunction_name1_request(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::response), InitFunction_val_1_response(struct_schema_items, function_id_items, message_type_items)));
- functions_schemes_.insert(std::make_pair(NsSmartDeviceLink::NsJSONHandler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_2, messageType::notification), InitFunction_val_2_notification(struct_schema_items, function_id_items, message_type_items)));
+ functions_schemes_.insert(std::make_pair(ns_smart_device_link::ns_json_handler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::name1, messageType::request), InitFunction_name1_request(struct_schema_items, function_id_items, message_type_items)));
+ functions_schemes_.insert(std::make_pair(ns_smart_device_link::ns_json_handler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_1, messageType::response), InitFunction_val_1_response(struct_schema_items, function_id_items, message_type_items)));
+ functions_schemes_.insert(std::make_pair(ns_smart_device_link::ns_json_handler::SmartSchemaKey<FunctionID::eType, messageType::eType>(FunctionID::val_2, messageType::notification), InitFunction_val_2_notification(struct_schema_items, function_id_items, message_type_items)));
}
//------------- Functions schemes initialization -------------
@@ -136,15 +136,15 @@ CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_name1_request(
schema_members["param2"] = CObjectSchemaItem::SMember(param2_SchemaItem, true);
std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
return CSmartSchema(CObjectSchemaItem::create(root_members_map));
}
@@ -156,15 +156,15 @@ CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_1_response(
std::map<std::string, CObjectSchemaItem::SMember> schema_members;
std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_CORRELATION_ID] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
return CSmartSchema(CObjectSchemaItem::create(root_members_map));
}
@@ -176,14 +176,14 @@ CSmartSchema XXX::YYY::ZZZ::Test::InitFunction_val_2_notification(
std::map<std::string, CObjectSchemaItem::SMember> schema_members;
std::map<std::string, CObjectSchemaItem::SMember> params_members;
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
- params_members[NsSmartDeviceLink::NsJSONHandler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_FUNCTION_ID] = CObjectSchemaItem::SMember(TEnumSchemaItem<FunctionID::eType>::create(function_id_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_MESSAGE_TYPE] = CObjectSchemaItem::SMember(TEnumSchemaItem<messageType::eType>::create(message_type_items), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_VERSION] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
+ params_members[ns_smart_device_link::ns_json_handler::strings::S_PROTOCOL_TYPE] = CObjectSchemaItem::SMember(TNumberSchemaItem<int>::create(), true);
std::map<std::string, CObjectSchemaItem::SMember> root_members_map;
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
- root_members_map[NsSmartDeviceLink::NsJSONHandler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_MSG_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(schema_members), true);
+ root_members_map[ns_smart_device_link::ns_json_handler::strings::S_PARAMS] = CObjectSchemaItem::SMember(CObjectSchemaItem::create(params_members), true);
return CSmartSchema(CObjectSchemaItem::create(root_members_map));
}
@@ -280,8 +280,8 @@ TSharedPtr<ISchemaItem> XXX::YYY::ZZZ::Test::InitStructSchemaItem_Struct2(
//-------------- String to value enum mapping ----------------
-namespace NsSmartDeviceLink {
-namespace NsSmartObjects {
+namespace ns_smart_device_link {
+namespace ns_smart_objects {
template <>
const std::map<XXX::YYY::ZZZ::Enum1::eType, std::string> &TEnumSchemaItem<XXX::YYY::ZZZ::Enum1::eType>::getEnumElementsStringRepresentation() {
@@ -361,6 +361,6 @@ const std::map<XXX::YYY::ZZZ::messageType::eType, std::string> &TEnumSchemaItem<
return enum_string_representation;
}
-} // NsSmartObjects
-} // NsSmartDeviceLink
+} // ns_smart_objects
+} // ns_smart_device_link
diff --git a/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h b/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h
index 826ea55ce1..cf22f0711f 100644
--- a/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h
+++ b/tools/InterfaceGenerator/test/generator/generators/test_expected_sdlrpc.h
@@ -218,7 +218,7 @@ enum eType {
* param2 - value2
* param1 - value1
*/
-class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType> {
+class Test : public ns_smart_device_link::ns_json_handler::CSmartFactory<FunctionID::eType, messageType::eType, StructIdentifiers::eType> {
public:
/**
* @brief Constructor.
@@ -229,7 +229,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Type that maps of struct IDs to schema items.
*/
- typedef std::map<const StructIdentifiers::eType, NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> > TStructsSchemaItems;
+ typedef std::map<const StructIdentifiers::eType, ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> > TStructsSchemaItems;
/**
* @brief Helper that allows to make reference to struct
@@ -239,7 +239,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
*
* @return TSharedPtr of strucute
*/
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> ProvideObjectSchemaItemForStruct(
+ static ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> ProvideObjectSchemaItemForStruct(
const TStructsSchemaItems &struct_schema_items,
const StructIdentifiers::eType struct_id);
@@ -263,9 +263,9 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Method that generates schema for function Function1.
*
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
+ * @return ns_smart_device_link::ns_smart_objects::CSmartSchema
*/
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_name1_request(
+ static ns_smart_device_link::ns_smart_objects::CSmartSchema InitFunction_name1_request(
const TStructsSchemaItems &struct_schema_items,
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items);
@@ -273,9 +273,9 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Method that generates schema for function Function2.
*
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
+ * @return ns_smart_device_link::ns_smart_objects::CSmartSchema
*/
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_1_response(
+ static ns_smart_device_link::ns_smart_objects::CSmartSchema InitFunction_val_1_response(
const TStructsSchemaItems &struct_schema_items,
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items);
@@ -283,9 +283,9 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
/**
* @brief Method that generates schema for function Function2.
*
- * @return NsSmartDeviceLink::NsSmartObjects::CSmartSchema
+ * @return ns_smart_device_link::ns_smart_objects::CSmartSchema
*/
- static NsSmartDeviceLink::NsSmartObjects::CSmartSchema InitFunction_val_2_notification(
+ static ns_smart_device_link::ns_smart_objects::CSmartSchema InitFunction_val_2_notification(
const TStructsSchemaItems &struct_schema_items,
const std::set<FunctionID::eType> &function_id_items,
const std::set<messageType::eType> &message_type_items);
@@ -299,7 +299,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
* @note Issue2
* @note Issue3
*/
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct1(
+ static ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> InitStructSchemaItem_Struct1(
const TStructsSchemaItems &struct_schema_items);
/**
@@ -309,7 +309,7 @@ class Test : public NsSmartDeviceLink::NsJSONHandler::CSmartFactory<FunctionID::
* @note Issue2
* @note Issue3
*/
- static NsSmartDeviceLink::NsSmartObjects::TSharedPtr<NsSmartDeviceLink::NsSmartObjects::ISchemaItem> InitStructSchemaItem_Struct2(
+ static ns_smart_device_link::ns_smart_objects::TSharedPtr<ns_smart_device_link::ns_smart_objects::ISchemaItem> InitStructSchemaItem_Struct2(
const TStructsSchemaItems &struct_schema_items);
};