summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h8
-rw-r--r--src/components/application_manager/include/application_manager/policies/custom_vehicle_data_provider.h7
-rw-r--r--src/components/application_manager/include/application_manager/policies/policy_handler.h3
-rw-r--r--src/components/application_manager/include/application_manager/request_info.h2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_rc_helpers.h4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/mock_rc_helpers.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/CMakeLists.txt6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc20
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc45
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_window_request_test.cc3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager.h9
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager_impl.h4
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h1
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc46
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc46
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/custom_vehicle_data_manager_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/include/vehicle_info_plugin/mock_custom_vehicle_data_manager.h2
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc46
-rw-r--r--src/components/application_manager/src/commands/request_from_hmi.cc4
-rw-r--r--src/components/application_manager/src/hmi_interfaces_impl.cc1
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc5
-rw-r--r--src/components/application_manager/src/request_controller.cc6
-rw-r--r--src/components/application_manager/src/request_info.cc8
-rw-r--r--src/components/application_manager/test/application_manager_impl_test.cc51
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc45
-rw-r--r--src/components/include/policy/policy_external/policy/policy_manager.h7
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h7
-rw-r--r--src/components/include/test/application_manager/policies/mock_custom_vehicle_data_provider.h3
-rw-r--r--src/components/include/test/application_manager/policies/mock_policy_handler_interface.h3
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_cache_manager.h2
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_policy_manager.h2
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h2
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h2
-rw-r--r--src/components/interfaces/HMI_API.xml47
-rw-r--r--src/components/interfaces/MOBILE_API.xml162
-rw-r--r--src/components/media_manager/src/pipe_streamer_adapter.cc57
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager.h22
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager_interface.h7
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h3
-rw-r--r--src/components/policy/policy_external/src/cache_manager.cc61
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc5
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager.h22
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager_interface.h7
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h3
-rw-r--r--src/components/policy/policy_regular/src/cache_manager.cc62
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc5
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc9
-rw-r--r--tools/InterfaceGenerator/MsgVersionGenerate.py8
-rwxr-xr-xtools/InterfaceGenerator/generator/generators/SmartFactoryBase.py12
-rwxr-xr-xtools/InterfaceGenerator/generator/parsers/RPCBase.py2
58 files changed, 727 insertions, 232 deletions
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h
index 4b1f8a4601..e88c954c18 100644
--- a/src/components/application_manager/include/application_manager/application_manager_impl.h
+++ b/src/components/application_manager/include/application_manager/application_manager_impl.h
@@ -1138,6 +1138,14 @@ class ApplicationManagerImpl
private:
/**
+ * @brief Removes service status record for service that failed to start
+ * @param app Application whose service status record should be removed
+ * @param Service type which status record should be removed
+ */
+ bool HandleRejectedServiceStatus(
+ ApplicationSharedPtr app,
+ const hmi_apis::Common_ServiceType::eType service_type);
+ /**
* @brief PullLanguagesInfo allows to pull information about languages.
*
* @param app_data entry to parse
diff --git a/src/components/application_manager/include/application_manager/policies/custom_vehicle_data_provider.h b/src/components/application_manager/include/application_manager/policies/custom_vehicle_data_provider.h
index edd0a29c48..307f0b93df 100644
--- a/src/components/application_manager/include/application_manager/policies/custom_vehicle_data_provider.h
+++ b/src/components/application_manager/include/application_manager/policies/custom_vehicle_data_provider.h
@@ -19,6 +19,13 @@ class VehicleDataItemProvider {
*/
virtual const std::vector<rpc::policy_table_interface_base::VehicleDataItem>
GetVehicleDataItems() const = 0;
+
+ /**
+ * @brief Gets vehicle data items removed by policies
+ * @return Structure with vehicle data items
+ */
+ virtual std::vector<rpc::policy_table_interface_base::VehicleDataItem>
+ GetRemovedVehicleDataItems() const = 0;
};
} // namespace policy
diff --git a/src/components/application_manager/include/application_manager/policies/policy_handler.h b/src/components/application_manager/include/application_manager/policies/policy_handler.h
index 61cf2cf480..e4d4cd7fa2 100644
--- a/src/components/application_manager/include/application_manager/policies/policy_handler.h
+++ b/src/components/application_manager/include/application_manager/policies/policy_handler.h
@@ -704,6 +704,9 @@ class PolicyHandler : public PolicyHandlerInterface,
const std::vector<rpc::policy_table_interface_base::VehicleDataItem>
GetVehicleDataItems() const OVERRIDE;
+ std::vector<rpc::policy_table_interface_base::VehicleDataItem>
+ GetRemovedVehicleDataItems() const OVERRIDE;
+
void OnLockScreenDismissalStateChanged() FINAL;
protected:
diff --git a/src/components/application_manager/include/application_manager/request_info.h b/src/components/application_manager/include/application_manager/request_info.h
index 1b140e2108..6900a50926 100644
--- a/src/components/application_manager/include/application_manager/request_info.h
+++ b/src/components/application_manager/include/application_manager/request_info.h
@@ -127,7 +127,7 @@ struct RequestInfo {
}
uint64_t hash();
static uint64_t GenerateHash(uint32_t var1, uint32_t var2);
- static uint32_t HmiConnectoinKey;
+ static uint32_t HmiConnectionKey;
protected:
RequestPtr request_;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_rc_helpers.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_rc_helpers.h
index 2473909ce5..c73472d2a8 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_rc_helpers.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_rc_helpers.h
@@ -84,6 +84,10 @@ class MockRCHelpers {
std::vector<bool>(const smart_objects::SmartObject& consents));
MOCK_METHOD1(RemoveRedundantGPSDataFromIVDataMsg,
void(smart_objects::SmartObject& msg_params));
+ MOCK_METHOD2(
+ MergeModuleData,
+ smart_objects::SmartObject(const smart_objects::SmartObject& data1,
+ const smart_objects::SmartObject& data2));
static MockRCHelpers* rc_helpers_mock();
};
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/mock_rc_helpers.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/mock_rc_helpers.cc
index d5c8d09ae9..3e60591c6b 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/mock_rc_helpers.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/mock_rc_helpers.cc
@@ -34,6 +34,12 @@
namespace rc_rpc_plugin {
+smart_objects::SmartObject RCHelpers::MergeModuleData(
+ const smart_objects::SmartObject& data1,
+ const smart_objects::SmartObject& data2) {
+ return MockRCHelpers::rc_helpers_mock()->MergeModuleData(data1, data2);
+}
+
const std::function<std::string(const std::string&)>
rc_rpc_plugin::RCHelpers::GetModuleTypeToDataMapping() {
return MockRCHelpers::rc_helpers_mock()->GetModuleTypeToDataMapping();
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/CMakeLists.txt b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/CMakeLists.txt
index c665e98448..4b10d34643 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/CMakeLists.txt
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager/CMakeLists.txt
@@ -54,7 +54,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/resource_allocation_manager_impl_test.cc
set(RC_COMMANDS_TEST_SOURCE_DIR ${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/test/commands)
set(RC_COMMANDS_SOURCE_DIR ${COMPONENTS_DIR}/application_manager/rpc_plugins/rc_rpc_plugin/src/commands)
-collect_sources(COMMANDS_SOURCES "${RC_COMMANDS_TEST_DIR}" "${RC_COMMANDS_TEST_SOURCE_DIR}")
+collect_sources(COMMANDS_SOURCES "${RC_COMMANDS_SOURCE_DIR}" "${RC_COMMANDS_TEST_SOURCE_DIR}")
set(LIBRARIES
ApplicationManager
@@ -77,5 +77,7 @@ if(ENABLE_LOG)
list(APPEND LIBRARIES expat -L${EXPAT_LIBS_DIRECTORY})
endif()
-create_test("resource_allocation_manager_test" "${COMMANDS_SOURCES}" "${LIBRARIES}" "${RESOURCE_ALLOC_MANAGER_TEST_SOURCES}")
+list(APPEND COMMANDS_SOURCES ${RESOURCE_ALLOC_MANAGER_TEST_SOURCES})
+
+create_test("resource_allocation_manager_test" "${COMMANDS_SOURCES}" "${LIBRARIES}")
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc
index bf449db808..793e70d9e1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_alert_request.cc
@@ -47,7 +47,11 @@ UIAlertRequest::UIAlertRequest(
application_manager,
rpc_service,
hmi_capabilities,
- policy_handle) {}
+ policy_handle) {
+ const auto& msg_params = (*message_)[strings::msg_params];
+ uint32_t request_timeout = msg_params[strings::duration].asUInt();
+ default_timeout_ += request_timeout;
+}
UIAlertRequest::~UIAlertRequest() {}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc
index aa5878590b..a07c72cbf4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_perform_interaction_request.cc
@@ -47,7 +47,11 @@ UIPerformInteractionRequest::UIPerformInteractionRequest(
application_manager,
rpc_service,
hmi_capabilities,
- policy_handle) {}
+ policy_handle) {
+ const auto& msg_params = (*message_)[strings::msg_params];
+ uint32_t request_timeout = msg_params[strings::timeout].asUInt();
+ default_timeout_ += request_timeout;
+}
UIPerformInteractionRequest::~UIPerformInteractionRequest() {}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc
index de639420fb..cad68e23aa 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_scrollable_message_request.cc
@@ -47,7 +47,11 @@ UIScrollableMessageRequest::UIScrollableMessageRequest(
application_manager,
rpc_service,
hmi_capabilities,
- policy_handle) {}
+ policy_handle) {
+ const auto& msg_params = (*message_)[strings::msg_params];
+ uint32_t request_timeout = msg_params[strings::timeout].asUInt();
+ default_timeout_ += request_timeout;
+}
UIScrollableMessageRequest::~UIScrollableMessageRequest() {}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc
index 56fca3d062..eae8cc523c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_slider_request.cc
@@ -47,7 +47,11 @@ UISliderRequest::UISliderRequest(
application_manager,
rpc_service,
hmi_capabilities,
- policy_handle) {}
+ policy_handle) {
+ const auto& msg_params = (*message_)[strings::msg_params];
+ uint32_t request_timeout = msg_params[strings::timeout].asUInt();
+ default_timeout_ += request_timeout;
+}
UISliderRequest::~UISliderRequest() {}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc
index ae94019b25..4257158f6a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_perform_interaction_request.cc
@@ -47,7 +47,11 @@ VRPerformInteractionRequest::VRPerformInteractionRequest(
application_manager,
rpc_service,
hmi_capabilities,
- policy_handle) {}
+ policy_handle) {
+ const auto& msg_params = (*message_)[strings::msg_params];
+ uint32_t request_timeout = msg_params[strings::timeout].asUInt();
+ default_timeout_ += request_timeout;
+}
VRPerformInteractionRequest::~VRPerformInteractionRequest() {}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
index 7a0fd79b08..57912e7087 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
@@ -73,18 +73,15 @@ AlertRequest::~AlertRequest() {}
bool AlertRequest::Init() {
/* Timeout in milliseconds.
- If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::duration)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::duration].asUInt();
- } else {
- const int32_t def_value = 5000;
- default_timeout_ = def_value;
- }
+ If omitted a standard value of 10000 milliseconds is used.*/
+ auto& msg_params = (*message_)[strings::msg_params];
+ uint32_t duration_timeout = msg_params[strings::duration].asUInt();
+
+ default_timeout_ += duration_timeout;
// If soft buttons are present, SDL will not use initiate timeout tracking for
// response.
- if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
+ if (msg_params.keyExists(strings::soft_buttons)) {
LOG4CXX_INFO(logger_,
"Request contains soft buttons - request timeout "
"will be set to 0.");
@@ -355,6 +352,10 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
(*message_)[strings::msg_params][strings::soft_buttons];
MessageHelper::SubscribeApplicationToSoftButton(
(*message_)[strings::msg_params], app, function_id());
+ msg_params[strings::duration] = 0;
+ } else {
+ msg_params[strings::duration] =
+ (*message_)[strings::msg_params][strings::duration].asUInt();
}
if ((*message_)[strings::msg_params].keyExists(strings::alert_icon)) {
@@ -375,7 +376,6 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
// app_id
msg_params[strings::app_id] = app_id;
- msg_params[strings::duration] = default_timeout_;
// NAVI platform progressIndicator
if ((*message_)[strings::msg_params].keyExists(strings::progress_indicator)) {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc
index 21b54b4e9f..b69b0ee801 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc
@@ -307,7 +307,10 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows(
const auto window_type = static_cast<mobile_apis::WindowType::eType>(
(*message_)[strings::msg_params][strings::window_type].asInt());
- const auto display_capabilities = app->display_capabilities();
+ auto display_capabilities = hmi_capabilities_.system_display_capabilities();
+ if (app->display_capabilities()) {
+ display_capabilities = app->display_capabilities();
+ }
if (!display_capabilities) {
LOG4CXX_WARN(logger_, "Application has no capabilities");
@@ -333,7 +336,10 @@ bool CreateWindowRequest::DoesExceedMaxAllowedWindows(
return false;
});
- DCHECK(find_res != windowTypeSupported->end());
+ if (find_res == windowTypeSupported->end()) {
+ LOG4CXX_WARN(logger_, "Requested Window Type is not supported by the HMI");
+ return true;
+ }
if (get_current_number_of_windows(window_type) + 1 >
(*find_res)[strings::maximum_number_of_windows].asUInt()) {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc
index cc109afcf0..622f64f792 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc
@@ -82,17 +82,18 @@ PerformInteractionRequest::~PerformInteractionRequest() {}
bool PerformInteractionRequest::Init() {
/* Timeout in milliseconds.
If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- }
+ const auto& msg_params = (*message_)[strings::msg_params];
+ uint32_t request_timeout = msg_params[strings::timeout].asUInt();
interaction_mode_ = static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
+ msg_params[strings::interaction_mode].asInt());
if (mobile_apis::InteractionMode::BOTH == interaction_mode_ ||
mobile_apis::InteractionMode::MANUAL_ONLY == interaction_mode_) {
- default_timeout_ *= 2;
+ const uint32_t increase_value = 2;
+ default_timeout_ += request_timeout * increase_value;
+ } else {
+ default_timeout_ += request_timeout;
}
return true;
}
@@ -284,7 +285,7 @@ void PerformInteractionRequest::onTimeOut() {
CommandRequestImpl::onTimeOut();
} else {
application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
+ connection_key(), correlation_id(), default_timeout_);
}
break;
}
@@ -341,7 +342,7 @@ bool PerformInteractionRequest::ProcessVRResponse(
}
LOG4CXX_DEBUG(logger_, "Update timeout for UI");
application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
+ connection_key(), correlation_id(), default_timeout_);
return false;
}
@@ -358,6 +359,13 @@ bool PerformInteractionRequest::ProcessVRResponse(
msg_params[strings::choice_id] = choice_id;
}
+ if (mobile_apis::InteractionMode::BOTH == interaction_mode_ ||
+ mobile_apis::InteractionMode::MANUAL_ONLY == interaction_mode_) {
+ LOG4CXX_DEBUG(logger_, "Update timeout for UI");
+ application_manager_.updateRequestTimeout(
+ connection_key(), correlation_id(), default_timeout_);
+ }
+
const bool is_vr_result_success = Compare<Common_Result::eType, EQ, ONE>(
vr_result_code_, Common_Result::SUCCESS, Common_Result::WARNINGS);
@@ -476,12 +484,8 @@ void PerformInteractionRequest::SendUIPerformInteractionRequest(
}
}
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- msg_params[strings::timeout] = default_timeout_ / 2;
- } else {
- msg_params[strings::timeout] = default_timeout_;
- }
+ msg_params[strings::timeout] =
+ (*message_)[strings::msg_params][strings::timeout].asUInt();
msg_params[strings::app_id] = app->app_id();
if (mobile_apis::InteractionMode::VR_ONLY != mode) {
msg_params[strings::choice_set] =
@@ -662,16 +666,9 @@ void PerformInteractionRequest::SendVRPerformInteractionRequest(
return;
}
- mobile_apis::InteractionMode::eType mode =
- static_cast<mobile_apis::InteractionMode::eType>(
- (*message_)[strings::msg_params][strings::interaction_mode].asInt());
-
- if (mobile_apis::InteractionMode::BOTH == mode ||
- mobile_apis::InteractionMode::MANUAL_ONLY == mode) {
- msg_params[strings::timeout] = default_timeout_ / 2;
- } else {
- msg_params[strings::timeout] = default_timeout_;
- }
+ msg_params[strings::timeout] =
+ (*message_)[strings::msg_params][strings::timeout].asUInt();
+ ;
msg_params[strings::app_id] = app->app_id();
StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
SendHMIRequest(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc
index 5bef1d56fc..90dbb91b5f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/scrollable_message_request.cc
@@ -65,13 +65,9 @@ ScrollableMessageRequest::~ScrollableMessageRequest() {}
bool ScrollableMessageRequest::Init() {
/* Timeout in milliseconds.
If omitted a standard value of 10000 milliseconds is used.*/
- if ((*message_)[strings::msg_params].keyExists(strings::timeout)) {
- default_timeout_ =
- (*message_)[strings::msg_params][strings::timeout].asUInt();
- } else {
- const int32_t def_value = 30000;
- default_timeout_ = def_value;
- }
+ uint32_t request_timeout =
+ (*message_)[strings::msg_params][strings::timeout].asUInt();
+ default_timeout_ += request_timeout;
return true;
}
@@ -110,7 +106,8 @@ void ScrollableMessageRequest::Run() {
msg_params[hmi_request::message_text][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::scroll_message_body];
msg_params[strings::app_id] = app->app_id();
- msg_params[strings::timeout] = default_timeout_;
+ msg_params[strings::timeout] =
+ (*message_)[strings::msg_params][strings::timeout].asUInt();
if ((*message_)[strings::msg_params].keyExists(strings::cancel_id)) {
msg_params[strings::cancel_id] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_window_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_window_request_test.cc
index 02a6591a2d..905c6ceb72 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_window_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/create_window_request_test.cc
@@ -164,6 +164,9 @@ class CreateWindowRequestTest
ON_CALL(*mock_app_, display_capabilities())
.WillByDefault(Return(display_capabilities_));
+ ON_CALL(mock_hmi_capabilities_, system_display_capabilities())
+ .WillByDefault(Return(display_capabilities_));
+
window_params_map_lock_ptr_ = std::make_shared<sync_primitives::Lock>();
DataAccessor<am::WindowParamsMap> window_params_map(
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc
index 3820112ea5..6b17aa238d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/scrollable_message_test.cc
@@ -175,7 +175,7 @@ TEST_F(ScrollableMessageRequestTest, Init_CorrectTimeout_SUCCESS) {
mobile_apis::InteractionMode::MANUAL_ONLY;
EXPECT_EQ(kDefaultTimeout_, command_->default_timeout());
command_->Init();
- EXPECT_EQ(kTimeOut, command_->default_timeout());
+ EXPECT_EQ(kTimeOut + kDefaultTimeout_, command_->default_timeout());
}
TEST_F(ScrollableMessageRequestTest, Init_CorrectTimeout_UNSUCCESS) {
@@ -183,7 +183,7 @@ TEST_F(ScrollableMessageRequestTest, Init_CorrectTimeout_UNSUCCESS) {
mobile_apis::InteractionMode::MANUAL_ONLY;
EXPECT_EQ(kDefaultTimeout_, command_->default_timeout());
command_->Init();
- EXPECT_EQ(kTimeOut, command_->default_timeout());
+ EXPECT_EQ(kDefaultTimeout_, command_->default_timeout());
}
TEST_F(ScrollableMessageRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager.h
index b34a9f84b8..9cac76b954 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager.h
@@ -41,6 +41,15 @@ class CustomVehicleDataManager {
virtual void OnPolicyEvent(plugin_manager::PolicyEvent policy_event) = 0;
virtual bool IsValidCustomVehicleDataName(const std::string& name) const = 0;
+
+ /**
+ * @brief Checks whether custom vehicle data name was removed after the last
+ * PTU or not
+ * @param name vehicle item name to check
+ * @return true if vehicle data with this name was removed after the last PTU
+ */
+ virtual bool IsRemovedCustomVehicleDataName(
+ const std::string& name) const = 0;
};
} // namespace vehicle_info_plugin
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_VEHICLE_INFO_PLUGIN_INCLUDE_VEHICLE_INFO_PLUGIN_CUSTOM_VEHICLE_DATA_MANAGER_H_
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager_impl.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager_impl.h
index 701bb1ba74..239c4edb90 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager_impl.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/custom_vehicle_data_manager_impl.h
@@ -42,6 +42,8 @@ class CustomVehicleDataManagerImpl : public CustomVehicleDataManager {
bool IsValidCustomVehicleDataName(const std::string& name) const OVERRIDE;
+ bool IsRemovedCustomVehicleDataName(const std::string& name) const OVERRIDE;
+
private:
class RPCParams {
public:
@@ -83,6 +85,8 @@ class CustomVehicleDataManagerImpl : public CustomVehicleDataManager {
const OptionalDataItem FindSchemaByNameNonRecursive(
const std::string& name) const;
+ const OptionalDataItem FindRemovedSchemaByNameNonRecursive(
+ const std::string& name) const;
const OptionalDataItem FindSchemaByKeyNonRecursive(
const std::string& key) const;
const OptionalDataItem FindSchemaByNameRecursive(
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h
index 3f6c078522..f0f68af298 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h
@@ -72,6 +72,7 @@ class VehicleInfoPlugin : public plugins::RPCPlugin {
VehicleInfoAppExtension& ext);
private:
+ void UnsubscribeFromRemovedVDItems();
smart_objects::SmartObjectSPtr GetUnsubscribeIVIRequest(
const std::vector<std::string>& ivi_names);
void DeleteSubscriptions(app_mngr::ApplicationSharedPtr app);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
index 334c876d76..9df6d922aa 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
@@ -77,6 +77,12 @@ bool CustomVehicleDataManagerImpl::IsValidCustomVehicleDataName(
return schema.is_initialized();
}
+bool CustomVehicleDataManagerImpl::IsRemovedCustomVehicleDataName(
+ const std::string& name) const {
+ const auto& schema = FindRemovedSchemaByNameNonRecursive(name);
+ return schema.is_initialized();
+}
+
void CustomVehicleDataManagerImpl::CreateMobileMessageParams(
smart_objects::SmartObject& msg_params) {
using namespace application_manager;
@@ -105,11 +111,22 @@ void CustomVehicleDataManagerImpl::CreateMobileMessageParams(
const auto& item_name = schema->name;
if (policy_table::VehicleDataItem::kStruct == std::string(schema->type)) {
- const auto param =
- fill_mobile_msg(input_params[key], SearchMethod::RECURSIVE);
- if (!param.empty()) {
- out_params[item_name] = param;
+ auto& input_param = input_params[key];
+ if (*schema->array &&
+ input_param.getType() == smart_objects::SmartType_Array) {
+ for (size_t i = 0; i < input_param.length(); i++) {
+ const auto param =
+ fill_mobile_msg(input_param[i], SearchMethod::RECURSIVE);
+ out_params[item_name][i] = param;
+ }
continue;
+ } else {
+ const auto param =
+ fill_mobile_msg(input_param, SearchMethod::RECURSIVE);
+ if (!param.empty()) {
+ out_params[item_name] = param;
+ continue;
+ }
}
}
@@ -174,6 +191,12 @@ smart_objects::SmartObject CustomVehicleDataManagerImpl::CreateHMIMessageParams(
auto schema = FindSchemaByNameNonRecursive(name);
if (schema.is_initialized()) {
fill_param(fill_hmi_params, *schema, &out_params);
+ continue;
+ }
+
+ auto removed_schema = FindRemovedSchemaByNameNonRecursive(name);
+ if (removed_schema.is_initialized()) {
+ fill_param(fill_hmi_params, *removed_schema, &out_params);
}
}
@@ -497,6 +520,21 @@ CustomVehicleDataManagerImpl::FindSchemaByNameNonRecursive(
return FindSchema(oem_items, SearchMethod::NON_RECURSIVE, compare_by_name);
}
+const OptionalDataItem
+CustomVehicleDataManagerImpl::FindRemovedSchemaByNameNonRecursive(
+ const std::string& name) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ const auto& removed_oem_items =
+ vehicle_data_provider_.GetRemovedVehicleDataItems();
+ auto compare_by_name = [&name](const policy_table::VehicleDataItem& item) {
+ return (name == std::string(item.name));
+ };
+
+ return FindSchema(
+ removed_oem_items, SearchMethod::NON_RECURSIVE, compare_by_name);
+}
+
const OptionalDataItem CustomVehicleDataManagerImpl::FindSchemaByNameRecursive(
const std::string& name) const {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc
index d6d1c69461..40da7501c1 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_plugin.cc
@@ -81,6 +81,7 @@ app_mngr::CommandFactory& VehicleInfoPlugin::GetCommandFactory() {
}
void VehicleInfoPlugin::OnPolicyEvent(plugins::PolicyEvent event) {
+ UnsubscribeFromRemovedVDItems();
custom_vehicle_data_manager_->OnPolicyEvent(event);
}
@@ -96,6 +97,43 @@ void VehicleInfoPlugin::OnApplicationEvent(
}
}
+void VehicleInfoPlugin::UnsubscribeFromRemovedVDItems() {
+ typedef std::vector<std::string> StringsVector;
+
+ auto get_items_to_unsubscribe = [this]() -> StringsVector {
+ StringsVector output_items_list;
+ auto applications = application_manager_->applications();
+ for (auto& app : applications.GetData()) {
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ auto subscription_names = ext.Subscriptions();
+ for (auto& subscription_name : subscription_names) {
+ if (custom_vehicle_data_manager_->IsRemovedCustomVehicleDataName(
+ subscription_name)) {
+ ext.unsubscribeFromVehicleInfo(subscription_name);
+ if (!helpers::in_range(output_items_list, subscription_name)) {
+ LOG4CXX_DEBUG(logger_,
+ "Vehicle data item "
+ << subscription_name
+ << " has been removed by policy");
+ output_items_list.push_back(subscription_name);
+ }
+ }
+ }
+ }
+ return output_items_list;
+ };
+
+ const StringsVector items_to_unsubscribe = get_items_to_unsubscribe();
+
+ if (items_to_unsubscribe.empty()) {
+ LOG4CXX_DEBUG(logger_, "There is no data to unsubscribe");
+ return;
+ }
+
+ auto message = GetUnsubscribeIVIRequest(items_to_unsubscribe);
+ application_manager_->GetRPCService().ManageHMICommand(message);
+}
+
void VehicleInfoPlugin::ProcessResumptionSubscription(
application_manager::Application& app, VehicleInfoAppExtension& ext) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -103,9 +141,15 @@ void VehicleInfoPlugin::ProcessResumptionSubscription(
smart_objects::SmartObject(smart_objects::SmartType_Map);
msg_params[strings::app_id] = app.app_id();
const auto& subscriptions = ext.Subscriptions();
+ if (subscriptions.empty()) {
+ LOG4CXX_DEBUG(logger_, "No vehicle data to subscribe. Exiting");
+ return;
+ }
+
for (const auto& item : subscriptions) {
msg_params[item] = true;
}
+
smart_objects::SmartObjectSPtr request =
application_manager::MessageHelper::CreateModuleInfoSO(
hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData,
@@ -151,6 +195,8 @@ smart_objects::SmartObjectSPtr VehicleInfoPlugin::GetUnsubscribeIVIRequest(
if (key_name.empty()) {
// the name hasn't been found in vehicle data types
if (custom_vehicle_data_manager_->IsValidCustomVehicleDataName(
+ ivi_name) ||
+ custom_vehicle_data_manager_->IsRemovedCustomVehicleDataName(
ivi_name)) {
key_name = ivi_name;
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/custom_vehicle_data_manager_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/custom_vehicle_data_manager_test.cc
index 2ef2d285ab..7d65d989bf 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/custom_vehicle_data_manager_test.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/custom_vehicle_data_manager_test.cc
@@ -60,6 +60,8 @@ class CustomVehicleDataManagerTest : public ::testing::Test {
ON_CALL(mock_custom_vehicle_data_provider_, GetVehicleDataItems())
.WillByDefault(Return(items));
+ ON_CALL(mock_custom_vehicle_data_provider_, GetRemovedVehicleDataItems())
+ .WillByDefault(Return(policy_table::VehicleDataItems()));
custom_vd_manager_.reset(new CustomVehicleDataManagerImpl(
mock_custom_vehicle_data_provider_, mock_rpc_service_));
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/include/vehicle_info_plugin/mock_custom_vehicle_data_manager.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/include/vehicle_info_plugin/mock_custom_vehicle_data_manager.h
index 472568d378..9a7435f980 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/include/vehicle_info_plugin/mock_custom_vehicle_data_manager.h
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/include/vehicle_info_plugin/mock_custom_vehicle_data_manager.h
@@ -18,6 +18,8 @@ class MockCustomVehicleDataManager : public CustomVehicleDataManager {
MOCK_METHOD1(OnPolicyEvent, void(plugin_manager::PolicyEvent policy_event));
MOCK_CONST_METHOD1(IsValidCustomVehicleDataName,
bool(const std::string& name));
+ MOCK_CONST_METHOD1(IsRemovedCustomVehicleDataName,
+ bool(const std::string& name));
};
} // namespace vehicle_info_plugin
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 4cd1a7764f..8044e8b6cd 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -2068,6 +2068,51 @@ void ApplicationManagerImpl::ProcessServiceStatusUpdate(
service_type, service_event, reason, app_id);
rpc_service_->ManageHMICommand(notification);
+
+ if (hmi_apis::Common_ServiceEvent::REQUEST_REJECTED == service_event &&
+ HandleRejectedServiceStatus(app, service_type)) {
+ state_ctrl_.SetRegularState(app,
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW,
+ mobile_apis::HMILevel::HMI_NONE,
+ true);
+ }
+}
+
+bool ApplicationManagerImpl::HandleRejectedServiceStatus(
+ ApplicationSharedPtr app,
+ const hmi_apis::Common_ServiceType::eType service_type) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!app) {
+ LOG4CXX_WARN(logger_, "Received invalid app");
+ return false;
+ }
+
+ switch (service_type) {
+ case hmi_apis::Common_ServiceType::VIDEO:
+ case hmi_apis::Common_ServiceType::AUDIO: {
+ {
+ sync_primitives::AutoLock lock(navi_service_status_lock_);
+ auto app_services = navi_service_status_.find(app->app_id());
+ if (navi_service_status_.end() != app_services) {
+ navi_service_status_.erase(app_services);
+ }
+ }
+ LOG4CXX_DEBUG(logger_,
+ "The start of service"
+ << service_type << " for appID: " << app
+ << " is failed. Service info has been removed");
+ return true;
+ }
+ case hmi_apis::Common_ServiceType::RPC: {
+ connection_handler().SendEndService(app->app_id(),
+ protocol_handler::ServiceType::kRpc);
+ LOG4CXX_DEBUG(logger_, "RPC service for appID: " << app << " is stopped");
+ return true;
+ }
+ default:
+ LOG4CXX_DEBUG(logger_, "Unknown service type: " << service_type);
+ return false;
+ }
}
void ApplicationManagerImpl::OnSecondaryTransportStartedCallback(
@@ -3365,6 +3410,7 @@ void ApplicationManagerImpl::EndNaviServices(uint32_t app_id) {
connection_handler().SendEndService(app_id, ServiceType::kAudio);
app->StopStreamingForce(ServiceType::kAudio);
}
+
DisallowStreaming(app_id);
navi_app_to_stop_.push_back(app_id);
diff --git a/src/components/application_manager/src/commands/request_from_hmi.cc b/src/components/application_manager/src/commands/request_from_hmi.cc
index 873d9a844f..576287286f 100644
--- a/src/components/application_manager/src/commands/request_from_hmi.cc
+++ b/src/components/application_manager/src/commands/request_from_hmi.cc
@@ -199,7 +199,7 @@ void RequestFromHMI::SendProviderRequest(
if (hmi_destination) {
LOG4CXX_DEBUG(logger_, "Sending Request to HMI Provider");
application_manager_.IncreaseForwardedRequestTimeout(
- application_manager::request_controller::RequestInfo::HmiConnectoinKey,
+ application_manager::request_controller::RequestInfo::HmiConnectionKey,
correlation_id());
SendHMIRequest(hmi_function_id, &(*msg)[strings::msg_params], use_events);
return;
@@ -217,7 +217,7 @@ void RequestFromHMI::SendProviderRequest(
LOG4CXX_DEBUG(logger_, "Sending Request to Mobile Provider");
application_manager_.IncreaseForwardedRequestTimeout(
- application_manager::request_controller::RequestInfo::HmiConnectoinKey,
+ application_manager::request_controller::RequestInfo::HmiConnectionKey,
correlation_id());
SendMobileRequest(
mobile_function_id, app, &(*msg)[strings::msg_params], use_events);
diff --git a/src/components/application_manager/src/hmi_interfaces_impl.cc b/src/components/application_manager/src/hmi_interfaces_impl.cc
index d0e888efb2..0c33ea4b11 100644
--- a/src/components/application_manager/src/hmi_interfaces_impl.cc
+++ b/src/components/application_manager/src/hmi_interfaces_impl.cc
@@ -156,7 +156,6 @@ generate_function_to_interface_convert_map() {
convert_map[UI_OnDriverDistraction] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_SetAppIcon] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_SetDisplayLayout] = HmiInterfaces::HMI_INTERFACE_UI;
- convert_map[UI_ShowCustomForm] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_OnKeyboardInput] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_OnTouchEvent] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_Slider] = HmiInterfaces::HMI_INTERFACE_UI;
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index b0a4c4586d..09dcb2c7ad 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -2325,6 +2325,11 @@ policy::PolicyHandler::GetVehicleDataItems() const {
return policy_manager_->GetVehicleDataItems();
}
+std::vector<rpc::policy_table_interface_base::VehicleDataItem>
+policy::PolicyHandler::GetRemovedVehicleDataItems() const {
+ return policy_manager_->GetRemovedVehicleDataItems();
+}
+
#ifdef EXTERNAL_PROPRIETARY_MODE
const MetaInfo PolicyHandler::GetMetaInfo() const {
POLICY_LIB_CHECK(MetaInfo());
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index 883db0b4ac..eaebaf4861 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -292,7 +292,7 @@ void RequestController::OnMobileResponse(const uint32_t mobile_correlation_id,
void RequestController::OnHMIResponse(const uint32_t correlation_id,
const int32_t function_id) {
LOG4CXX_AUTO_TRACE(logger_);
- TerminateRequest(correlation_id, RequestInfo::HmiConnectoinKey, function_id);
+ TerminateRequest(correlation_id, RequestInfo::HmiConnectionKey, function_id);
}
void RequestController::terminateWaitingForExecutionAppRequests(
@@ -339,7 +339,7 @@ void RequestController::terminateAppRequests(const uint32_t& app_id) {
void RequestController::terminateAllHMIRequests() {
LOG4CXX_AUTO_TRACE(logger_);
- terminateWaitingForResponseAppRequests(RequestInfo::HmiConnectoinKey);
+ terminateWaitingForResponseAppRequests(RequestInfo::HmiConnectionKey);
}
void RequestController::terminateAllMobileRequests() {
@@ -448,7 +448,7 @@ void RequestController::TimeoutThread() {
const uint32_t experied_app_id = probably_expired->app_id();
probably_expired->request()->onTimeOut();
- if (RequestInfo::HmiConnectoinKey == probably_expired->app_id()) {
+ if (RequestInfo::HmiConnectionKey == probably_expired->app_id()) {
LOG4CXX_DEBUG(logger_,
"Erase HMI request: " << probably_expired->requestId());
waiting_for_response_.RemoveRequest(probably_expired);
diff --git a/src/components/application_manager/src/request_info.cc b/src/components/application_manager/src/request_info.cc
index bbcda06b43..4f1e0a8f07 100644
--- a/src/components/application_manager/src/request_info.cc
+++ b/src/components/application_manager/src/request_info.cc
@@ -42,12 +42,12 @@ namespace request_controller {
CREATE_LOGGERPTR_GLOBAL(logger_, "RequestController")
-uint32_t RequestInfo::HmiConnectoinKey = 0;
+uint32_t RequestInfo::HmiConnectionKey = 0;
HMIRequestInfo::HMIRequestInfo(RequestPtr request, const uint64_t timeout_msec)
: RequestInfo(request, HMIRequest, timeout_msec) {
correlation_id_ = request_->correlation_id();
- app_id_ = RequestInfo::HmiConnectoinKey;
+ app_id_ = RequestInfo::HmiConnectionKey;
}
HMIRequestInfo::HMIRequestInfo(RequestPtr request,
@@ -55,7 +55,7 @@ HMIRequestInfo::HMIRequestInfo(RequestPtr request,
const uint64_t timeout_msec)
: RequestInfo(request, HMIRequest, start_time, timeout_msec) {
correlation_id_ = request_->correlation_id();
- app_id_ = RequestInfo::HmiConnectoinKey;
+ app_id_ = RequestInfo::HmiConnectionKey;
}
MobileRequestInfo::MobileRequestInfo(RequestPtr request,
@@ -252,7 +252,7 @@ uint32_t RequestInfoSet::RemoveByConnectionKey(uint32_t connection_key) {
uint32_t RequestInfoSet::RemoveMobileRequests() {
LOG4CXX_AUTO_TRACE(logger_);
return RemoveRequests(AppIdCompararator(AppIdCompararator::NotEqual,
- RequestInfo::HmiConnectoinKey));
+ RequestInfo::HmiConnectionKey));
}
const size_t RequestInfoSet::Size() {
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 ff1a9b047d..152d577cda 100644
--- a/src/components/application_manager/test/application_manager_impl_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_test.cc
@@ -39,12 +39,14 @@
#include "application_manager/application.h"
#include "application_manager/application_impl.h"
#include "application_manager/application_manager_impl.h"
+#include "application_manager/hmi_state.h"
#include "application_manager/mock_app_service_manager.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_resumption_data.h"
#include "application_manager/mock_rpc_plugin_manager.h"
#include "application_manager/mock_rpc_service.h"
+#include "application_manager/mock_state_controller.h"
#include "application_manager/policies/mock_policy_handler_interface.h"
#include "application_manager/resumption/resume_ctrl_impl.h"
#include "application_manager/test/include/application_manager/mock_message_helper.h"
@@ -88,6 +90,7 @@ using ::testing::SaveArg;
using ::testing::SetArgPointee;
using ::testing::SetArgReferee;
+using test::components::application_manager_test::MockStateController;
using test::components::policy_test::MockPolicyHandlerInterface;
using namespace application_manager;
@@ -98,6 +101,7 @@ ACTION_P6(InvokeMemberFuncWithArg4, ptr, memberFunc, a, b, c, d) {
}
namespace {
+const uint32_t kCorrelationID = 54321u;
const std::string kDirectoryName = "./test_storage";
const uint32_t kTimeout = 10000u;
connection_handler::DeviceHandle kDeviceId = 12345u;
@@ -170,8 +174,21 @@ class ApplicationManagerImplTest
protected:
void SetUp() OVERRIDE {
CreateAppManager();
+ ON_CALL(mock_state_ctrl_,
+ SetRegularState(_,
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW,
+ mobile_apis::HMILevel::HMI_NONE,
+ true));
ON_CALL(*mock_app_ptr_, app_id()).WillByDefault(Return(kConnectionKey));
ON_CALL(*mock_app_ptr_, device()).WillByDefault(Return(kDeviceId));
+
+ HmiStatePtr hmi_state(std::make_shared<HmiState>(
+ mock_app_ptr_, mock_app_mngr_, HmiState::STATE_ID_REGULAR));
+
+ ON_CALL(*mock_app_ptr_,
+ RegularHmiState(mobile_apis::PredefinedWindows::DEFAULT_WINDOW))
+ .WillByDefault(Return(hmi_state));
+
ON_CALL(mock_session_observer_, GetDataOnSessionKey(_, _, _, _))
.WillByDefault(DoAll(SetArgPointee<3u>(kDeviceId), Return(0)));
ON_CALL(mock_connection_handler_, GetDataOnSessionKey(_, _, _, &kDeviceId))
@@ -195,6 +212,9 @@ class ApplicationManagerImplTest
smart_objects::SmartType_Map);
ON_CALL(*mock_message_helper_, CreateModuleInfoSO(_, _))
.WillByDefault(Return(request));
+ ON_CALL(*mock_message_helper_, GetBCCloseApplicationRequestToHMI(_, _))
+ .WillByDefault(Return(std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map)));
ON_CALL(*mock_policy_handler_, GetStatisticManager())
.WillByDefault(Return(mock_statistics_manager_));
}
@@ -221,13 +241,30 @@ class ApplicationManagerImplTest
app_manager_impl_.reset(new am::ApplicationManagerImpl(
mock_application_manager_settings_, mock_policy_settings_));
- mock_app_ptr_ = std::shared_ptr<MockApplication>(new MockApplication());
+ mock_app_ptr_ = std::shared_ptr<NiceMock<MockApplication> >(
+ new NiceMock<MockApplication>());
app_manager_impl_->set_protocol_handler(&mock_protocol_handler_);
app_manager_impl_->SetMockPolicyHandler(mock_policy_handler_);
ASSERT_TRUE(app_manager_impl_.get());
ASSERT_TRUE(mock_app_ptr_.get());
}
+ application_manager::commands::MessageSharedPtr CreateCloseAppMessage() {
+ using namespace application_manager;
+
+ smart_objects::SmartObjectSPtr message =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ hmi_apis::FunctionID::BasicCommunication_CloseApplication;
+ (*message)[strings::params][strings::message_type] = MessageType::kRequest;
+ (*message)[strings::params][strings::correlation_id] = kCorrelationID;
+ (*message)[strings::msg_params][strings::app_id] = kAppId;
+
+ return message;
+ }
+
void AddMockApplication() {
app_manager_impl_->AddMockApplication(mock_app_ptr_);
}
@@ -273,6 +310,7 @@ class ApplicationManagerImplTest
NiceMock<policy_test::MockPolicySettings> mock_policy_settings_;
std::shared_ptr<NiceMock<resumption_test::MockResumptionData> > mock_storage_;
+ MockStateController mock_state_ctrl_;
MockRPCService* mock_rpc_service_;
resumption_test::MockLastState mock_last_state_;
NiceMock<con_test::MockConnectionHandler> mock_connection_handler_;
@@ -284,7 +322,7 @@ class ApplicationManagerImplTest
MockAppServiceManager* mock_app_service_manager_;
application_manager::MockMessageHelper* mock_message_helper_;
- std::shared_ptr<MockApplication> mock_app_ptr_;
+ std::shared_ptr<NiceMock<MockApplication> > mock_app_ptr_;
NiceMock<protocol_handler_test::MockProtocolHandler> mock_protocol_handler_;
std::shared_ptr<NiceMock<usage_statistics_test::MockStatisticsManager> >
mock_statistics_manager_;
@@ -344,11 +382,16 @@ TEST_P(ApplicationManagerImplTest,
ON_CALL(*mock_app_ptr_, app_id()).WillByDefault(Return(kConnectionKey));
+ auto close_message = CreateCloseAppMessage();
+ ON_CALL(*mock_message_helper_, GetBCCloseApplicationRequestToHMI(_, _))
+ .WillByDefault(Return(close_message));
ON_CALL(*mock_message_helper_, CreateOnServiceUpdateNotification(_, _, _, _))
.WillByDefault(Return(notification_));
- EXPECT_CALL(*mock_rpc_service_, ManageHMICommand(notification_, _))
- .WillOnce(Return(true));
+ ON_CALL(*mock_rpc_service_, ManageHMICommand(notification_, _))
+ .WillByDefault(Return(true));
+ ON_CALL(*mock_rpc_service_, ManageHMICommand(close_message, _))
+ .WillByDefault(Return(true));
app_manager_impl_->ProcessServiceStatusUpdate(kConnectionKey,
GetParam().service_type_,
diff --git a/src/components/application_manager/test/state_controller/state_controller_test.cc b/src/components/application_manager/test/state_controller/state_controller_test.cc
index 0fe40366d6..9799dbcac2 100644
--- a/src/components/application_manager/test/state_controller/state_controller_test.cc
+++ b/src/components/application_manager/test/state_controller/state_controller_test.cc
@@ -71,6 +71,8 @@ using ::testing::ReturnRef;
using ::testing::SaveArg;
using ::testing::Truly;
+using application_manager::MockMessageHelper;
+
namespace test {
namespace components {
namespace state_controller_test {
@@ -154,7 +156,6 @@ class StateControllerImplTest : public ::testing::Test {
~StateControllerImplTest() {
Mock::VerifyAndClearExpectations(&message_helper_mock_);
}
-
NiceMock<application_manager_test::MockApplicationManager> app_manager_mock_;
NiceMock<application_manager_test::MockRPCService> mock_rpc_service_;
NiceMock<policy_test::MockPolicyHandlerInterface> policy_interface_;
@@ -1014,7 +1015,6 @@ class StateControllerImplTest : public ::testing::Test {
ON_CALL(app_manager_mock_, event_dispatcher())
.WillByDefault(ReturnRef(mock_event_dispatcher_));
state_ctrl_ = std::make_shared<am::StateControllerImpl>(app_manager_mock_);
-
ON_CALL(app_manager_mock_, applications())
.WillByDefault(Return(applications_));
ConfigureApps();
@@ -1027,6 +1027,22 @@ class StateControllerImplTest : public ::testing::Test {
delete conn_handler;
}
+ application_manager::commands::MessageSharedPtr CreateCloseAppMessage() {
+ using namespace application_manager;
+
+ smart_objects::SmartObjectSPtr message =
+ std::make_shared<smart_objects::SmartObject>(
+ smart_objects::SmartType_Map);
+ (*message)[application_manager::strings::params]
+ [application_manager::strings::function_id] =
+ hmi_apis::FunctionID::BasicCommunication_CloseApplication;
+ (*message)[strings::params][strings::message_type] = MessageType::kRequest;
+ (*message)[strings::params][strings::correlation_id] = kCorrID;
+ (*message)[strings::msg_params][strings::app_id] = kHMIAppID;
+
+ return message;
+ }
+
void SetConnection() {
conn_handler = new connection_handler::ConnectionHandlerImpl(
mock_connection_handler__settings, mock_transport_manager);
@@ -1231,6 +1247,12 @@ class StateControllerImplTest : public ::testing::Test {
using smart_objects::SmartObject;
namespace FunctionID = hmi_apis::FunctionID;
+ ON_CALL(message_helper_mock_, GetBCCloseApplicationRequestToHMI(_, _))
+ .WillByDefault(Return(CreateCloseAppMessage()));
+ ON_CALL(app_manager_mock_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillByDefault(Return(true));
EXPECT_CALL(app_mock, CurrentHmiState(kDefaultWindowId))
.WillRepeatedly(Return(NoneNotAudibleState()));
@@ -2587,14 +2609,20 @@ TEST_F(StateControllerImplTest,
TEST_F(StateControllerImplTest, SetRegularStateWithNewHmiLvl) {
using namespace mobile_apis;
+ auto message = CreateCloseAppMessage();
+ ON_CALL(message_helper_mock_, GetBCCloseApplicationRequestToHMI(_, _))
+ .WillByDefault(Return(message));
+ ON_CALL(app_manager_mock_, GetRPCService())
+ .WillByDefault(ReturnRef(mock_rpc_service_));
+ ON_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillByDefault(Return(true));
+
+ ON_CALL(*simple_app_ptr_, RegularHmiState(kDefaultWindowId))
+ .WillByDefault(Return(NoneNotAudibleState()));
+ ON_CALL(*simple_app_ptr_, CurrentHmiState(kDefaultWindowId))
+ .WillByDefault(Return(NoneNotAudibleState()));
HMILevel::eType set_lvl = HMILevel::HMI_NONE;
- EXPECT_CALL(*simple_app_ptr_, RegularHmiState(kDefaultWindowId))
- .WillOnce(Return(BackgroundState()));
-
- EXPECT_CALL(*simple_app_ptr_, CurrentHmiState(kDefaultWindowId))
- .WillOnce(Return(BackgroundState()))
- .WillOnce(Return(BackgroundState()));
state_ctrl_->SetRegularState(simple_app_, kDefaultWindowId, set_lvl);
@@ -2605,6 +2633,7 @@ TEST_F(StateControllerImplTest, SetRegularStateWithNewHmiLvl) {
EXPECT_CALL(*simple_app_ptr_, CurrentHmiState(kDefaultWindowId))
.WillOnce(Return(BackgroundState()))
.WillOnce(Return(BackgroundState()));
+
state_ctrl_->SetRegularState(simple_app_, kDefaultWindowId, set_lvl);
set_lvl = HMILevel::HMI_FULL;
diff --git a/src/components/include/policy/policy_external/policy/policy_manager.h b/src/components/include/policy/policy_external/policy/policy_manager.h
index f608b62057..248bbfe16c 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -589,6 +589,13 @@ class PolicyManager : public usage_statistics::StatisticsManager,
const = 0;
/**
+ * @brief Gets vehicle data items removed by policies
+ * @return Structure with vehicle data items
+ */
+ virtual std::vector<rpc::policy_table_interface_base::VehicleDataItem>
+ GetRemovedVehicleDataItems() const = 0;
+
+ /**
* @brief Gets copy of current policy table data
* @return policy_table as json object
*/
diff --git a/src/components/include/policy/policy_regular/policy/policy_manager.h b/src/components/include/policy/policy_regular/policy/policy_manager.h
index 7ec407bb34..ee1f5fa98f 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -564,6 +564,13 @@ class PolicyManager : public usage_statistics::StatisticsManager,
const = 0;
/**
+ * @brief Gets removed vehicle data items
+ * @return Structure with vehicle data items
+ */
+ virtual std::vector<policy_table::VehicleDataItem>
+ GetRemovedVehicleDataItems() const = 0;
+
+ /**
* @brief Gets copy of current policy table data
* @return policy_table as json object
*/
diff --git a/src/components/include/test/application_manager/policies/mock_custom_vehicle_data_provider.h b/src/components/include/test/application_manager/policies/mock_custom_vehicle_data_provider.h
index b6533521ed..ba077122ce 100644
--- a/src/components/include/test/application_manager/policies/mock_custom_vehicle_data_provider.h
+++ b/src/components/include/test/application_manager/policies/mock_custom_vehicle_data_provider.h
@@ -13,6 +13,9 @@ class MockCustomVehicleDataProvider : public policy::VehicleDataItemProvider {
MOCK_CONST_METHOD0(
GetVehicleDataItems,
const std::vector<rpc::policy_table_interface_base::VehicleDataItem>());
+ MOCK_CONST_METHOD0(
+ GetRemovedVehicleDataItems,
+ std::vector<rpc::policy_table_interface_base::VehicleDataItem>());
};
} // namespace policy_test
diff --git a/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h b/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h
index deb405cbde..f74526148a 100644
--- a/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h
+++ b/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h
@@ -73,6 +73,9 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
MOCK_CONST_METHOD0(
GetVehicleDataItems,
const std::vector<rpc::policy_table_interface_base::VehicleDataItem>());
+ MOCK_CONST_METHOD0(
+ GetRemovedVehicleDataItems,
+ std::vector<rpc::policy_table_interface_base::VehicleDataItem>());
#ifdef EXTERNAL_PROPRIETARY_MODE
MOCK_METHOD3(OnSnapshotCreated,
diff --git a/src/components/include/test/policy/policy_external/policy/mock_cache_manager.h b/src/components/include/test/policy/policy_external/policy/mock_cache_manager.h
index 35b01d20c1..b74ddbd13c 100644
--- a/src/components/include/test/policy/policy_external/policy/mock_cache_manager.h
+++ b/src/components/include/test/policy/policy_external/policy/mock_cache_manager.h
@@ -79,6 +79,8 @@ class MockCacheManagerInterface : public ::policy::CacheManagerInterface {
MOCK_CONST_METHOD0(GetPolicyTableData, Json::Value());
MOCK_CONST_METHOD0(GetVehicleDataItems,
const std::vector<policy_table::VehicleDataItem>());
+ MOCK_CONST_METHOD0(GetRemovedVehicleDataItems,
+ std::vector<policy_table::VehicleDataItem>());
MOCK_CONST_METHOD1(GetEnabledCloudApps,
void(std::vector<std::string>& enabled_apps));
MOCK_CONST_METHOD7(GetCloudAppParameters,
diff --git a/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h b/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h
index 99d671e4ef..8e6cc2666d 100644
--- a/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h
+++ b/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h
@@ -224,6 +224,8 @@ class MockPolicyManager : public PolicyManager {
MOCK_CONST_METHOD0(GetPolicyTableData, Json::Value());
MOCK_CONST_METHOD0(GetVehicleDataItems,
const std::vector<policy_table::VehicleDataItem>());
+ MOCK_CONST_METHOD0(GetRemovedVehicleDataItems,
+ std::vector<policy_table::VehicleDataItem>());
MOCK_CONST_METHOD1(GetEnabledCloudApps,
void(std::vector<std::string>& enabled_apps));
MOCK_CONST_METHOD7(GetCloudAppParameters,
diff --git a/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h b/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h
index d3da4d74c3..e592caf3bc 100644
--- a/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h
+++ b/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h
@@ -65,6 +65,8 @@ class MockCacheManagerInterface : public CacheManagerInterface {
MOCK_CONST_METHOD0(GetPolicyTableData, Json::Value());
MOCK_CONST_METHOD0(GetVehicleDataItems,
const std::vector<policy_table::VehicleDataItem>());
+ MOCK_CONST_METHOD0(GetRemovedVehicleDataItems,
+ std::vector<policy_table::VehicleDataItem>());
MOCK_CONST_METHOD1(GetEnabledCloudApps,
void(std::vector<std::string>& enabled_apps));
MOCK_CONST_METHOD7(GetCloudAppParameters,
diff --git a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h
index d711b50bab..927f5ba5cc 100644
--- a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h
+++ b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h
@@ -219,6 +219,8 @@ class MockPolicyManager : public PolicyManager {
MOCK_CONST_METHOD0(GetPolicyTableData, Json::Value());
MOCK_CONST_METHOD0(GetVehicleDataItems,
const std::vector<policy_table::VehicleDataItem>());
+ MOCK_CONST_METHOD0(GetRemovedVehicleDataItems,
+ std::vector<policy_table::VehicleDataItem>());
MOCK_CONST_METHOD1(GetEnabledCloudApps,
void(std::vector<std::string>& enabled_apps));
MOCK_CONST_METHOD7(GetCloudAppParameters,
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 8407d4aea4..d105d2e3e8 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -611,12 +611,6 @@
<element name="menuTitle">
<description> Optional text to label an app menu button (for certain touchscreen platforms).</description>
</element>
- <element name="navigationText">
- <description>Navigation text for UpdateTurnList.</description>
- </element>
- <element name="notificationText">
- <description>Text of notification to be displayed on screen.</description>
- </element>
<element name="locationName">
<description> Optional name / title of intended location for SendLocation.</description>
</element>
@@ -632,6 +626,12 @@
<element name="timeToDestination"/>
<!-- TO DO to be removed -->
<element name="turnText"/>
+ <element name="navigationText">
+ <description>Navigation text for UpdateTurnList.</description>
+ </element>
+ <element name="notificationText">
+ <description>Text of notification to be displayed on screen.</description>
+ </element>
</enum>
<enum name="MetadataType">
@@ -4086,8 +4086,8 @@
<element name="VIDEO_STREAMING"/>
<element name="REMOTE_CONTROL"/>
<element name="APP_SERVICES" />
- <element name="DISPLAYS"/>
<element name="SEAT_LOCATION"/>
+ <element name="DISPLAYS"/>
</enum>
<struct name="SystemCapability">
@@ -5432,39 +5432,6 @@
</function>
<function name="SetAppIcon" messagetype="response">
</function>
- <function name="ShowCustomForm" messagetype="request">
- <description>Used to show a custom form; it can be a parent or child screen. If no parent screen is designated, it is set as a parent screen.</description>
- <param name="customFormID" type="String" maxlength="500" mandatory="true">
- <description>
- Predefined or dynamically created screen layout.
- Currently only predefined forms are defined.
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "KEYBOARD_SEARCH" - Custom template containing app-configured on-screen keyboard with active search updating; user also can trigger voice search.
- "NAV_FULLSCREEN_MAP" - Custom root template screen containing full screen map with navigation controls.
- "NAV_POI_MENU" - Custom template containing app-defined POI options.
- "NAV_SEARCH_RESULTS" - Custom template containing a list of app-defined search results
- "NAV_POI_INFO" - Custom template containing app-defined POI information (and potentially map data).
- </description>
- </param>
- <param name="parentFormID" type="String" maxlength="500" defvalue="DEFAULT" mandatory="false">
- <description>
- Parent screen of predefined form to display.
- Currently only predefined forms are defined.
- If not provided, then set to "DEFAULT".
- Predefined layouts include:
- "DEFAULT" - Default media / non-media screen
- "ONSCREEN_PRESETS" - Custom root media screen containing app-defined onscreen presets.
- "NAV_FULLSCREEN_MAP" - Custom template containing full screen map with navigation controls.
- </description>
- </param>
- </function>
- <function name="ShowCustomForm" messagetype="response">
- <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
- <description>Provides additional human readable info regarding the result.</description>
- </param>
- </function>
<function name="OnKeyboardInput" messagetype="notification">
<description>On-screen keyboard event.</description>
<description>Can be full string or individual keypresses depending on keyboard mode.</description>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 8927a46ffc..2a09cc6b57 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -139,7 +139,7 @@
<description>The data sent failed to pass CRC check in receiver end</description>
</element>
<element name="ENCRYPTION_NEEDED" since="6.0">
- <description>SDL receives an un-encrypted PRC request that needs protection. </description>
+ <description>SDL receives an un-encrypted RPC request that needs protection. </description>
</element>
</enum>
@@ -923,7 +923,7 @@
</element>
<element name="alertIcon" since="6.0">
- <description>The image field for Alert</description>>
+ <description>The image field for Alert</description>
</element>
</enum>
@@ -1699,9 +1699,6 @@
</param>
</struct>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <!-- Ford Specific Data Items -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ -->
<enum name="FileType" since="2.0">
<description>Enumeration listing possible file types.</description>
<element name="GRAPHIC_BMP" />
@@ -1890,10 +1887,6 @@
</param>
</struct>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <!-- / Ford Specific Data Items -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
<enum name="VehicleDataResultCode" since="2.0">
<description>Enumeration that describes possible result codes of a vehicle data entry request.</description>
<element name="SUCCESS" internal_name="VDRC_SUCCESS">
@@ -1903,7 +1896,7 @@
<description>DTC / DID request successful, however, not all active DTCs or full contents of DID location available</description>
</element>
<element name="DISALLOWED" internal_name="VDRC_DISALLOWED">
- <description>This vehicle data item is not allowed for this app by Ford.</description>
+ <description>This vehicle data item is not allowed for this app by the OEM/Manufactorer of the connected module.</description>
</element>
<element name="USER_DISALLOWED" internal_name="VDRC_USER_DISALLOWED">
<description>The user has not granted access to this type of vehicle data item at this time.</description>
@@ -2253,7 +2246,7 @@
<history>
<struct name="DisplayCapabilities" since="1.0" until="6.0"/>
</history>
- <description>Contains information about the display capabilities.</description>
+ <description>Contains information about the display capabilities. This struct is deprecated; please see the new SystemCapability DISPLAYS and corresponding struct DisplayCapability </description>
<param name="displayType" type="DisplayType" mandatory="true" deprecated="true" since="5.0">
<description>The type of the display. See DisplayType</description>
<history>
@@ -2286,7 +2279,7 @@
</param>
<!-- TODO: Add pixel density? -->
</struct>
-
+
<struct name="Grid" since="6.0">
<description>Describes a location (origin coordinates and span) of a vehicle component.</description>
<param name="col" type="Integer" mandatory="true" minvalue="-1" maxvalue="100">
@@ -2302,7 +2295,7 @@
<param name="levelspan" type="Integer" mandatory="false" defvalue="1" minvalue="1" maxvalue="100">
</param>
</struct>
-
+
<struct name="ModuleInfo" since="6.0">
<description>Information about a RC module</description>
<param name="moduleId" type="String" maxlength="100" mandatory="true">
@@ -2318,7 +2311,7 @@
<description>allow multiple users/apps to access the module or not </description>
</param>
</struct>
-
+
<struct name="ButtonCapabilities" since="1.0">
<description>Contains information about a button's capabilities.</description>
<param name="name" type="ButtonName" mandatory="true">
@@ -2390,8 +2383,9 @@
<struct name="WindowCapability" since="6.0">
<param name="windowID" type="Integer" mandatory="false">
<description>
- The specified ID of the window. Can be set to a predefined window,
- or omitted for the main window on the main display.
+ The specified ID of the window. This ID is either one used when sending the CreateWindow request,
+ or one of the predefined window ID values from the enum PredefinedWindows. If ommited, value is
+ assumed to be the main window on the main display.
</description>
</param>
<param name="textFields" type="TextField" minsize="1" maxsize="100" array="true" mandatory="false">
@@ -3030,8 +3024,8 @@
<element name="VIDEO_STREAMING"/>
<element name="REMOTE_CONTROL"/>
<element name="APP_SERVICES" since="5.1"/>
- <element name="DISPLAYS" since="6.0"/>
<element name="SEAT_LOCATION" since="6.0"/>
+ <element name="DISPLAYS" since="6.0"/>
</enum>
<struct name="NavigationCapability" since="4.5">
@@ -3076,13 +3070,13 @@
<description>True if the system can utilize the haptic spatial data from the source being streamed. If not included, it can be assumed the module doesn't support haptic spatial data'. </description>
</param>
<param name="diagonalScreenSize" type="Float" minvalue="0" mandatory="false" since="6.0">
- <description>The diagonal screen size in inches.</description>
+ <description>The diagonal screen size in inches.</description>
</param>
<param name="pixelPerInch" type="Float" minvalue="0" mandatory="false" since="6.0">
- <description>PPI is the diagonal resolution in pixels divided by the diagonal screen size in inches.</description>
+ <description>PPI is the diagonal resolution in pixels divided by the diagonal screen size in inches.</description>
</param>
<param name="scale" type="Float" minvalue="1" maxvalue="10" mandatory="false" since="6.0">
- <description>The scaling factor the app should use to change the size of the projecting view.</description>
+ <description>The scaling factor the app should use to change the size of the projecting view.</description>
</param>
</struct>
@@ -3209,6 +3203,7 @@
<param name="id" type="SupportedSeat" mandatory="true" since="5.0" until="6.0"/>
</history>
</param>
+
<param name="heatingEnabled" type="Boolean" mandatory="false"></param>
<param name="coolingEnabled" type="Boolean" mandatory="false"></param>
<param name="heatingLevel" type="Integer" minvalue="0" maxvalue="100" mandatory="false"></param>
@@ -3415,6 +3410,7 @@
<description>value false means disabled, value true means enabled.</description>
</param>
<param name="climateEnable" type="Boolean" mandatory="false" since="6.0">
+ <description>True if the climate module is on, false if the climate module is off</description>
</param>
</struct>
@@ -4435,10 +4431,10 @@
<param name="appServicesCapabilities" type="AppServicesCapabilities" mandatory="false" since="5.1">
<description>An array of currently available services. If this is an update to the capability the affected services will include an update reason in that item</description>
</param>
- <param name="displayCapabilities" type="DisplayCapability" array="true" minsize="1" maxsize="1000" mandatory="false" since="6.0"/>
<param name="seatLocationCapability" type="SeatLocationCapability" mandatory="false" since="6.0">
<description>Contains information about the locations of each seat</description>
</param>
+ <param name="displayCapabilities" type="DisplayCapability" array="true" minsize="1" maxsize="1000" mandatory="false" since="6.0"/>
</struct>
<!-- Requests/Responses -->
@@ -4455,7 +4451,7 @@
<param name="appName" type="String" maxlength="100" mandatory="true" since="1.0">
<description>
- The mobile application name, e.g. "Ford Drive Green".
+ The mobile application name, e.g. "My SDL App".
Needs to be unique over all applications from the same device.
May not be empty.
May not start with a new line character.
@@ -4467,7 +4463,7 @@
<param name="ttsName" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" since="2.0">
<description>
- TTS string for VR recognition of the mobile application name, e.g. "Ford Drive Green".
+ TTS string for VR recognition of the mobile application name, e.g. "My S D L App".
Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.
Needs to be unique over all applications from the same device.
May not be empty.
@@ -4619,7 +4615,7 @@
<param name="presetBankCapabilities" type="PresetBankCapabilities" mandatory="false" deprecated="true" since="6.0">
<description>
If returned, the platform supports custom on-screen Presets; see PresetBankCapabilities.
- This parameter is deprecated and replaced by SystemCapability using DISPLAYS.
+ This parameter is deprecated and replaced by SystemCapability using DISPLAYS.
</description>
<history>
<param name="presetBankCapabilities" type="PresetBankCapabilities" mandatory="false" since="2.0" until="6.0"/>
@@ -4661,7 +4657,7 @@
</param>
<param name="hmiCapabilities" type="HMICapabilities" mandatory="false" since="3.0">
- <description>Specifies the HMI’s capabilities. See HMICapabilities.</description>
+ <description>Specifies the HMI's capabilities. See HMICapabilities.</description>
</param>
<param name="sdlVersion" type="String" maxlength="100" mandatory="false" platform="documentation" since="3.0">
@@ -4817,7 +4813,6 @@
<param name="userLocation" type="SeatLocation" mandatory="false" since="6.0">
<description>Location of the user's seat. Default is driver's seat location if it is not set yet.</description>
</param>
-
<param name="helpPrompt" type="TTSChunk" minsize="1" maxsize="100" array="true" mandatory="false" since="1.0">
<description>
The help prompt.
@@ -5105,18 +5100,22 @@
<function name="ShowAppMenu" functionID="ShowAppMenuID" messagetype="request" since="6.0">
<description>Shows the built in menu view</description>
+
<param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="false">
<description>
If omitted the HMI opens the app's menu.
If set to a sub-menu ID the HMI opens the corresponding sub-menu previously added using `AddSubMenu`.
</description>
</param>
+
</function>
<function name="ShowAppMenu" functionID="ShowAppMenuID" messagetype="response" since="6.0">
+
<param name="success" type="Boolean" platform="documentation" mandatory="true">
<description> true if successful; false, if failed </description>
</param>
+
<param name="resultCode" type="Result" platform="documentation" mandatory="true">
<description>See Result</description>
<element name="SUCCESS"/>
@@ -5129,9 +5128,11 @@
<element name="INVALID_ID"/>
<element name="IN_USE"/>
</param>
+
<param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
<description>Provides additional human readable info regarding the result.</description>
</param>
+
</function>
<function name="CreateInteractionChoiceSet" functionID="CreateInteractionChoiceSetID" messagetype="request" since="1.0">
@@ -5230,10 +5231,10 @@
<param name="cancelID" type="Integer" mandatory="false" since="6.0">
<description>
- An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+ An ID for this specific PerformInteraction to allow cancellation through the `CancelInteraction` RPC.
</description>
</param>
-
+
</function>
<function name="PerformInteraction" functionID="PerformInteractionID" messagetype="response" since="1.0">
@@ -5373,7 +5374,7 @@
If omitted on supported displays, no (or the default if applicable) icon should be displayed.
</description>
</param>
-
+
<param name="cancelID" type="Integer" mandatory="false" since="6.0">
<description>
An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
@@ -5508,9 +5509,11 @@
</param>
<param name="metadataTags" type="MetadataTags" mandatory="false" since="4.5">
- <description>App defined metadata information. See MetadataStruct. Uses mainField1, mainField2, mainField3, mainField4.
+ <description>
+ App defined metadata information. See MetadataStruct. Uses mainField1, mainField2, mainField3, mainField4.
If omitted on supported displays, the currently set metadata tags will not change.
- If any text field contains no tags or the none tag, the metadata tag for that textfield should be removed.</description>
+ If any text field contains no tags or the none tag, the metadata tag for that textfield should be removed.
+ </description>
</param>
<param name="templateTitle" type="String" minlength="0" maxlength="100" mandatory="false" since="6.0">
@@ -5519,7 +5522,6 @@
How this will be displayed is dependent on the OEM design and implementation of the template.
</description>
</param>
-
<param name="windowID" type="Integer" mandatory="false" since="6.0" >
<description>
This is the unique ID assigned to the window that this RPC is intended. If this param is not included,
@@ -5890,8 +5892,6 @@
<param name="cloudAppVehicleID" type="Boolean" mandatory="false" since="5.1">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
-
- <!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -5907,9 +5907,6 @@
<param name="myKey" type="Boolean" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
-
- <!-- / Ford Specific Data Items -->
-
</function>
<function name="SubscribeVehicleData" functionID="SubscribeVehicleDataID" messagetype="response" since="2.0">
@@ -6008,8 +6005,6 @@
<param name="cloudAppVehicleID" type="VehicleDataResult" mandatory="false" since="5.1">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
-
- <!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -6025,8 +6020,6 @@
<param name="myKey" type="VehicleDataResult" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
- <!-- / Ford Specific Data Items -->
-
</function>
<function name="UnsubscribeVehicleData" functionID="UnsubscribeVehicleDataID" messagetype="request" since="2.0">
@@ -6104,8 +6097,6 @@
<param name="cloudAppVehicleID" type="Boolean" mandatory="false" since="5.1">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
-
- <!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -6121,8 +6112,6 @@
<param name="myKey" type="Boolean" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
- <!-- / Ford Specific Data Items -->
-
</function>
<function name="UnsubscribeVehicleData" functionID="UnsubscribeVehicleDataID" messagetype="response" since="2.0">
@@ -6220,8 +6209,6 @@
<param name="cloudAppVehicleID" type="VehicleDataResult" mandatory="false" since="5.1">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
-
- <!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -6237,8 +6224,6 @@
<param name="myKey" type="VehicleDataResult" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
- <!-- / Ford Specific Data Items -->
-
</function>
<function name="GetVehicleData" functionID="GetVehicleDataID" messagetype="request" since="2.0">
@@ -6319,8 +6304,6 @@
<param name="cloudAppVehicleID" type="Boolean" mandatory="false" since="5.1">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
-
- <!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -6336,8 +6319,6 @@
<param name="myKey" type="Boolean" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
- <!-- / Ford Specific Data Items -->
-
</function>
<function name="GetVehicleData" functionID="GetVehicleDataID" messagetype="response" since="2.0">
@@ -6439,8 +6420,6 @@
<param name="cloudAppVehicleID" type="String" mandatory="false" since="5.1">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
-
- <!-- Ford Specific Data Items -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -6456,8 +6435,6 @@
<param name="myKey" type="MyKey" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
- <!-- / Ford Specific Data Items -->
-
</function>
<function name="ReadDID" functionID="ReadDIDID" messagetype="request" since="2.0">
@@ -6615,13 +6592,11 @@
If omitted on supported displays, only the system defined "Close" SoftButton will be displayed.
</description>
</param>
-
<param name="cancelID" type="Integer" mandatory="false" since="6.0">
<description>
- An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+ An ID for this specific ScrollableMessage to allow cancellation through the `CancelInteraction` RPC.
</description>
</param>
-
</function>
<function name="ScrollableMessage" functionID="ScrollableMessageID" messagetype="response" since="2.0">
@@ -6678,7 +6653,7 @@
</param>
<param name="cancelID" type="Integer" mandatory="false" since="6.0">
<description>
- An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+ An ID for this specific Slider to allow cancellation through the `CancelInteraction` RPC.
</description>
</param>
</function>
@@ -6883,6 +6858,7 @@
<element name="GENERIC_ERROR"/>
<element name="REJECTED"/>
<element name="DISALLOWED"/>
+ <element name="UNSUPPORTED_RESOURCE"/>
</param>
<param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
@@ -7186,6 +7162,9 @@
</function>
<function name="SetDisplayLayout" functionID="SetDisplayLayoutID" messagetype="request" deprecated="true" since="6.0">
+ <history>
+ <function name="SetDisplayLayout" functionID="SetDisplayLayoutID" messagetype="request" since="3.0" until="6.0"/>
+ </history>
<description>This RPC is deprecated. Use Show RPC to change layout.</description>
<param name="displayLayout" type="String" maxlength="500" mandatory="true">
<description>
@@ -7200,6 +7179,9 @@
</function>
<function name="SetDisplayLayout" functionID="SetDisplayLayoutID" messagetype="response" deprecated="true" since="6.0">
+ <history>
+ <function name="SetDisplayLayout" functionID="SetDisplayLayoutID" messagetype="response" since="3.0" until="6.0"/>
+ </history>
<description>This RPC is deprecated. Use Show RPC to change layout.</description>
<param name="success" type="Boolean" platform="documentation" mandatory="true">
<description> true, if successful; false, if failed </description>
@@ -7285,6 +7267,10 @@
<element name="TIMED_OUT"/>
<element name="IGNORED"/>
</param>
+
+ <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
+ <description>Provides additional human readable info regarding the result.</description>
+ </param>
</function>
<function name="SendLocation" functionID="SendLocationID" messagetype="request" since="3.0">
@@ -7476,20 +7462,19 @@
</description>
</param>
</function>
+
<function name="GetInteriorVehicleDataConsent" functionID="GetInteriorVehicleDataConsentID" messagetype="request" since="6.0">
<param name="moduleType" type="ModuleType" mandatory="true">
- <description>The module type that the app requests to control.</description>
+ <description>The module type that the app requests to control.</description>
</param>
<param name="moduleIds" type="String" maxlength="100" array="true" mandatory="true">
- <description>Ids of a module of same type, published by System Capability. </description>
+ <description>Ids of a module of same type, published by System Capability. </description>
</param>
</function>
-
+
<function name="GetInteriorVehicleDataConsent" functionID="GetInteriorVehicleDataConsentID" messagetype="response" since="6.0">
- <param name="allowed" type="Boolean" array="true" mandatory="false">
- <description>This array has the same size as "moduleIds" in the request; each element corresponding to one moduleId
- "true" - if SDL grants the permission for the requested module;
- "false" - SDL denies the permission for the requested module.</description>
+ <param name="success" type="Boolean" platform="documentation" mandatory="true">
+ <description> true if successful; false, if failed </description>
</param>
<param name="resultCode" type="Result" platform="documentation" mandatory="true">
<description>See Result</description>
@@ -7507,11 +7492,15 @@
</param>
<param name="info" type="String" maxlength="1000" mandatory="false">
</param>
- <param name="success" type="Boolean" platform="documentation" mandatory="true">
- <description> true if successful; false, if failed </description>
+ <param name="allowed" type="Boolean" array="true" mandatory="false">
+ <description>
+ This array has the same size as "moduleIds" in the request and each element corresponds to one moduleId
+ If true, SDL grants the permission for the requested module
+ If false, SDL denies the permission for the requested module.
+ </description>
</param>
</function>
-
+
<function name="ReleaseInteriorVehicleDataModule" functionID="ReleaseInteriorVehicleDataModuleID" messagetype="request" since="6.0">
<param name="moduleType" type="ModuleType" mandatory="true">
</param>
@@ -7519,8 +7508,11 @@
<description>Id of a module, published by System Capability. </description>
</param>
</function>
-
+
<function name="ReleaseInteriorVehicleDataModule" functionID="ReleaseInteriorVehicleDataModuleID" messagetype="response" since="6.0">
+ <param name="success" type="Boolean" platform="documentation" mandatory="true">
+ <description> true if successful; false, if failed </description>
+ </param>
<param name="resultCode" type="Result" platform="documentation" mandatory="true">
<description>See Result</description>
<element name="SUCCESS"/>
@@ -7536,9 +7528,6 @@
</param>
<param name="info" type="String" maxlength="1000" mandatory="false">
</param>
- <param name="success" type="Boolean" platform="documentation" mandatory="true">
- <description> true if successful; false, if failed </description>
- </param>
</function>
<function name="SetInteriorVehicleData" functionID="SetInteriorVehicleDataID" messagetype="request" since="4.5">
@@ -7825,13 +7814,13 @@
<description> The ID of the service to be unpublished. </description>
</param>
</function>
-
+
<function name="UnpublishAppService" functionID="UnpublishAppServiceID" messagetype="response" since="6.0">
<description> The response to UnpublishAppService </description>
<param name="success" type="Boolean" platform="documentation" mandatory="true">
<description> true, if successful; false, if failed </description>
</param>
-
+
<param name="resultCode" type="Result" platform="documentation" mandatory="true">
<description>See Result</description>
<element name="SUCCESS"/>
@@ -7955,10 +7944,17 @@
<param name="resultCode" type="Result" platform="documentation" mandatory="true">
<description>See Result</description>
<element name="SUCCESS"/>
- <element name="DISALLOWED"/>
+ <element name="IGNORED"/>
+ <element name="INVALID_DATA"/>
+ <element name="OUT_OF_MEMORY"/>
+ <element name="TOO_MANY_PENDING_REQUESTS"/>
<element name="APPLICATION_NOT_REGISTERED"/>
<element name="GENERIC_ERROR"/>
- <element name="IGNORED"/>
+ <element name="REJECTED"/>
+ <element name="DISALLOWED"/>
+ <element name="UNSUPPORTED_RESOURCE"/>
+ <element name="WARNINGS"/>
+ <element name="ABORTED"/>
</param>
<param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
@@ -7974,7 +7970,7 @@
<param name="success" type="Boolean" platform="documentation" mandatory="true">
<description> true if successful; false, if failed </description>
</param>
-
+
<param name="resultCode" type="Result" platform="documentation" mandatory="true">
<description>See Result</description>
<element name="SUCCESS"/>
@@ -7983,7 +7979,7 @@
<element name="GENERIC_ERROR"/>
<element name="IGNORED"/>
</param>
-
+
<param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
<description>Provides additional human readable info regarding the result.</description>
</param>
@@ -8122,8 +8118,6 @@
<param name="cloudAppVehicleID" type="String" mandatory="false" since="5.1">
<description>Parameter used by cloud apps to identify a head unit</description>
</param>
-
- <!-- Ford Specific Vehicle Data -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -8139,8 +8133,6 @@
<param name="myKey" type="MyKey" mandatory="false">
<description>Information related to the MyKey feature</description>
</param>
- <!-- / Ford Specific Vehicle Data -->
-
</function>
<function name="OnCommand" functionID="OnCommandID" messagetype="notification" since="1.0">
diff --git a/src/components/media_manager/src/pipe_streamer_adapter.cc b/src/components/media_manager/src/pipe_streamer_adapter.cc
index c692a0e266..bda106721f 100644
--- a/src/components/media_manager/src/pipe_streamer_adapter.cc
+++ b/src/components/media_manager/src/pipe_streamer_adapter.cc
@@ -82,7 +82,7 @@ PipeStreamerAdapter::PipeStreamer::~PipeStreamer() {
bool PipeStreamerAdapter::PipeStreamer::Connect() {
LOG4CXX_AUTO_TRACE(logger_);
- pipe_fd_ = open(named_pipe_path_.c_str(), O_RDWR, 0);
+ pipe_fd_ = open(named_pipe_path_.c_str(), O_RDWR | O_NONBLOCK, 0);
if (-1 == pipe_fd_) {
LOG4CXX_ERROR(logger_, "Cannot open pipe for writing " << named_pipe_path_);
return false;
@@ -106,16 +106,51 @@ void PipeStreamerAdapter::PipeStreamer::Disconnect() {
bool PipeStreamerAdapter::PipeStreamer::Send(
protocol_handler::RawMessagePtr msg) {
LOG4CXX_AUTO_TRACE(logger_);
- ssize_t ret = write(pipe_fd_, msg->data(), msg->data_size());
- if (-1 == ret) {
- LOG4CXX_ERROR(logger_, "Failed writing data to pipe " << named_pipe_path_);
- return false;
- }
-
- if (static_cast<uint32_t>(ret) != msg->data_size()) {
- LOG4CXX_WARN(logger_,
- "Couldn't write all the data to pipe " << named_pipe_path_);
- }
+ fd_set wfds;
+ FD_ZERO(&wfds);
+ FD_SET(pipe_fd_, &wfds);
+ struct timeval tv;
+ tv.tv_sec = 10;
+ tv.tv_usec = 0;
+ ssize_t write_ret = 0;
+ bool data_remaining = false;
+ do {
+ int select_ret = select(pipe_fd_ + 1, NULL, &wfds, NULL, &tv);
+ // Most likely pipe closed, fail stream
+ if (select_ret == -1) {
+ LOG4CXX_ERROR(logger_,
+ "Failed writing data to pipe "
+ << named_pipe_path_ << ". Errno: " << strerror(errno));
+ return false;
+ // Select success, attempt to write
+ } else if (select_ret) {
+ ssize_t temp_ret = write(
+ pipe_fd_, msg->data() + write_ret, msg->data_size() - write_ret);
+ if (-1 == temp_ret) {
+ LOG4CXX_ERROR(logger_,
+ "Failed writing data to pipe "
+ << named_pipe_path_
+ << ". Errno: " << strerror(errno));
+ return false;
+ }
+ write_ret += temp_ret;
+ // Select timed out, fail stream.
+ } else {
+ LOG4CXX_ERROR(logger_,
+ "Failed writing data to pipe " << named_pipe_path_
+ << ". Error: TIMEOUT");
+ return false;
+ }
+ // Check that all data was written to the pipe.
+ data_remaining = static_cast<uint32_t>(write_ret) != msg->data_size();
+ if (data_remaining) {
+ LOG4CXX_WARN(logger_,
+ "Couldn't write all the data to pipe "
+ << named_pipe_path_ << ". "
+ << msg->data_size() - write_ret << " bytes remaining");
+ }
+ // Loop to send remaining data if there is any.
+ } while (data_remaining);
LOG4CXX_INFO(logger_, "Streamer::sent " << msg->data_size());
return true;
diff --git a/src/components/policy/policy_external/include/policy/cache_manager.h b/src/components/policy/policy_external/include/policy/cache_manager.h
index 5873d31781..5e3cf3dde7 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager.h
@@ -167,6 +167,9 @@ class CacheManager : public CacheManagerInterface {
virtual const std::vector<policy_table::VehicleDataItem> GetVehicleDataItems()
const OVERRIDE;
+ std::vector<policy_table::VehicleDataItem> GetRemovedVehicleDataItems()
+ const OVERRIDE;
+
/**
* @brief Gets copy of current policy table data
* @return policy_table as json object
@@ -894,6 +897,24 @@ class CacheManager : public CacheManagerInterface {
*/
void CheckSnapshotInitialization();
+ /**
+ * @brief Calculates difference between two provided custom vehicle data items
+ * @param items_before list of vehicle data items before PTU was applied
+ * @param items_after list of vehicle data items after PTU was applied
+ * @return list with calculated difference or empty list if two input lists
+ * are equal
+ */
+ policy_table::VehicleDataItems CalculateCustomVdItemsDiff(
+ const policy_table::VehicleDataItems& items_before,
+ const policy_table::VehicleDataItems& items_after) const;
+
+ /**
+ * @brief Sets the custom vehicle data items
+ * @param removed_items list of vehicle data items to set
+ */
+ void SetRemovedCustomVdItems(
+ const policy_table::VehicleDataItems& removed_items);
+
void PersistData();
/**
@@ -939,6 +960,7 @@ class CacheManager : public CacheManagerInterface {
bool update_required;
typedef std::set<std::string> UnpairedDevices;
UnpairedDevices is_unpaired_;
+ policy_table::VehicleDataItems removed_custom_vd_items_;
mutable sync_primitives::RecursiveLock cache_lock_;
sync_primitives::Lock unpaired_lock_;
diff --git a/src/components/policy/policy_external/include/policy/cache_manager_interface.h b/src/components/policy/policy_external/include/policy/cache_manager_interface.h
index ff09ed608d..2cb5f8fe33 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager_interface.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager_interface.h
@@ -175,6 +175,13 @@ class CacheManagerInterface {
const = 0;
/**
+ * @brief Gets vehicle data items removed after the last PTU
+ * @return List of removed vehicle data items
+ */
+ virtual std::vector<policy_table::VehicleDataItem>
+ GetRemovedVehicleDataItems() const = 0;
+
+ /**
* @brief Get a list of enabled cloud applications
* @param enabled_apps List filled with the policy app id of each enabled
* cloud application
diff --git a/src/components/policy/policy_external/include/policy/policy_manager_impl.h b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
index 60d70a9283..b1c22ab9e6 100644
--- a/src/components/policy/policy_external/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
@@ -655,6 +655,9 @@ class PolicyManagerImpl : public PolicyManager {
const std::vector<policy_table::VehicleDataItem> GetVehicleDataItems()
const OVERRIDE;
+ std::vector<policy_table::VehicleDataItem> GetRemovedVehicleDataItems()
+ const OVERRIDE;
+
/**
* @brief Get a list of enabled cloud applications
* @param enabled_apps List filled with the policy app id of each enabled
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc
index 18b663469e..c9ed786509 100644
--- a/src/components/policy/policy_external/src/cache_manager.cc
+++ b/src/components/policy/policy_external/src/cache_manager.cc
@@ -269,7 +269,8 @@ CacheManager::CacheManager()
: CacheManagerInterface()
, pt_(new policy_table::Table)
, backup_(new SQLPTExtRepresentation())
- , update_required(false) {
+ , update_required(false)
+ , removed_custom_vd_items_() {
InitBackupThread();
}
@@ -758,6 +759,12 @@ bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
// Apply update for vehicle data
if (update_pt.policy_table.vehicle_data.is_initialized()) {
+ policy_table::VehicleDataItems custom_items_before_apply;
+ if (pt_->policy_table.vehicle_data->schema_items.is_initialized()) {
+ custom_items_before_apply =
+ CollectCustomVDItems(*pt_->policy_table.vehicle_data->schema_items);
+ }
+
if (!update_pt.policy_table.vehicle_data->schema_items.is_initialized() ||
update_pt.policy_table.vehicle_data->schema_items->empty()) {
pt_->policy_table.vehicle_data->schema_items =
@@ -771,6 +778,12 @@ bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
pt_->policy_table.vehicle_data->schema_items =
rpc::Optional<policy_table::VehicleDataItems>(custom_items);
}
+
+ policy_table::VehicleDataItems custom_items_after_apply =
+ *pt_->policy_table.vehicle_data->schema_items;
+ const auto& items_diff = CalculateCustomVdItemsDiff(
+ custom_items_before_apply, custom_items_after_apply);
+ SetRemovedCustomVdItems(items_diff);
}
ResetCalculatedPermissions();
@@ -1430,6 +1443,12 @@ CacheManager::GetVehicleDataItems() const {
return std::vector<policy_table::VehicleDataItem>();
}
+std::vector<policy_table::VehicleDataItem>
+CacheManager::GetRemovedVehicleDataItems() const {
+ CACHE_MANAGER_CHECK(std::vector<policy_table::VehicleDataItem>());
+ return removed_custom_vd_items_;
+}
+
Json::Value CacheManager::GetPolicyTableData() const {
return pt_->policy_table.ToJsonValue();
}
@@ -1922,6 +1941,46 @@ void CacheManager::CheckSnapshotInitialization() {
}
}
+policy_table::VehicleDataItems CacheManager::CalculateCustomVdItemsDiff(
+ const policy_table::VehicleDataItems& items_before,
+ const policy_table::VehicleDataItems& items_after) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (items_before.empty()) {
+ LOG4CXX_DEBUG(logger_, "No custom VD items found in policy");
+ return policy_table::VehicleDataItems();
+ }
+
+ if (items_after.empty()) {
+ LOG4CXX_DEBUG(logger_,
+ "All custom VD items were removed after policy update");
+ return items_before;
+ }
+
+ policy_table::VehicleDataItems removed_items;
+ for (auto& item_to_search : items_before) {
+ auto item_predicate =
+ [&item_to_search](const policy_table::VehicleDataItem& item_to_check) {
+ return item_to_search.name == item_to_check.name;
+ };
+
+ auto it =
+ std::find_if(items_after.begin(), items_after.end(), item_predicate);
+ if (items_after.end() == it) {
+ removed_items.push_back(item_to_search);
+ }
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Found " << removed_items.size() << " removed VD items");
+ return removed_items;
+}
+
+void CacheManager::SetRemovedCustomVdItems(
+ const policy_table::VehicleDataItems& removed_items) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ removed_custom_vd_items_ = removed_items;
+}
+
void CacheManager::PersistData() {
LOG4CXX_AUTO_TRACE(logger_);
if (backup_.use_count() != 0) {
diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc
index b9eed0be4e..6868b9060c 100644
--- a/src/components/policy/policy_external/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_external/src/policy_manager_impl.cc
@@ -804,6 +804,11 @@ PolicyManagerImpl::GetVehicleDataItems() const {
return cache_->GetVehicleDataItems();
}
+std::vector<policy_table::VehicleDataItem>
+PolicyManagerImpl::GetRemovedVehicleDataItems() const {
+ return cache_->GetRemovedVehicleDataItems();
+}
+
Json::Value PolicyManagerImpl::GetPolicyTableData() const {
return cache_->GetPolicyTableData();
}
diff --git a/src/components/policy/policy_regular/include/policy/cache_manager.h b/src/components/policy/policy_regular/include/policy/cache_manager.h
index 9b0413d7ce..6bd2c4840b 100644
--- a/src/components/policy/policy_regular/include/policy/cache_manager.h
+++ b/src/components/policy/policy_regular/include/policy/cache_manager.h
@@ -154,6 +154,9 @@ class CacheManager : public CacheManagerInterface {
virtual const std::vector<policy_table::VehicleDataItem> GetVehicleDataItems()
const;
+ std::vector<policy_table::VehicleDataItem> GetRemovedVehicleDataItems()
+ const OVERRIDE;
+
const boost::optional<bool> LockScreenDismissalEnabledState() const OVERRIDE;
const boost::optional<std::string> LockScreenDismissalWarningMessage(
@@ -919,6 +922,24 @@ class CacheManager : public CacheManagerInterface {
*/
void CheckSnapshotInitialization();
+ /**
+ * @brief Calculates difference between two provided custom vehicle data items
+ * @param items_before list of vehicle data items before PTU was applied
+ * @param items_after list of vehicle data items after PTU was applied
+ * @return list with calculated difference or empty list if two input lists
+ * are equal
+ */
+ policy_table::VehicleDataItems CalculateCustomVdItemsDiff(
+ const policy_table::VehicleDataItems& items_before,
+ const policy_table::VehicleDataItems& items_after) const;
+
+ /**
+ * @brief Sets the custom vehicle data items
+ * @param removed_items list of vehicle data items to set
+ */
+ void SetRemovedCustomVdItems(
+ const policy_table::VehicleDataItems& removed_items);
+
void PersistData();
/**
@@ -945,6 +966,7 @@ class CacheManager : public CacheManagerInterface {
bool update_required;
typedef std::set<std::string> UnpairedDevices;
UnpairedDevices is_unpaired_;
+ policy_table::VehicleDataItems removed_custom_vd_items_;
mutable sync_primitives::RecursiveLock cache_lock_;
sync_primitives::Lock unpaired_lock_;
diff --git a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h
index bd03896bfb..a1b4af0f39 100644
--- a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h
+++ b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h
@@ -162,6 +162,13 @@ class CacheManagerInterface {
const = 0;
/**
+ * @brief Gets vehicle data items removed after the last PTU
+ * @return List of removed vehicle data items
+ */
+ virtual std::vector<policy_table::VehicleDataItem>
+ GetRemovedVehicleDataItems() const = 0;
+
+ /**
* @brief Get a list of enabled cloud applications
* @param enabled_apps List filled with the policy app id of each enabled
* cloud application
diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
index 178de4a8f0..fc6ec369dc 100644
--- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
@@ -663,6 +663,9 @@ class PolicyManagerImpl : public PolicyManager {
const std::vector<policy_table::VehicleDataItem> GetVehicleDataItems()
const OVERRIDE;
+ std::vector<policy_table::VehicleDataItem> GetRemovedVehicleDataItems()
+ const OVERRIDE;
+
/**
* @brief Gets copy of current policy table data
* @return policy_table as json object
diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc
index 166a79b89d..9c73d88e63 100644
--- a/src/components/policy/policy_regular/src/cache_manager.cc
+++ b/src/components/policy/policy_regular/src/cache_manager.cc
@@ -107,6 +107,7 @@ CacheManager::CacheManager()
, pt_(new policy_table::Table)
, backup_(new SQLPTRepresentation())
, update_required(false)
+ , removed_custom_vd_items_()
, settings_(nullptr) {
LOG4CXX_AUTO_TRACE(logger_);
backuper_ = new BackgroundBackuper(this);
@@ -304,6 +305,12 @@ bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
// Apply update for vehicle data
if (update_pt.policy_table.vehicle_data.is_initialized()) {
+ policy_table::VehicleDataItems custom_items_before_apply;
+ if (pt_->policy_table.vehicle_data->schema_items.is_initialized()) {
+ custom_items_before_apply =
+ CollectCustomVDItems(*pt_->policy_table.vehicle_data->schema_items);
+ }
+
if (!update_pt.policy_table.vehicle_data->schema_items.is_initialized() ||
update_pt.policy_table.vehicle_data->schema_items->empty()) {
pt_->policy_table.vehicle_data->schema_items =
@@ -317,9 +324,12 @@ bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
pt_->policy_table.vehicle_data->schema_items =
rpc::Optional<policy_table::VehicleDataItems>(custom_items);
}
- if (update_pt.policy_table.vehicle_data->schema_version.is_initialized() &&
- update_pt.policy_table.vehicle_data->schema_items.is_initialized()) {
- }
+
+ policy_table::VehicleDataItems custom_items_after_apply =
+ *pt_->policy_table.vehicle_data->schema_items;
+ const auto& items_diff = CalculateCustomVdItemsDiff(
+ custom_items_before_apply, custom_items_after_apply);
+ SetRemovedCustomVdItems(items_diff);
}
ResetCalculatedPermissions();
@@ -727,6 +737,12 @@ CacheManager::GetVehicleDataItems() const {
return std::vector<policy_table::VehicleDataItem>();
}
+std::vector<policy_table::VehicleDataItem>
+CacheManager::GetRemovedVehicleDataItems() const {
+ CACHE_MANAGER_CHECK(std::vector<policy_table::VehicleDataItem>());
+ return removed_custom_vd_items_;
+}
+
Json::Value CacheManager::GetPolicyTableData() const {
return pt_->policy_table.ToJsonValue();
}
@@ -1226,6 +1242,46 @@ void CacheManager::CheckSnapshotInitialization() {
}
}
+policy_table::VehicleDataItems CacheManager::CalculateCustomVdItemsDiff(
+ const policy_table::VehicleDataItems& items_before,
+ const policy_table::VehicleDataItems& items_after) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (items_before.empty()) {
+ LOG4CXX_DEBUG(logger_, "No custom VD items found in policy");
+ return policy_table::VehicleDataItems();
+ }
+
+ if (items_after.empty()) {
+ LOG4CXX_DEBUG(logger_,
+ "All custom VD items were removed after policy update");
+ return items_before;
+ }
+
+ policy_table::VehicleDataItems removed_items;
+ for (auto& item_to_search : items_before) {
+ auto item_predicate =
+ [&item_to_search](const policy_table::VehicleDataItem& item_to_check) {
+ return item_to_search.name == item_to_check.name;
+ };
+
+ auto it =
+ std::find_if(items_after.begin(), items_after.end(), item_predicate);
+ if (items_after.end() == it) {
+ removed_items.push_back(item_to_search);
+ }
+ }
+
+ LOG4CXX_DEBUG(logger_,
+ "Found " << removed_items.size() << " removed VD items");
+ return removed_items;
+}
+
+void CacheManager::SetRemovedCustomVdItems(
+ const policy_table::VehicleDataItems& removed_items) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ removed_custom_vd_items_ = removed_items;
+}
+
void CacheManager::PersistData() {
LOG4CXX_AUTO_TRACE(logger_);
if (backup_.use_count() != 0) {
diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc
index 4c3f0763bc..2fef8de1d8 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -721,6 +721,11 @@ PolicyManagerImpl::GetVehicleDataItems() const {
return cache_->GetVehicleDataItems();
}
+std::vector<policy_table::VehicleDataItem>
+PolicyManagerImpl::GetRemovedVehicleDataItems() const {
+ return cache_->GetRemovedVehicleDataItems();
+}
+
Json::Value PolicyManagerImpl::GetPolicyTableData() const {
return cache_->GetPolicyTableData();
}
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index 61b9afd7bc..3b216c273c 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -1816,8 +1816,15 @@ void ProtocolHandlerImpl::NotifySessionStarted(
LOG4CXX_WARN(logger_,
"Refused by session_observer to create service "
<< static_cast<int32_t>(service_type) << " type.");
+ const auto session_id = packet->session_id();
+ const auto connection_key =
+ session_observer_.KeyFromPair(context.connection_id_, session_id);
+ service_status_update_handler_->OnServiceUpdate(
+ connection_key,
+ context.service_type_,
+ ServiceStatus::SERVICE_START_FAILED);
SendStartSessionNAck(context.connection_id_,
- packet->session_id(),
+ session_id,
protocol_version,
packet->service_type(),
rejected_params);
diff --git a/tools/InterfaceGenerator/MsgVersionGenerate.py b/tools/InterfaceGenerator/MsgVersionGenerate.py
index 6ec0c40a68..d1e5d7d968 100644
--- a/tools/InterfaceGenerator/MsgVersionGenerate.py
+++ b/tools/InterfaceGenerator/MsgVersionGenerate.py
@@ -69,7 +69,7 @@ def prepare_data_for_storage(major_version, minor_version, patch_version, minimu
"""Prepares data to store to file.
"""
temp = Template(
- u'''/*Copyright (c) 2016, Ford Motor Company\n'''
+ u'''/*Copyright (c) 2019, SmartDeviceLink Consortium, Inc.\n'''
u'''All rights reserved.\n'''
u'''Redistribution and use in source and binary forms, with or without\n'''
u'''modification, are permitted provided that the following conditions are met:\n'''
@@ -79,9 +79,9 @@ def prepare_data_for_storage(major_version, minor_version, patch_version, minimu
u'''this list of conditions and the following\n'''
u'''disclaimer in the documentation and/or other materials provided with the\n'''
u'''distribution.\n'''
- u'''Neither the name of the Ford Motor Company nor the names of its contributors\n'''
- u'''may be used to endorse or promote products derived from this software\n'''
- u'''without specific prior written permission.\n'''
+ u'''Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its\n'''
+ u'''contributors may be used to endorse or promote products derived from this\n'''
+ u'''software without specific prior written permission.\n'''
u'''THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n'''
u'''AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n'''
u'''IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n'''
diff --git a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
index 86d238ef69..6cd60a7dfc 100755
--- a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
+++ b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
@@ -1557,7 +1557,7 @@ class CodeGenerator(object):
u'''SmartSchemas\n'''
u''' * in accordance with definitions from ${class_name}.xml file\n'''
u''' */\n'''
- u'''// Copyright (c) 2013, Ford Motor Company\n'''
+ u'''// Copyright (c) 2019, SmartDeviceLink Consortium, Inc.\n'''
u'''// All rights reserved.\n'''
u'''//\n'''
u'''// Redistribution and use in source and binary forms, '''
@@ -1576,11 +1576,11 @@ class CodeGenerator(object):
u'''provided with the\n'''
u'''// distribution.\n'''
u'''//\n'''
- u'''// Neither the name of the Ford Motor Company nor the names '''
- u'''of its contributors\n'''
- u'''// may be used to endorse or promote products derived '''
- u'''from this software\n'''
- u'''// without specific prior written permission.\n'''
+ u'''// Neither the name of the SmartDeviceLink Consortium, Inc. nor the names '''
+ u'''of its\n'''
+ u'''// contributors may be used to endorse or promote products derived '''
+ u'''from this\n'''
+ u'''// software without specific prior written permission.\n'''
u'''//\n'''
u'''// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND '''
u'''CONTRIBUTORS "AS IS"\n'''
diff --git a/tools/InterfaceGenerator/generator/parsers/RPCBase.py b/tools/InterfaceGenerator/generator/parsers/RPCBase.py
index d11b9e8d0d..ac5bb4c858 100755
--- a/tools/InterfaceGenerator/generator/parsers/RPCBase.py
+++ b/tools/InterfaceGenerator/generator/parsers/RPCBase.py
@@ -904,7 +904,7 @@ class Parser(object):
elif subelement.tag == "param" and parent.tag == "param":
items.append(self._parse_function_param(subelement, prefix))
elif subelement.tag == "function" and parent.tag == "function":
- items.append(self.__parse_function(subelement, prefix))
+ items.append(self._parse_function(subelement, prefix))
else:
raise ParseError("A history tag must be nested within the element it notes the history for. Fix item: '" +
parent.attrib["name"] + "'")